mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-27 02:03:44 -05:00
feat: upgrade prettier dependencies (#51830)
This commit is contained in:
@@ -103,7 +103,8 @@
|
||||
.donation-form .form-control:focus {
|
||||
border-color: #66afe9;
|
||||
outline-color: transparent;
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),
|
||||
box-shadow:
|
||||
inset 0 1px 1px rgba(0, 0, 0, 0.075),
|
||||
0 0 8px rgba(102, 175, 233, 0.6);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,8 +56,8 @@ function ProgressBar({
|
||||
}: ProgressBarProps): JSX.Element {
|
||||
const blockTitle = t(`intro:${superBlock}.blocks.${block}.title`);
|
||||
// Always false for legacy full stack, since it has no projects.
|
||||
const isCertificationProject = liveCerts.some(cert =>
|
||||
cert.projects?.some((project: { id: string }) => project.id === id)
|
||||
const isCertificationProject = liveCerts.some(
|
||||
cert => cert.projects?.some((project: { id: string }) => project.id === id)
|
||||
);
|
||||
|
||||
const totalChallengesInBlock = currentBlockIds?.length ?? 0;
|
||||
|
||||
@@ -80,7 +80,8 @@
|
||||
|
||||
@font-face {
|
||||
font-family: 'Hack-ZeroSlash';
|
||||
src: url('../../../static/fonts/hack-zeroslash/Hack-ZeroSlash-Regular.woff2')
|
||||
src:
|
||||
url('../../../static/fonts/hack-zeroslash/Hack-ZeroSlash-Regular.woff2')
|
||||
format('woff2'),
|
||||
url('../../../static/fonts/hack-zeroslash/Hack-ZeroSlash-Regular.woff')
|
||||
format('woff');
|
||||
@@ -88,7 +89,8 @@
|
||||
|
||||
@font-face {
|
||||
font-family: 'Hack-ZeroSlash';
|
||||
src: url('../../../static/fonts/hack-zeroslash/Hack-ZeroSlash-Bold.woff2')
|
||||
src:
|
||||
url('../../../static/fonts/hack-zeroslash/Hack-ZeroSlash-Bold.woff2')
|
||||
format('woff2'),
|
||||
url('../../../static/fonts/hack-zeroslash/Hack-ZeroSlash-Bold.woff')
|
||||
format('woff');
|
||||
@@ -97,7 +99,8 @@
|
||||
|
||||
@font-face {
|
||||
font-family: 'Hack-ZeroSlash';
|
||||
src: url('../../../static/fonts/hack-zeroslash/Hack-ZeroSlash-Italic.woff2')
|
||||
src:
|
||||
url('../../../static/fonts/hack-zeroslash/Hack-ZeroSlash-Italic.woff2')
|
||||
format('woff2'),
|
||||
url('../../../static/fonts/hack-zeroslash/Hack-ZeroSlash-Italic.woff')
|
||||
format('woff');
|
||||
|
||||
@@ -115,10 +115,9 @@ if (FREECODECAMP_NODE_ENV !== 'development') {
|
||||
checkCurriculumLocale();
|
||||
if (fs.existsSync(`${configPath}/env.json`)) {
|
||||
/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-unsafe-assignment */
|
||||
const {
|
||||
showNewCurriculum,
|
||||
showUpcomingChanges
|
||||
} = require(`${configPath}/env.json`);
|
||||
const { showNewCurriculum, showUpcomingChanges } = require(
|
||||
`${configPath}/env.json`
|
||||
);
|
||||
/* eslint-enable @typescript-eslint/no-var-requires, @typescript-eslint/no-unsafe-assignment */
|
||||
if (
|
||||
env['showUpcomingChanges'] !== showUpcomingChanges ||
|
||||
|
||||
@@ -43,17 +43,13 @@ function createCommentMap(dictionariesDir) {
|
||||
);
|
||||
|
||||
// get the english dicts
|
||||
const COMMENTS_TO_TRANSLATE = require(path.resolve(
|
||||
dictionariesDir,
|
||||
'english',
|
||||
'comments.json'
|
||||
));
|
||||
const COMMENTS_TO_TRANSLATE = require(
|
||||
path.resolve(dictionariesDir, 'english', 'comments.json')
|
||||
);
|
||||
|
||||
const COMMENTS_TO_NOT_TRANSLATE = require(path.resolve(
|
||||
dictionariesDir,
|
||||
'english',
|
||||
'comments-to-not-translate'
|
||||
));
|
||||
const COMMENTS_TO_NOT_TRANSLATE = require(
|
||||
path.resolve(dictionariesDir, 'english', 'comments-to-not-translate')
|
||||
);
|
||||
|
||||
// map from english comment text to translations
|
||||
const translatedCommentMap = Object.entries(COMMENTS_TO_TRANSLATE).reduce(
|
||||
@@ -351,10 +347,9 @@ ${getFullPath('english', filePath)}
|
||||
async function createChallenge(filePath, maybeMeta) {
|
||||
const meta = maybeMeta
|
||||
? maybeMeta
|
||||
: require(path.resolve(
|
||||
META_DIR,
|
||||
`${getBlockNameFromPath(filePath)}/meta.json`
|
||||
));
|
||||
: require(
|
||||
path.resolve(META_DIR, `${getBlockNameFromPath(filePath)}/meta.json`)
|
||||
);
|
||||
|
||||
await validate(filePath, meta.superBlock);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
"cypress-plugin-tab": "1.0.5",
|
||||
"docsify-cli": "4.4.4",
|
||||
"eslint": "8.50.0",
|
||||
"eslint-config-prettier": "8.10.0",
|
||||
"eslint-config-prettier": "9.0.0",
|
||||
"eslint-import-resolver-typescript": "^3.5.5",
|
||||
"eslint-plugin-filenames-simple": "0.8.0",
|
||||
"eslint-plugin-import": "2.28.1",
|
||||
@@ -140,7 +140,7 @@
|
||||
"markdownlint": "0.31.0",
|
||||
"mock-fs": "5.2.0",
|
||||
"npm-run-all": "4.1.5",
|
||||
"prettier": "^2.8.0",
|
||||
"prettier": "3.0.3",
|
||||
"prismjs": "1.29.0",
|
||||
"process": "0.11.10",
|
||||
"start-server-and-test": "1.15.5",
|
||||
|
||||
692
pnpm-lock.yaml
generated
692
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/codemirror": "5.60.10",
|
||||
"@types/prettier": "^2.7.3",
|
||||
"@types/react": "16.14.48",
|
||||
"@types/react-dom": "^16.9.17",
|
||||
"@uiw/react-codemirror": "3.2.10",
|
||||
|
||||
@@ -2,10 +2,9 @@ import { existsSync } from 'fs';
|
||||
import fs from 'fs/promises';
|
||||
import path from 'path';
|
||||
import { prompt } from 'inquirer';
|
||||
|
||||
import { format } from 'prettier';
|
||||
|
||||
import ObjectID from 'bson-objectid';
|
||||
|
||||
import { SuperBlocks } from '../../shared/config/superblocks';
|
||||
import { createStepFile } from './utils';
|
||||
import { getSuperBlockSubPath } from './fs-utils';
|
||||
@@ -79,7 +78,7 @@ async function updateIntroJson(
|
||||
void withTrace(
|
||||
fs.writeFile,
|
||||
introJsonPath,
|
||||
format(JSON.stringify(newIntro), { parser: 'json' })
|
||||
await format(JSON.stringify(newIntro), { parser: 'json' })
|
||||
);
|
||||
}
|
||||
|
||||
@@ -108,7 +107,7 @@ async function createMetaJson(
|
||||
void withTrace(
|
||||
fs.writeFile,
|
||||
path.resolve(metaDir, `${block}/meta.json`),
|
||||
format(JSON.stringify(newMeta), { parser: 'json' })
|
||||
await format(JSON.stringify(newMeta), { parser: 'json' })
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"glob": "^8.1.0",
|
||||
"gray-matter": "4.0.3",
|
||||
"inquirer": "8.2.6",
|
||||
"prettier": "2.8.8",
|
||||
"prettier": "3.0.3",
|
||||
"ts-node": "10.9.1",
|
||||
"typescript": "4.9.5"
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ const redirect = (pathSegments: PathSegments) => ({
|
||||
});
|
||||
|
||||
// DRY this with [id]'s version
|
||||
const fourOhFour = () => ({ notFound: true, revalidate: 10 } as const);
|
||||
const fourOhFour = () => ({ notFound: true, revalidate: 10 }) as const;
|
||||
|
||||
// DRY this with [id]'s version
|
||||
const pathExists = (pathSegments: PathSegments, params?: ParsedUrlQuery) => {
|
||||
|
||||
@@ -45,7 +45,7 @@ const getProps = (
|
||||
challengeData: getChallengeData(curriculum, pathSegments)
|
||||
});
|
||||
// DRY this with [blockOrId]'s version
|
||||
const fourOhFour = () => ({ notFound: true, revalidate: 10 } as const);
|
||||
const fourOhFour = () => ({ notFound: true, revalidate: 10 }) as const;
|
||||
|
||||
// DRY this with [blockOrId]'s version
|
||||
const pathExists = (
|
||||
|
||||
Reference in New Issue
Block a user