diff --git a/client/src/templates/Challenges/classic/desktop-layout.tsx b/client/src/templates/Challenges/classic/desktop-layout.tsx index b0552662e2c..3f11e7978de 100644 --- a/client/src/templates/Challenges/classic/desktop-layout.tsx +++ b/client/src/templates/Challenges/classic/desktop-layout.tsx @@ -98,7 +98,7 @@ const DesktopLayout = (props: DesktopLayoutProps): JSX.Element => { const [showNotes, setShowNotes] = useState(false); const [showConsole, setShowConsole] = useState(false); - const [showInstructions, setShowInstuctions] = useState(true); + const [showInstructions, setShowInstructions] = useState(true); const togglePane = (pane: string): void => { if (pane === 'showPreviewPane') { @@ -122,9 +122,9 @@ const DesktopLayout = (props: DesktopLayoutProps): JSX.Element => { } else if (pane === 'showNotes') { setShowNotes(!showNotes); } else if (pane === 'showInstructions') { - setShowInstuctions(!showInstructions); + setShowInstructions(!showInstructions); } else { - setShowInstuctions(true); + setShowInstructions(true); setShowConsole(false); setShowPreviewPane(true); setShowPreviewPortal(false); diff --git a/client/src/templates/Challenges/exam/show.tsx b/client/src/templates/Challenges/exam/show.tsx index 740b5a233f9..8523a518253 100644 --- a/client/src/templates/Challenges/exam/show.tsx +++ b/client/src/templates/Challenges/exam/show.tsx @@ -355,15 +355,15 @@ class ShowExam extends Component { title: string; }; - let missingPrequisites: Prerequisite[] = []; + let missingPrerequisites: Prerequisite[] = []; if (prerequisites) { - missingPrequisites = prerequisites?.filter( + missingPrerequisites = prerequisites?.filter( prerequisite => !completedChallenges.find(({ id }) => prerequisite.id === id) ); } - const qualifiedForExam = missingPrequisites.length === 0; + const qualifiedForExam = missingPrerequisites.length === 0; const blockNameTitle = `${t( `intro:${superBlock}.blocks.${block}.title` @@ -539,7 +539,7 @@ class ShowExam extends Component {

{t('learn.exam.not-qualified')}

    - {missingPrequisites.map(({ title, id }) => ( + {missingPrerequisites.map(({ title, id }) => (
  • {title}
  • ))}
diff --git a/client/utils/gatsby/layout-selector.test.tsx b/client/utils/gatsby/layout-selector.test.tsx index 3565e4cf4f7..82c7ce7b7f7 100644 --- a/client/utils/gatsby/layout-selector.test.tsx +++ b/client/utils/gatsby/layout-selector.test.tsx @@ -60,52 +60,52 @@ const challengePageContext = { test('Challenges should have DefaultLayout and no footer', () => { const challengePath = '/learn/responsive-web-design/basic-html-and-html5/say-hello-to-html-elements'; - const compnentObj = getComponentNameAndProps( + const componentObj = getComponentNameAndProps( Learn, challengePath, challengePageContext ); - expect(compnentObj.name).toEqual('DefaultLayout'); - expect(compnentObj.props.showFooter).toEqual(false); + expect(componentObj.name).toEqual('DefaultLayout'); + expect(componentObj.props.showFooter).toEqual(false); }); test('SuperBlock path should have DefaultLayout and footer', () => { const superBlockPath = '/learn/responsive-web-design/'; - const compnentObj = getComponentNameAndProps(Learn, superBlockPath); - expect(compnentObj.name).toEqual('DefaultLayout'); - expect(compnentObj.props.showFooter).toEqual(true); + const componentObj = getComponentNameAndProps(Learn, superBlockPath); + expect(componentObj.name).toEqual('DefaultLayout'); + expect(componentObj.props.showFooter).toEqual(true); }); test('i18n challenge path should have DefaultLayout and no footer', () => { const challengePath = 'espanol/learn/responsive-web-design/basic-html-and-html5/say-hello-to-html-elements/'; - const compnentObj = getComponentNameAndProps( + const componentObj = getComponentNameAndProps( Learn, challengePath, challengePageContext ); - expect(compnentObj.name).toEqual('DefaultLayout'); - expect(compnentObj.props.showFooter).toEqual(false); + expect(componentObj.name).toEqual('DefaultLayout'); + expect(componentObj.props.showFooter).toEqual(false); }); test('i18n superBlock path should have DefaultLayout and footer', () => { const superBlockPath = '/learn/responsive-web-design/'; - const compnentObj = getComponentNameAndProps(Learn, superBlockPath); - expect(compnentObj.name).toEqual('DefaultLayout'); - expect(compnentObj.props.showFooter).toEqual(true); + const componentObj = getComponentNameAndProps(Learn, superBlockPath); + expect(componentObj.name).toEqual('DefaultLayout'); + expect(componentObj.props.showFooter).toEqual(true); }); test('404 page should have DefaultLayout and footer', () => { const challengePath = '/espanol/learn/responsive-web-design/basic-html-and-html5/say-hello-to-html-elements/'; - const compnentObj = getComponentNameAndProps(FourOhFourPage, challengePath); - expect(compnentObj.name).toEqual('DefaultLayout'); - expect(compnentObj.props.showFooter).toEqual(true); + const componentObj = getComponentNameAndProps(FourOhFourPage, challengePath); + expect(componentObj.name).toEqual('DefaultLayout'); + expect(componentObj.props.showFooter).toEqual(true); }); test('Certification path should have CertificationLayout', () => { const challengePath = '/certification/mot01/javascript-algorithms-and-data-structures/'; - const compnentObj = getComponentNameAndProps(Certification, challengePath); - expect(compnentObj.name).toEqual('CertificationLayout'); + const componentObj = getComponentNameAndProps(Certification, challengePath); + expect(componentObj.name).toEqual('CertificationLayout'); }); diff --git a/tools/challenge-parser/parser/plugins/add-assignment.js b/tools/challenge-parser/parser/plugins/add-assignment.js index 1f2ef25ff33..75cdcf9d6c5 100644 --- a/tools/challenge-parser/parser/plugins/add-assignment.js +++ b/tools/challenge-parser/parser/plugins/add-assignment.js @@ -7,9 +7,9 @@ function plugin() { return transformer; function transformer(tree, file) { - const assigmentNodes = getAllBetween(tree, '--assignment--'); + const assignmentNodes = getAllBetween(tree, '--assignment--'); - const assignment = getAssignments(assigmentNodes).filter(a => a != ''); + const assignment = getAssignments(assignmentNodes).filter(a => a != ''); file.data.assignments = assignment; }