diff --git a/client/src/templates/Challenges/classic/Show.js b/client/src/templates/Challenges/classic/Show.js
index de9a7dd066..699f57cf56 100644
--- a/client/src/templates/Challenges/classic/Show.js
+++ b/client/src/templates/Challenges/classic/Show.js
@@ -206,13 +206,8 @@ class ShowClassic extends Component {
}
renderInstructionsPanel({ showToolPanel }) {
- const {
- block,
- description,
- instructions,
- superBlock,
- translationPending
- } = this.getChallenge();
+ const { block, description, instructions, superBlock, translationPending } =
+ this.getChallenge();
const { forumTopicId, title } = this.getChallenge();
return (
diff --git a/client/src/templates/Challenges/redux/create-question-epic.js b/client/src/templates/Challenges/redux/create-question-epic.js
index 7dba35a24a..9427ccd0f6 100644
--- a/client/src/templates/Challenges/redux/create-question-epic.js
+++ b/client/src/templates/Challenges/redux/create-question-epic.js
@@ -32,9 +32,8 @@ function createQuestionEpic(action$, state$, { window }) {
tap(() => {
const state = state$.value;
const files = challengeFilesSelector(state);
- const { title: challengeTitle, helpCategory } = challengeMetaSelector(
- state
- );
+ const { title: challengeTitle, helpCategory } =
+ challengeMetaSelector(state);
const {
navigator: { userAgent },
location: { href }
diff --git a/client/src/templates/Challenges/redux/execute-challenge-saga.js b/client/src/templates/Challenges/redux/execute-challenge-saga.js
index 689ad270c8..0c4e643cef 100644
--- a/client/src/templates/Challenges/redux/execute-challenge-saga.js
+++ b/client/src/templates/Challenges/redux/execute-challenge-saga.js
@@ -74,9 +74,9 @@ export function* executeChallengeSaga({
yield put(initLogs());
yield put(initConsole(i18next.t('learn.running-tests')));
// reset tests to initial state
- const tests = (yield select(
- challengeTestsSelector
- )).map(({ text, testString }) => ({ text, testString }));
+ const tests = (yield select(challengeTestsSelector)).map(
+ ({ text, testString }) => ({ text, testString })
+ );
yield put(updateTests(tests));
yield fork(takeEveryLog, consoleProxy);
diff --git a/client/src/templates/Challenges/utils/frame.js b/client/src/templates/Challenges/utils/frame.js
index 47e1cfa1c3..d4d56bff22 100644
--- a/client/src/templates/Challenges/utils/frame.js
+++ b/client/src/templates/Challenges/utils/frame.js
@@ -67,22 +67,24 @@ const createFrame = (document, id) => ctx => {
};
const hiddenFrameClassName = 'hide-test-frame';
-const mountFrame = document => ({ element, ...rest }) => {
- const oldFrame = document.getElementById(element.id);
- if (oldFrame) {
- element.className = oldFrame.className || hiddenFrameClassName;
- oldFrame.parentNode.replaceChild(element, oldFrame);
- } else {
- element.className = hiddenFrameClassName;
- document.body.appendChild(element);
- }
- return {
- ...rest,
- element,
- document: element.contentDocument,
- window: element.contentWindow
+const mountFrame =
+ document =>
+ ({ element, ...rest }) => {
+ const oldFrame = document.getElementById(element.id);
+ if (oldFrame) {
+ element.className = oldFrame.className || hiddenFrameClassName;
+ oldFrame.parentNode.replaceChild(element, oldFrame);
+ } else {
+ element.className = hiddenFrameClassName;
+ document.body.appendChild(element);
+ }
+ return {
+ ...rest,
+ element,
+ document: element.contentDocument,
+ window: element.contentWindow
+ };
};
-};
const buildProxyConsole = proxyLogger => ctx => {
const oldLog = ctx.window.console.log.bind(ctx.window.console);
diff --git a/client/src/templates/Introduction/components/CertificationCard.js b/client/src/templates/Introduction/components/CertificationCard.js
index 725db4a3e5..b88ffeddf6 100644
--- a/client/src/templates/Introduction/components/CertificationCard.js
+++ b/client/src/templates/Introduction/components/CertificationCard.js
@@ -20,9 +20,11 @@ const CertificationCard = ({ certSlug, superBlock, i18nCertText }) => {
setIsExpanded(!isExpanded);
};
- const { expand: expandText, collapse: collapseText, steps: stepsText } = t(
- 'intro:misc-text'
- );
+ const {
+ expand: expandText,
+ collapse: collapseText,
+ steps: stepsText
+ } = t('intro:misc-text');
return (
diff --git a/client/src/templates/Introduction/components/SuperBlockIntro.js b/client/src/templates/Introduction/components/SuperBlockIntro.js
index 26605933c5..108fb49ca0 100644
--- a/client/src/templates/Introduction/components/SuperBlockIntro.js
+++ b/client/src/templates/Introduction/components/SuperBlockIntro.js
@@ -14,10 +14,8 @@ function SuperBlockIntro(props) {
const { superBlock } = props;
const superBlockIntroObj = t(`intro:${superBlock}`);
- const {
- title: i18nSuperBlock,
- intro: superBlockIntroText
- } = superBlockIntroObj;
+ const { title: i18nSuperBlock, intro: superBlockIntroText } =
+ superBlockIntroObj;
return (
<>
diff --git a/client/src/utils/curriculum-helpers.test.js b/client/src/utils/curriculum-helpers.test.js
index b6d3bada45..337c67cb68 100644
--- a/client/src/utils/curriculum-helpers.test.js
+++ b/client/src/utils/curriculum-helpers.test.js
@@ -8,10 +8,8 @@ import htmlTestValues from './__fixtures/curriculum-helpers-html';
import whiteSpaceTestValues from './__fixtures/curriculum-helpers-remove-white-space';
/* eslint-enable max-len */
-const {
- stringWithWhiteSpaceChars,
- stringWithWhiteSpaceCharsRemoved
-} = whiteSpaceTestValues;
+const { stringWithWhiteSpaceChars, stringWithWhiteSpaceCharsRemoved } =
+ whiteSpaceTestValues;
const { cssFullExample, cssCodeWithCommentsRemoved } = cssTestValues;
diff --git a/client/utils/gatsby/challengePageCreator.js b/client/utils/gatsby/challengePageCreator.js
index 51628c84b0..7bc25f3d3e 100644
--- a/client/utils/gatsby/challengePageCreator.js
+++ b/client/utils/gatsby/challengePageCreator.js
@@ -49,36 +49,38 @@ const getPrevChallengePath = (node, index, nodeArray) => {
const getTemplateComponent = challengeType => views[viewTypes[challengeType]];
-exports.createChallengePages = createPage => ({ node }, index, thisArray) => {
- const {
- superBlock,
- block,
- fields: { slug },
- required = [],
- template,
- challengeType,
- id
- } = node;
- // TODO: challengeType === 7 and isPrivate are the same, right? If so, we
- // should remove one of them.
+exports.createChallengePages =
+ createPage =>
+ ({ node }, index, thisArray) => {
+ const {
+ superBlock,
+ block,
+ fields: { slug },
+ required = [],
+ template,
+ challengeType,
+ id
+ } = node;
+ // TODO: challengeType === 7 and isPrivate are the same, right? If so, we
+ // should remove one of them.
- return createPage({
- path: slug,
- component: getTemplateComponent(challengeType),
- context: {
- challengeMeta: {
- superBlock,
- block,
- template,
- required,
- nextChallengePath: getNextChallengePath(node, index, thisArray),
- prevChallengePath: getPrevChallengePath(node, index, thisArray),
- id
- },
- slug
- }
- });
-};
+ return createPage({
+ path: slug,
+ component: getTemplateComponent(challengeType),
+ context: {
+ challengeMeta: {
+ superBlock,
+ block,
+ template,
+ required,
+ nextChallengePath: getNextChallengePath(node, index, thisArray),
+ prevChallengePath: getPrevChallengePath(node, index, thisArray),
+ id
+ },
+ slug
+ }
+ });
+ };
exports.createBlockIntroPages = createPage => edge => {
const {
diff --git a/curriculum/getChallenges.js b/curriculum/getChallenges.js
index 542ba527ec..c00154e011 100644
--- a/curriculum/getChallenges.js
+++ b/curriculum/getChallenges.js
@@ -15,9 +15,8 @@ const { isAuditedCert } = require('../utils/is-audited');
const { dasherize } = require('../utils/slugs');
const { createPoly } = require('../utils/polyvinyl');
const { helpCategoryMap } = require('../client/utils/challengeTypes');
-const {
- curriculum: curriculumLangs
-} = require('../config/i18n/all-langs').availableLangs;
+const { curriculum: curriculumLangs } =
+ require('../config/i18n/all-langs').availableLangs;
const access = util.promisify(fs.access);
diff --git a/curriculum/test/test-challenges.js b/curriculum/test/test-challenges.js
index 570ac07c9d..1ce850fc98 100644
--- a/curriculum/test/test-challenges.js
+++ b/curriculum/test/test-challenges.js
@@ -68,9 +68,10 @@ const TRANSLATABLE_COMMENTS = getTranslatableComments(
);
// the config files are created during the build, but not before linting
-// eslint-disable-next-line import/no-unresolved
-const testEvaluator = require('../../config/client/test-evaluator.json')
- .filename;
+/* eslint-disable import/no-unresolved */
+const testEvaluator =
+ require('../../config/client/test-evaluator.json').filename;
+/* eslint-enable import/no-unresolved */
const { inspect } = require('util');
const commentExtractors = {
diff --git a/curriculum/utils.js b/curriculum/utils.js
index 65d338b3fd..481117478c 100644
--- a/curriculum/utils.js
+++ b/curriculum/utils.js
@@ -1,9 +1,8 @@
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../.env') });
-const {
- curriculum: curriculumLangs
-} = require('../config/i18n/all-langs').availableLangs;
+const { curriculum: curriculumLangs } =
+ require('../config/i18n/all-langs').availableLangs;
exports.testedLang = function testedLang() {
if (process.env.CURRICULUM_LOCALE) {
diff --git a/cypress/integration/tags.js b/cypress/integration/tags.js
index 783629112b..d98cd49810 100644
--- a/cypress/integration/tags.js
+++ b/cypress/integration/tags.js
@@ -20,8 +20,7 @@ describe('The Document Metadata', () => {
const scripts = {
mathjax: {
selector: 'body script[id="mathjax"]',
- src:
- 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS_HTML'
+ src: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS_HTML'
}
};
it('landing page has correct for description', () => {
diff --git a/package-lock.json b/package-lock.json
index d508bdf24e..ab661f5e97 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -16457,9 +16457,9 @@
"dev": true
},
"prettier": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz",
- "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==",
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.0.tgz",
+ "integrity": "sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w==",
"dev": true
},
"prettier-linter-helpers": {
diff --git a/package.json b/package.json
index 055eab1a9c..fb4964f026 100644
--- a/package.json
+++ b/package.json
@@ -117,7 +117,7 @@
"markdownlint": "0.21.0",
"npm-run-all": "4.1.5",
"ora": "5.4.0",
- "prettier": "2.2.1",
+ "prettier": "2.3.0",
"prismjs": "1.23.0",
"shx": "0.3.3",
"sinon": "10.0.0",
diff --git a/tools/crowdin/actions/hide-non-translated-strings/index.js b/tools/crowdin/actions/hide-non-translated-strings/index.js
index 11a32d889e..9f41e3d068 100644
--- a/tools/crowdin/actions/hide-non-translated-strings/index.js
+++ b/tools/crowdin/actions/hide-non-translated-strings/index.js
@@ -44,9 +44,8 @@ const hideNonTranslatedStrings = async projectId => {
const crowdinStrings = await getStrings({ projectId });
if (crowdinStrings && crowdinStrings.length) {
for (let string of crowdinStrings) {
- const { crowdinFilePath, challengeTitle } = challengeTitleLookup[
- string.data.fileId
- ];
+ const { crowdinFilePath, challengeTitle } =
+ challengeTitleLookup[string.data.fileId];
await updateFileString({
projectId,
string,