chore: bump prettier and lint-staged (#48674)

* chore: bump prettier and lint-staged

* refactor: drop unused eslint disables

Currently we need to fetch trending.json before we can build the site
(i.e. before Cypress tests can run), so we can assume the file exists.

In case the download fails in CI, linting will error first. I've added
a comment to save some debugging time.

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Mrugesh Mohapatra
2022-12-06 23:46:42 +05:30
committed by GitHub
parent 60189fb119
commit 6dba4d3409
4 changed files with 90 additions and 61 deletions
@@ -280,32 +280,33 @@ class ShowCodeAlly extends Component<ShowCodeAllyProps> {
</Trans>
</div>
<Spacer />
{isSignedIn && challengeType === challengeTypes.codeAllyCert && (
<>
<div className='ca-description'>
{t('learn.complete-both-steps')}
</div>
<hr />
<Spacer />
<b>{t('learn.step-1')}</b>
{(isPartiallyCompleted || isCompleted) && (
<GreenPass
style={{
height: '15px',
width: '15px',
marginLeft: '7px'
}}
/>
)}
<Spacer />
<div className='ca-description'>
{t('learn.runs-in-vm')}
</div>
<Spacer />
<PrismFormatted text={instructions} />
<Spacer />
</>
)}
{isSignedIn &&
challengeType === challengeTypes.codeAllyCert && (
<>
<div className='ca-description'>
{t('learn.complete-both-steps')}
</div>
<hr />
<Spacer />
<b>{t('learn.step-1')}</b>
{(isPartiallyCompleted || isCompleted) && (
<GreenPass
style={{
height: '15px',
width: '15px',
marginLeft: '7px'
}}
/>
)}
<Spacer />
<div className='ca-description'>
{t('learn.runs-in-vm')}
</div>
<Spacer />
<PrismFormatted text={instructions} />
<Spacer />
</>
)}
<div
className={`ca-btn-padding ${
!isSignedIn ||
@@ -329,35 +330,36 @@ class ShowCodeAlly extends Component<ShowCodeAllyProps> {
: t('buttons.click-start-course')}
</Button>
</div>
{isSignedIn && challengeType === challengeTypes.codeAllyCert && (
<>
<hr />
<Spacer />
<b>{t('learn.step-2')}</b>
{isCompleted && (
<GreenPass
style={{
height: '15px',
width: '15px',
marginLeft: '7px'
}}
{isSignedIn &&
challengeType === challengeTypes.codeAllyCert && (
<>
<hr />
<Spacer />
<b>{t('learn.step-2')}</b>
{isCompleted && (
<GreenPass
style={{
height: '15px',
width: '15px',
marginLeft: '7px'
}}
/>
)}
<Spacer />
<div className='ca-description'>
{t('learn.submit-public-url')}
</div>
<Spacer />
<PrismFormatted text={notes} />
<Spacer />
<SolutionForm
challengeType={challengeType}
description={description}
onSubmit={this.handleSubmit}
updateSolutionForm={updateSolutionFormValues}
/>
)}
<Spacer />
<div className='ca-description'>
{t('learn.submit-public-url')}
</div>
<Spacer />
<PrismFormatted text={notes} />
<Spacer />
<SolutionForm
challengeType={challengeType}
description={description}
onSubmit={this.handleSubmit}
updateSolutionForm={updateSolutionFormValues}
/>
</>
)}
</>
)}
<ProjectToolPanel />
<br />
<Spacer />
+31 -5
View File
@@ -90,13 +90,13 @@
"husky": "8.0.2",
"jest": "27.5.1",
"js-yaml": "3.14.1",
"lint-staged": "13.1.0",
"lint-staged": "^13.1.0",
"lodash": "4.17.21",
"markdownlint": "0.26.2",
"mock-fs": "5.2.0",
"npm-run-all": "4.1.5",
"ora": "5.4.1",
"prettier": "2.7.1",
"prettier": "^2.8.0",
"prismjs": "1.29.0",
"process": "0.11.10",
"rimraf": "3.0.2",
@@ -41697,8 +41697,9 @@
}
},
"node_modules/prettier": {
"version": "2.7.1",
"license": "MIT",
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.0.tgz",
"integrity": "sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==",
"bin": {
"prettier": "bin-prettier.js"
},
@@ -53902,6 +53903,21 @@
"npm": ">=8"
}
},
"tools/challenge-helper-scripts/node_modules/prettier": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz",
"integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==",
"dev": true,
"bin": {
"prettier": "bin-prettier.js"
},
"engines": {
"node": ">=10.13.0"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"tools/challenge-parser": {
"name": "@freecodecamp/challenge-parser",
"version": "0.0.1",
@@ -56298,6 +56314,14 @@
"prettier": "2.7.1",
"ts-node": "10.9.1",
"typescript": "4.9.3"
},
"dependencies": {
"prettier": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz",
"integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==",
"dev": true
}
}
},
"@freecodecamp/curriculum-helpers": {
@@ -82171,7 +82195,9 @@
"version": "2.0.0"
},
"prettier": {
"version": "2.7.1"
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.0.tgz",
"integrity": "sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA=="
},
"pretty-bytes": {
"version": "5.6.0"
+2 -2
View File
@@ -178,13 +178,13 @@
"husky": "8.0.2",
"jest": "27.5.1",
"js-yaml": "3.14.1",
"lint-staged": "13.1.0",
"lint-staged": "^13.1.0",
"lodash": "4.17.21",
"markdownlint": "0.26.2",
"mock-fs": "5.2.0",
"npm-run-all": "4.1.5",
"ora": "5.4.1",
"prettier": "2.7.1",
"prettier": "^2.8.0",
"prismjs": "1.29.0",
"process": "0.11.10",
"rimraf": "3.0.2",
+1
View File
@@ -5,6 +5,7 @@ import linksObject from '../../../client/i18n/locales/english/links.json';
import metaObject from '../../../client/i18n/locales/english/meta-tags.json';
import motivationObject from '../../../client/i18n/locales/english/motivation.json';
import translationsObject from '../../../client/i18n/locales/english/translations.json';
// If this trending.json is missing, most likely the download-trending script failed.
import trendingObject from '../../../client/i18n/locales/english/trending.json';
/**