Skip to content

Commit

Permalink
chore(turbo): Fix Knip, Simplify turbo.json, Associate turbo.json wit…
Browse files Browse the repository at this point in the history
…h JSONC
  • Loading branch information
FlorianWendelborn committed Apr 20, 2024
1 parent 97f901c commit ea04ed7
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 18 deletions.
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
"jsonc",
"typescript",
"typescriptreact"
]
],
"files.associations": {
"turbo.json": "jsonc"
}
}
4 changes: 2 additions & 2 deletions internals/eslint-config/source/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default {
json: tseslint.config(
{
files: ['**/*.json'],
ignores: ['**/tsconfig*.json'],
ignores: ['**/tsconfig*.json', '**/turbo.json'],
languageOptions: {
parser: jsoncEslintParser,
},
Expand All @@ -62,7 +62,7 @@ export default {
},
},
{
files: ['**/tsconfig*.json'],
files: ['**/tsconfig*.json', '**/turbo.json'],
languageOptions: {
parser: jsoncEslintParser,
},
Expand Down
1 change: 0 additions & 1 deletion internals/eslint-config/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"pipeline": {
"build": {
"inputs": ["./scripts/**", "./source/**", "tsconfig.*"],
"outputMode": "new-only",
"outputs": ["./dist/**"]
}
}
Expand Down
25 changes: 13 additions & 12 deletions internals/fake-root/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,27 @@
"check:eslint": {
"inputs": [
"../../*.{cjs,js,mjs,json,mjs,mts,ts}",
"../../.vscode/**/*",
"../../eslint.config.mjs"
]
},
"check:knip": {
"inputs": [
"../../internals/*/scripts/**/*",
"../../internals/*/source/**/*",
"../../knip.json",
"../../packages/*/scripts/**/*",
"../../packages/*/source/**/*"
]
},
"check:prettier": {
"inputs": ["../../*.{cjs,js,mjs,json,mjs,mts,ts}"],
"outputMode": "new-only"
"inputs": ["../../*.{cjs,js,mjs,json,mjs,mts,ts}", "../../.vscode/**/*"]
},
"download": {},
"fix:eslint": {
"inputs": ["../../*.{cjs,js,mjs,json,mjs,mts,ts}"],
"outputMode": "new-only"
"inputs": ["../../*.{cjs,js,mjs,json,mjs,mts,ts}", "../../.vscode/**/*"]
},
"fix:prettier": {
"inputs": ["../../*.{cjs,js,mjs,json,mjs,mts,ts}"],
"outputMode": "new-only"
},
"watch": {
"cache": false,
"dependsOn": ["^build", "download"],
"persistent": true
"inputs": ["../../*.{cjs,js,mjs,json,mjs,mts,ts}", "../../.vscode/**/*"]
}
}
}
1 change: 1 addition & 0 deletions knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$schema": "https://unpkg.com/knip@5/schema.json",
"ignore": ["dist/**"],
"ignoreBinaries": ["prettier", "publint"],
"ignoreDependencies": ["@arethetypeswrong/cli"],
"workspaces": {
"internals/*": {
"entry": ["scripts/*.ts", "source/index.ts"],
Expand Down
1 change: 0 additions & 1 deletion packages/schemas/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"pipeline": {
"build": {
"inputs": ["./source/**", "tsconfig.json"],
"outputMode": "new-only",
"outputs": ["./dist/**"]
},
"download": {
Expand Down
3 changes: 2 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"globalDependencies": ["bun.lockb"],
"pipeline": {
"build": {
"dependsOn": ["^build"]
"dependsOn": ["^build"],
"outputMode": "new-only"
},
"check": {
"dependsOn": [
Expand Down

0 comments on commit ea04ed7

Please sign in to comment.