mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-19 10:07:46 -05:00
fix: format + lint commands (#64256)
This commit is contained in:
committed by
GitHub
parent
61f3363f23
commit
9c40394914
2
.github/workflows/node.js-tests.yml
vendored
2
.github/workflows/node.js-tests.yml
vendored
@@ -68,7 +68,7 @@ jobs:
|
|||||||
- name: Lint Source Files
|
- name: Lint Source Files
|
||||||
run: |
|
run: |
|
||||||
echo pnpm version $(pnpm -v)
|
echo pnpm version $(pnpm -v)
|
||||||
pnpm turbo lint
|
pnpm lint
|
||||||
|
|
||||||
# DONT REMOVE THIS JOB.
|
# DONT REMOVE THIS JOB.
|
||||||
# TODO: Refactor and use re-usable workflow and shared artifacts
|
# TODO: Refactor and use re-usable workflow and shared artifacts
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
babelrcRoots: ['./client']
|
|
||||||
};
|
|
||||||
@@ -1,13 +1,15 @@
|
|||||||
import { configTypeChecked } from '@freecodecamp/eslint-config/base';
|
import { configTypeChecked } from '@freecodecamp/eslint-config/base';
|
||||||
import { defineConfig } from 'eslint/config';
|
import { defineConfig, globalIgnores } from 'eslint/config';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig(
|
||||||
// include all in root dir, but not subdirs:
|
// include all in root dir, but not subdirs:
|
||||||
files: ['*.js', '*.ts', '*.mjs'],
|
globalIgnores(['**/*', '!*.js', '!*.ts', '!*.mjs']),
|
||||||
extends: [configTypeChecked],
|
{
|
||||||
rules: {
|
extends: [configTypeChecked],
|
||||||
'@typescript-eslint/no-unsafe-member-access': 'off',
|
rules: {
|
||||||
'@typescript-eslint/no-unsafe-call': 'off',
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
||||||
'@typescript-eslint/no-unsafe-assignment': 'off'
|
'@typescript-eslint/no-unsafe-call': 'off',
|
||||||
|
'@typescript-eslint/no-unsafe-assignment': 'off'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
|
|||||||
@@ -45,12 +45,14 @@
|
|||||||
"develop:client": "cd ./client && pnpm run develop",
|
"develop:client": "cd ./client && pnpm run develop",
|
||||||
"develop:api": "cd ./api && pnpm run develop",
|
"develop:api": "cd ./api && pnpm run develop",
|
||||||
"format": "run-s format:eslint format:prettier",
|
"format": "run-s format:eslint format:prettier",
|
||||||
"format:eslint": "eslint --fix",
|
"format:eslint": "turbo lint -- --fix",
|
||||||
"format:prettier": "prettier --write .",
|
"format:prettier": "prettier --write .",
|
||||||
"i18n-sync": "tsx ./tools/scripts/sync-i18n.ts",
|
"i18n-sync": "tsx ./tools/scripts/sync-i18n.ts",
|
||||||
"knip": "npx -y knip@5 --include files",
|
"knip": "npx -y knip@5 --include files",
|
||||||
"knip:all": "npx -y knip@5 ",
|
"knip:all": "npx -y knip@5 ",
|
||||||
"lint": "pnpm npm-run-all lint:*",
|
"lint-root": "pnpm npm-run-all lint:*",
|
||||||
|
"lint": "turbo lint && turbo lint-root",
|
||||||
|
"lint:eslint": "eslint --max-warnings 0",
|
||||||
"lint:challenges": "cd ./curriculum && pnpm run lint-challenges",
|
"lint:challenges": "cd ./curriculum && pnpm run lint-challenges",
|
||||||
"lint:ts": "tsc && tsc -p shared && tsc -p api && tsc -p client && tsc -p curriculum && tsc -p e2e && tsc -p tools/challenge-helper-scripts",
|
"lint:ts": "tsc && tsc -p shared && tsc -p api && tsc -p client && tsc -p curriculum && tsc -p e2e && tsc -p tools/challenge-helper-scripts",
|
||||||
"lint:prettier": "prettier --list-different .",
|
"lint:prettier": "prettier --list-different .",
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"$TURBO_ROOT$/client/i18n/locales/english/*"
|
"$TURBO_ROOT$/client/i18n/locales/english/*"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"//#lint": {
|
"//#lint-root": {
|
||||||
"dependsOn": [
|
"dependsOn": [
|
||||||
"@freecodecamp/shared#compile",
|
"@freecodecamp/shared#compile",
|
||||||
"@freecodecamp/curriculum#build"
|
"@freecodecamp/curriculum#build"
|
||||||
|
|||||||
Reference in New Issue
Block a user