fix: format + lint commands (#64256)

This commit is contained in:
Oliver Eyton-Williams
2025-12-02 13:17:23 +01:00
committed by GitHub
parent 61f3363f23
commit 9c40394914
6 changed files with 17 additions and 16 deletions

View File

@@ -68,7 +68,7 @@ jobs:
- name: Lint Source Files
run: |
echo pnpm version $(pnpm -v)
pnpm turbo lint
pnpm lint
# DONT REMOVE THIS JOB.
# TODO: Refactor and use re-usable workflow and shared artifacts

View File

@@ -1,3 +0,0 @@
module.exports = {
babelrcRoots: ['./client']
};

View File

@@ -1,13 +1,15 @@
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:
files: ['*.js', '*.ts', '*.mjs'],
globalIgnores(['**/*', '!*.js', '!*.ts', '!*.mjs']),
{
extends: [configTypeChecked],
rules: {
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off'
}
});
}
);

View File

@@ -45,12 +45,14 @@
"develop:client": "cd ./client && pnpm run develop",
"develop:api": "cd ./api && pnpm run develop",
"format": "run-s format:eslint format:prettier",
"format:eslint": "eslint --fix",
"format:eslint": "turbo lint -- --fix",
"format:prettier": "prettier --write .",
"i18n-sync": "tsx ./tools/scripts/sync-i18n.ts",
"knip": "npx -y knip@5 --include files",
"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: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 .",

View File

@@ -21,7 +21,7 @@
"$TURBO_ROOT$/client/i18n/locales/english/*"
]
},
"//#lint": {
"//#lint-root": {
"dependsOn": [
"@freecodecamp/shared#compile",
"@freecodecamp/curriculum#build"