diff --git a/.vscode/settings.json b/.vscode/settings.json index 3fef70a..7ef87ee 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,5 +10,8 @@ "jsonc", "typescript", "typescriptreact" - ] + ], + "files.associations": { + "turbo.json": "jsonc" + } } diff --git a/bun.lockb b/bun.lockb index 81e1a08..714aade 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/internals/eslint-config/source/index.ts b/internals/eslint-config/source/index.ts index 660849f..69f2cb5 100644 --- a/internals/eslint-config/source/index.ts +++ b/internals/eslint-config/source/index.ts @@ -20,6 +20,7 @@ export default { reportUnusedDisableDirectives: 'error', }, rules: { + '@typescript-eslint/consistent-type-definitions': ['warn', 'type'], '@typescript-eslint/no-unused-vars': [ 'warn', { @@ -37,7 +38,7 @@ export default { json: tseslint.config( { files: ['**/*.json'], - ignores: ['**/tsconfig*.json'], + ignores: ['**/tsconfig*.json', '**/turbo.json'], languageOptions: { parser: jsoncEslintParser, }, @@ -61,7 +62,7 @@ export default { }, }, { - files: ['**/tsconfig*.json'], + files: ['**/tsconfig*.json', '**/turbo.json'], languageOptions: { parser: jsoncEslintParser, }, diff --git a/internals/eslint-config/turbo.json b/internals/eslint-config/turbo.json index 881bce0..ea37ffb 100644 --- a/internals/eslint-config/turbo.json +++ b/internals/eslint-config/turbo.json @@ -4,7 +4,6 @@ "pipeline": { "build": { "inputs": ["./scripts/**", "./source/**", "tsconfig.*"], - "outputMode": "new-only", "outputs": ["./dist/**"] } } diff --git a/internals/fake-root/turbo.json b/internals/fake-root/turbo.json index dc3b68d..089407a 100644 --- a/internals/fake-root/turbo.json +++ b/internals/fake-root/turbo.json @@ -4,47 +4,28 @@ "pipeline": { "check:eslint": { "inputs": [ - "../../**/*.{cjs,js,mjs,json,mjs,mts,ts}", - "!../../internals/**/*", - "!../../packages/**/*", + "../../*.{cjs,js,mjs,json,mjs,mts,ts}", + "../../.vscode/**/*", "../../eslint.config.mjs" - ], - "outputMode": "new-only", - "outputs": ["./dist/**"] + ] }, - "check:prettier": { + "check:knip": { "inputs": [ - "../../**/*.{cjs,js,mjs,json,mjs,mts,ts}", - "!../../packages/**/*", - "../../eslint.config.mjs" - ], - "outputMode": "new-only", - "outputs": ["./dist/**"] + "../../internals/*/scripts/**/*", + "../../internals/*/source/**/*", + "../../knip.json", + "../../packages/*/scripts/**/*", + "../../packages/*/source/**/*" + ] + }, + "check:prettier": { + "inputs": ["../../*.{cjs,js,mjs,json,mjs,mts,ts}", "../../.vscode/**/*"] }, - "download": {}, "fix:eslint": { - "inputs": [ - "../../**/*.{cjs,js,mjs,json,mjs,mts,ts}", - "!../../internals/**/*", - "!../../packages/**/*", - "../../eslint.config.mjs" - ], - "outputMode": "new-only", - "outputs": ["./dist/**"] + "inputs": ["../../*.{cjs,js,mjs,json,mjs,mts,ts}", "../../.vscode/**/*"] }, "fix:prettier": { - "inputs": [ - "../../**/*.{cjs,js,mjs,json,mjs,mts,ts}", - "!../../packages/**/*", - "../../eslint.config.mjs" - ], - "outputMode": "new-only", - "outputs": ["./dist/**"] - }, - "watch": { - "cache": false, - "dependsOn": ["^build", "download"], - "persistent": true + "inputs": ["../../*.{cjs,js,mjs,json,mjs,mts,ts}", "../../.vscode/**/*"] } } } diff --git a/knip.json b/knip.json index beef2c7..a76b8f0 100644 --- a/knip.json +++ b/knip.json @@ -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"], diff --git a/package.json b/package.json index 1c81bd9..0493442 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "devDependencies": { + "@arethetypeswrong/cli": "^0.15.3", "@skyblock-finance/eslint-config": "*", - "@types/bun": "latest", "eslint": "^9.0.0", "knip": "^5.9.4", "nodemon": "^3.1.0", @@ -20,6 +20,7 @@ "scripts": { "build": "turbo run build", "check": "turbo run check", + "check:arethetypeswrong": "turbo run check:arethetypeswrong", "check:eslint": "turbo run check:eslint", "check:knip": "turbo run check:knip", "check:prettier": "turbo run check:prettier", diff --git a/packages/schemas/package.json b/packages/schemas/package.json index 089078d..03cc32d 100644 --- a/packages/schemas/package.json +++ b/packages/schemas/package.json @@ -6,9 +6,9 @@ "zod": "^3.22.4" }, "devDependencies": { + "@types/bun": "latest", "@types/json-stable-stringify": "^1.0.36", "@types/lodash": "^4.14.188", - "@types/node": "^18.11.9", "json-stable-stringify": "^1.1.1", "lodash": "^4.17.21", "tslog": "^4.9.2" @@ -34,6 +34,7 @@ }, "scripts": { "build": "rm -rf dist && tsc --build", + "check:arethetypeswrong": "bun --bun run attw --pack .", "check:eslint": "bun run eslint --max-warnings=0 .", "check:prettier": "bun --bun run --cwd ../.. prettier --check packages/schemas", "check:publint": "bun --bun run publint", diff --git a/packages/schemas/scripts/download-data.ts b/packages/schemas/scripts/download-data.ts index 853cf9e..4cb6550 100644 --- a/packages/schemas/scripts/download-data.ts +++ b/packages/schemas/scripts/download-data.ts @@ -6,7 +6,7 @@ import { Logger } from 'tslog' export const log = new Logger() -interface Common { +type Common = { name: string } diff --git a/packages/schemas/turbo.json b/packages/schemas/turbo.json index 6b706fd..8481fe4 100644 --- a/packages/schemas/turbo.json +++ b/packages/schemas/turbo.json @@ -4,7 +4,6 @@ "pipeline": { "build": { "inputs": ["./source/**", "tsconfig.json"], - "outputMode": "new-only", "outputs": ["./dist/**"] }, "download": { diff --git a/turbo.json b/turbo.json index 3b24f97..9eea9e1 100644 --- a/turbo.json +++ b/turbo.json @@ -3,16 +3,23 @@ "globalDependencies": ["bun.lockb"], "pipeline": { "build": { - "dependsOn": ["^build"] + "dependsOn": ["^build"], + "outputMode": "new-only" }, "check": { "dependsOn": [ + "check:arethetypeswrong", "check:eslint", "check:knip", "check:prettier", "check:publint" ] }, + "check:arethetypeswrong": { + "dependsOn": ["build"], + "inputs": ["dist/**", "package.json"], + "outputMode": "new-only" + }, "check:eslint": { "dependsOn": ["@skyblock-finance/eslint-config#build"], "inputs": [