diff --git a/.github/workflows/node.js-tests.yml b/.github/workflows/node.js-tests.yml index 2922fdc41b0..383d3e2605f 100644 --- a/.github/workflows/node.js-tests.yml +++ b/.github/workflows/node.js-tests.yml @@ -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 diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index 682ff094010..00000000000 --- a/babel.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - babelrcRoots: ['./client'] -}; diff --git a/e2e/eslint.config.js b/e2e/eslint.config.mjs similarity index 100% rename from e2e/eslint.config.js rename to e2e/eslint.config.mjs diff --git a/eslint.config.mjs b/eslint.config.mjs index 876f0cb4a97..ddac8f6a661 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -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'], - extends: [configTypeChecked], - rules: { - '@typescript-eslint/no-unsafe-member-access': 'off', - '@typescript-eslint/no-unsafe-call': 'off', - '@typescript-eslint/no-unsafe-assignment': 'off' + 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' + } } -}); +); diff --git a/package.json b/package.json index 3040d3c4667..b8b364bd280 100644 --- a/package.json +++ b/package.json @@ -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 .", diff --git a/turbo.json b/turbo.json index 5537f2fe168..06ddb3679e2 100644 --- a/turbo.json +++ b/turbo.json @@ -21,7 +21,7 @@ "$TURBO_ROOT$/client/i18n/locales/english/*" ] }, - "//#lint": { + "//#lint-root": { "dependsOn": [ "@freecodecamp/shared#compile", "@freecodecamp/curriculum#build"