chore: use turborepo for type checking (#64455)

This commit is contained in:
Oliver Eyton-Williams
2026-01-19 14:35:27 +01:00
committed by GitHub
parent 2ce0ff1560
commit 608afa8a39
17 changed files with 245 additions and 443 deletions
+3
View File
@@ -46,6 +46,7 @@
"@total-typescript/ts-reset": "0.6.1",
"@types/jsonwebtoken": "9.0.5",
"@types/lodash-es": "^4.17.12",
"@types/node": "^24.10.2",
"@types/nodemailer": "6.4.21",
"@types/supertest": "2.0.16",
"@types/validator": "13.15.10",
@@ -57,6 +58,7 @@
"prisma": "6.19.1",
"supertest": "6.3.3",
"tsx": "4.21.0",
"typescript": "5.9.3",
"vitest": "^3.2.4"
},
"engines": {
@@ -82,6 +84,7 @@
"test": "vitest run",
"test:watch": "vitest",
"test:ui": "vitest --ui",
"type-check": "tsc --noEmit",
"prisma": "dotenv -e ../.env prisma",
"postinstall": "prisma generate",
"exam-env:generate": "tsx tools/exam-environment/generate/index.ts",
+3 -2
View File
@@ -35,7 +35,8 @@
"serve-ci": "serve -l 8000 -c serve.json public",
"prestand-alone": "pnpm run prebuild",
"stand-alone": "gatsby develop",
"test": "vitest"
"test": "vitest",
"type-check": "tsc --noEmit"
},
"dependencies": {
"@babel/plugin-proposal-export-default-from": "7.23.3",
@@ -129,7 +130,7 @@
"store": "2.0.12",
"stream-browserify": "3.0.0",
"tone": "14.7.77",
"typescript": "5.2.2",
"typescript": "5.9.3",
"util": "0.12.5",
"uuid": "8.3.2",
"validator": "13.11.0",
+3 -3
View File
@@ -63,7 +63,7 @@ describe('VersionEndpoint', () => {
const jsonText = preElement?.textContent;
expect(jsonText).toBeTruthy();
const parsed = JSON.parse(jsonText!) as VersionData;
const parsed = JSON.parse(jsonText) as VersionData;
expect(parsed).toHaveProperty('client');
expect(parsed).toHaveProperty('api');
expect(parsed.client).toHaveProperty('version');
@@ -83,7 +83,7 @@ describe('VersionEndpoint', () => {
const preElement = screen.getByText(/"client"/);
const jsonText = preElement?.textContent;
const parsed = JSON.parse(jsonText!) as VersionData;
const parsed = JSON.parse(jsonText) as VersionData;
expect(parsed.api.error).toBe('Network error');
});
@@ -102,7 +102,7 @@ describe('VersionEndpoint', () => {
const preElement = screen.getByText(/"client"/);
const jsonText = preElement?.textContent;
const parsed = JSON.parse(jsonText!) as VersionData;
const parsed = JSON.parse(jsonText) as VersionData;
expect(parsed.api.error).toBe('HTTP 500');
});
+2 -1
View File
@@ -21,6 +21,7 @@
"audit-challenges": "pnpm -w turbo compile && tsx ./src/challenge-auditor/index.ts",
"build": "tsx ./src/generate/build-curriculum",
"compile": "tsc",
"type-check": "tsc --noEmit",
"create-empty-steps": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/create-empty-steps",
"create-next-challenge": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/create-next-challenge",
"create-this-challenge": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/create-this-challenge",
@@ -34,7 +35,7 @@
"delete-challenge": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/delete-challenge",
"delete-task": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/delete-task",
"lint": "eslint --max-warnings 0",
"lint-challenges": "tsx --tsconfig ../tsconfig.json src/lint-localized",
"lint-challenges": "tsx src/lint-localized",
"reorder-tasks": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/reorder-tasks",
"update-challenge-order": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/update-challenge-order",
"update-step-titles": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/update-step-titles",
+4 -2
View File
@@ -4,7 +4,8 @@
"scripts": {
"lint": "eslint --max-warnings 0",
"playwright:watch": "playwright test --ui-port=0",
"playwright:run": "playwright test"
"playwright:run": "playwright test",
"type-check": "tsc --noEmit"
},
"author": "freeCodeCamp <team@freecodecamp.org>",
"license": "BSD-3-Clause",
@@ -12,6 +13,7 @@
"devDependencies": {
"@freecodecamp/eslint-config": "workspace:*",
"@freecodecamp/shared": "workspace:*",
"eslint": "^9.39.1"
"eslint": "^9.39.1",
"typescript": "5.9.3"
}
}
+2 -3
View File
@@ -50,9 +50,8 @@
"knip": "npx -y knip@5 --include files",
"knip:all": "npx -y knip@5 ",
"lint-root": "pnpm npm-run-all lint:*",
"lint": "turbo lint && turbo lint-root",
"lint": "turbo type-check && turbo lint && turbo lint-root",
"lint:challenges": "cd ./curriculum && pnpm run lint-challenges",
"lint:ts": "tsc && tsc -p packages/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:css": "stylelint '**/*.css'",
"preseed": "turbo compile",
@@ -108,7 +107,7 @@
"stylelint": "16.14.1",
"tsx": "4.19.1",
"turbo": "^2.6.1",
"typescript": "5.7.3",
"typescript": "5.9.3",
"webpack-bundle-analyzer": "4.10.1",
"yargs": "17.7.2"
},
+1 -1
View File
@@ -27,7 +27,7 @@
"eslint-plugin-react": "7.37.4",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-testing-library": "7.1.1",
"typescript": "5.7.3",
"typescript": "5.9.3",
"typescript-eslint": "^8.47.0"
}
}
+1
View File
@@ -11,6 +11,7 @@
},
"scripts": {
"test": "vitest",
"type-check": "tsc --noEmit",
"compile": "tsdown --format cjs --format esm",
"lint": "eslint --max-warnings 0"
},
+201 -412
View File
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -6,7 +6,8 @@
"scripts": {
"start": "tsx server.ts",
"postinstall": "shx cp ./sample.env ./.env",
"lint": "eslint --max-warnings 0"
"lint": "eslint --max-warnings 0",
"type-check": "tsc --noEmit"
},
"author": "freeCodeCamp",
"license": "BSD-3-Clause",
@@ -23,6 +24,6 @@
"dotenv": "16.4.5",
"eslint": "^9.39.1",
"shx": "0.3.4",
"typescript": "5.2.2"
"typescript": "5.9.3"
}
}
+3 -2
View File
@@ -8,7 +8,6 @@
"react": "17.0.2",
"react-dom": "17.0.2",
"react-router-dom": "6.18.0",
"typescript": "5.2.2",
"vite": "4.5.2"
},
"scripts": {
@@ -16,6 +15,7 @@
"build": "tsc && vite build",
"lint": "eslint --max-warnings 0",
"test": "echo \"no tests here yet\"",
"type-check": "tsc --noEmit",
"postinstall": "shx cp ./sample.env ./.env"
},
"devDependencies": {
@@ -25,6 +25,7 @@
"@types/react-dom": "17.0.19",
"@uiw/react-codemirror": "3.2.10",
"eslint": "^9.39.1",
"shx": "0.3.4"
"shx": "0.3.4",
"typescript": "5.9.3"
}
}
+3 -2
View File
@@ -25,7 +25,8 @@
"create-quiz": "tsx create-quiz",
"rename-block": "tsx rename-block",
"lint": "eslint --max-warnings 0",
"test": "vitest"
"test": "vitest",
"type-check": "tsc --noEmit"
},
"devDependencies": {
"@freecodecamp/eslint-config": "workspace:*",
@@ -40,7 +41,7 @@
"gray-matter": "4.0.3",
"inquirer": "8.2.6",
"prettier": "3.2.5",
"typescript": "5.2.2",
"typescript": "5.9.3",
"vitest": "^3.2.4"
}
}
+3 -1
View File
@@ -20,7 +20,8 @@
"main": "index.js",
"scripts": {
"lint": "eslint --max-warnings 0",
"test": "vitest"
"test": "vitest",
"type-check": "tsc --noEmit"
},
"dependencies": {
"hast-util-to-html": "7.1.3",
@@ -57,6 +58,7 @@
"devDependencies": {
"@freecodecamp/eslint-config": "workspace:*",
"eslint": "^9.39.1",
"typescript": "5.9.3",
"unist-util-select": "3.0.4",
"vitest": "^3.2.4"
}
@@ -39,7 +39,7 @@
"process": "0.11.10",
"pyodide": "^0.23.3",
"sass.js": "0.11.1",
"typescript": "5.9.2",
"typescript": "5.9.3",
"util": "0.12.5",
"webpack": "5.90.3",
"webpack-cli": "4.10.0"
+3 -2
View File
@@ -4,7 +4,8 @@
"main": "seed-daily-challenges.js",
"scripts": {
"seed-daily-challenges": "tsx seed-daily-challenges.ts",
"lint": "eslint --max-warnings 0"
"lint": "eslint --max-warnings 0",
"type-check": "tsc --noEmit"
},
"author": "",
"license": "ISC",
@@ -15,7 +16,7 @@
"eslint": "^9.39.1",
"mongodb": "6.10.0",
"tsx": "4.19.1",
"typescript": "5.8.2"
"typescript": "5.9.3"
},
"type": "module"
}
-9
View File
@@ -1,9 +0,0 @@
{
"include": [
"curriculum/*.test.ts",
"tools/challenge-editor/**/*",
"tools/scripts/**/*.ts",
"tools/daily-challenges/**/*.ts"
],
"extends": "./tsconfig-base.json"
}
+9
View File
@@ -2,6 +2,7 @@
"$schema": "https://turborepo.com/schema.json",
"tasks": {
"lint": { "dependsOn": ["compile"] },
"type-check": { "dependsOn": ["compile"] },
"@freecodecamp/client#lint": {
"dependsOn": [
"@freecodecamp/curriculum#compile",
@@ -9,6 +10,14 @@
"build:scripts"
]
},
"@freecodecamp/client#type-check": {
"dependsOn": [
"@freecodecamp/curriculum#compile",
"create:env",
"@freecodecamp/curriculum#build",
"build:scripts"
]
},
"@freecodecamp/gatsby-source-challenges#lint": {
"dependsOn": ["@freecodecamp/curriculum#compile"]
},