diff --git a/.changeset/fifty-aliens-rhyme.md b/.changeset/fifty-aliens-rhyme.md new file mode 100644 index 000000000..bd9418aa3 --- /dev/null +++ b/.changeset/fifty-aliens-rhyme.md @@ -0,0 +1,10 @@ +--- +'@hono/eslint-config': major +--- + +Includes `typescript-eslint` presets for typed linting + +- [`strict-type-checked`](https://typescript-eslint.io/users/configs#strict-type-checked) +- [`stylistic-type-checked`](https://typescript-eslint.io/users/configs#stylistic-type-checked) + +See [Linting with Type Information](https://typescript-eslint.io/getting-started/typed-linting) for more information diff --git a/eslint.config.mjs b/eslint.config.mjs index 156bab4ec..224c89ba7 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,6 +1,62 @@ import baseConfig from '@hono/eslint-config' import { defineConfig, globalIgnores } from 'eslint/config' -export default defineConfig(globalIgnores(['.yarn', '**/dist']), { +export default defineConfig(globalIgnores(['.yarn', '**/coverage', '**/dist']), { extends: baseConfig, + + languageOptions: { + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + }, + }, + + linterOptions: { + reportUnusedDisableDirectives: 'error', + reportUnusedInlineConfigs: 'error', + }, + + rules: { + '@typescript-eslint/array-type': 'off', + '@typescript-eslint/await-thenable': 'off', + '@typescript-eslint/consistent-indexed-object-style': 'off', + '@typescript-eslint/consistent-type-definitions': 'off', + '@typescript-eslint/dot-notation': 'off', + '@typescript-eslint/no-base-to-string': 'off', + '@typescript-eslint/no-confusing-void-expression': 'off', + '@typescript-eslint/no-deprecated': 'off', + '@typescript-eslint/no-duplicate-type-constituents': 'off', + '@typescript-eslint/no-dynamic-delete': 'off', + '@typescript-eslint/no-floating-promises': 'off', + '@typescript-eslint/no-invalid-void-type': 'off', + '@typescript-eslint/no-misused-promises': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/no-redundant-type-constituents': 'off', + '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off', + '@typescript-eslint/no-unnecessary-condition': 'off', + '@typescript-eslint/no-unnecessary-template-expression': 'off', + '@typescript-eslint/no-unnecessary-type-arguments': 'off', + '@typescript-eslint/no-unnecessary-type-assertion': 'off', + '@typescript-eslint/no-unnecessary-type-parameters': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-enum-comparison': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/no-useless-constructor': 'off', + '@typescript-eslint/non-nullable-type-assertion-style': 'off', + '@typescript-eslint/only-throw-error': 'off', + '@typescript-eslint/prefer-function-type': 'off', + '@typescript-eslint/prefer-includes': 'off', + '@typescript-eslint/prefer-nullish-coalescing': 'off', + '@typescript-eslint/prefer-optional-chain': 'off', + '@typescript-eslint/prefer-regexp-exec': 'off', + '@typescript-eslint/prefer-return-this-type': 'off', + '@typescript-eslint/require-await': 'off', + '@typescript-eslint/restrict-plus-operands': 'off', + '@typescript-eslint/restrict-template-expressions': 'off', + '@typescript-eslint/unbound-method': 'off', + '@typescript-eslint/unified-signatures': 'off', + }, }) diff --git a/package.json b/package.json index 0267502f1..b3d109887 100644 --- a/package.json +++ b/package.json @@ -32,15 +32,13 @@ "@cloudflare/workers-types": "^4.20230307.0", "@hono/eslint-config": "workspace:*", "@ryoppippi/unplugin-typia": "^1.2.0", + "@types/bun": "^1.0.0", "@types/node": "^20.17.28", "@types/ws": "^8.18.0", - "@typescript-eslint/eslint-plugin": "^8.7.0", - "@typescript-eslint/parser": "^8.7.0", "@vitest/coverage-istanbul": "^3.0.8", - "eslint": "^9.17.0", + "eslint": "^9.23.0", "hono": "^4.7.5", - "npm-run-all2": "^6.2.2", - "prettier": "^2.7.1", + "prettier": "^3.5.3", "tsup": "^8.4.0", "typescript": "^5.8.2", "vitest": "^3.0.8" diff --git a/packages/ajv-validator/tsconfig.spec.json b/packages/ajv-validator/tsconfig.spec.json index c3312ce13..d6bae88ea 100644 --- a/packages/ajv-validator/tsconfig.spec.json +++ b/packages/ajv-validator/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/ajv-validator", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/arktype-validator/tsconfig.spec.json b/packages/arktype-validator/tsconfig.spec.json index 6313653f3..866bb7678 100644 --- a/packages/arktype-validator/tsconfig.spec.json +++ b/packages/arktype-validator/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/arktype-validator", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/auth-js/tsconfig.spec.json b/packages/auth-js/tsconfig.spec.json index 5abc897ae..b8e78e022 100644 --- a/packages/auth-js/tsconfig.spec.json +++ b/packages/auth-js/tsconfig.spec.json @@ -5,7 +5,7 @@ "noEmit": true, "jsx": "react" }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/bun-transpiler/package.json b/packages/bun-transpiler/package.json index fdb3c9c5c..3ed3dfc05 100644 --- a/packages/bun-transpiler/package.json +++ b/packages/bun-transpiler/package.json @@ -44,7 +44,6 @@ }, "devDependencies": { "@arethetypeswrong/cli": "^0.17.4", - "@types/bun": "^1.0.0", "publint": "^0.3.9", "tsup": "^8.4.0", "typescript": "^5.8.2", diff --git a/packages/bun-transpiler/tsconfig.spec.json b/packages/bun-transpiler/tsconfig.spec.json index b97b42c90..4781ea36f 100644 --- a/packages/bun-transpiler/tsconfig.spec.json +++ b/packages/bun-transpiler/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/bun-transpiler", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/casbin/tsconfig.spec.json b/packages/casbin/tsconfig.spec.json index 8182bfb12..0551d0915 100644 --- a/packages/casbin/tsconfig.spec.json +++ b/packages/casbin/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/casbin", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts", "vitest.setup.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/class-validator/tsconfig.spec.json b/packages/class-validator/tsconfig.spec.json index c4c383492..cc8ed6b7d 100644 --- a/packages/class-validator/tsconfig.spec.json +++ b/packages/class-validator/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/class-validator", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/clerk-auth/tsconfig.spec.json b/packages/clerk-auth/tsconfig.spec.json index 3cbbc47f4..087e77e63 100644 --- a/packages/clerk-auth/tsconfig.spec.json +++ b/packages/clerk-auth/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/clerk-auth", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/cloudflare-access/tsconfig.spec.json b/packages/cloudflare-access/tsconfig.spec.json index d5c39ccb4..c7a3afff3 100644 --- a/packages/cloudflare-access/tsconfig.spec.json +++ b/packages/cloudflare-access/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/cloudflare-access", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/conform-validator/tsconfig.spec.json b/packages/conform-validator/tsconfig.spec.json index 788532d18..2ca1fd9f8 100644 --- a/packages/conform-validator/tsconfig.spec.json +++ b/packages/conform-validator/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/conform-validator", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/effect-validator/tsconfig.spec.json b/packages/effect-validator/tsconfig.spec.json index b99593c66..ebe7f0849 100644 --- a/packages/effect-validator/tsconfig.spec.json +++ b/packages/effect-validator/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/effect-validator", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/esbuild-transpiler/tsconfig.spec.json b/packages/esbuild-transpiler/tsconfig.spec.json index 0c8781e6b..114920fb2 100644 --- a/packages/esbuild-transpiler/tsconfig.spec.json +++ b/packages/esbuild-transpiler/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/esbuild-transpiler", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index d3a86ca88..d2f65be90 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -7,7 +7,8 @@ import tseslint from 'typescript-eslint' export default [ js.configs.recommended, nodePlugin.configs['flat/recommended'], - ...tseslint.configs.recommended, + ...tseslint.configs.strictTypeChecked, + ...tseslint.configs.stylisticTypeChecked, { plugins: { '@typescript-eslint': tseslint.plugin, diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index ba9d5b0d1..fef011b4f 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -28,9 +28,5 @@ "eslint-plugin-import-x": "^4.1.1", "eslint-plugin-n": "^17.10.2", "typescript-eslint": "^8.27.0" - }, - "devDependencies": { - "eslint": "^9.23.0", - "typescript": "^5.3.3" } } diff --git a/packages/event-emitter/tsconfig.spec.json b/packages/event-emitter/tsconfig.spec.json index 57c7b86d8..d7dd91c46 100644 --- a/packages/event-emitter/tsconfig.spec.json +++ b/packages/event-emitter/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/event-emitter", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/firebase-auth/package.json b/packages/firebase-auth/package.json index 04a96e7f5..69adbcd95 100644 --- a/packages/firebase-auth/package.json +++ b/packages/firebase-auth/package.json @@ -52,7 +52,6 @@ "@arethetypeswrong/cli": "^0.17.4", "firebase-tools": "^13.29.1", "miniflare": "^3.20240208.0", - "prettier": "^3.2.5", "publint": "^0.3.9", "tsup": "^8.4.0", "typescript": "^5.8.2", diff --git a/packages/firebase-auth/tsconfig.spec.json b/packages/firebase-auth/tsconfig.spec.json index fd8c3cc04..b25d85bcd 100644 --- a/packages/firebase-auth/tsconfig.spec.json +++ b/packages/firebase-auth/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/firebase-auth", "noEmit": true }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/graphql-server/tsconfig.bun.json b/packages/graphql-server/tsconfig.bun.json new file mode 100644 index 000000000..df347ba78 --- /dev/null +++ b/packages/graphql-server/tsconfig.bun.json @@ -0,0 +1,14 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc/packages/graphql-server", + "types": ["bun"] + }, + "exclude": ["src/**/*.test.ts"], + "include": ["bun_test", "vitest.config.ts"], + "references": [ + { + "path": "./tsconfig.build.json" + } + ] +} diff --git a/packages/graphql-server/tsconfig.json b/packages/graphql-server/tsconfig.json index d4d0929e1..549e82e2e 100644 --- a/packages/graphql-server/tsconfig.json +++ b/packages/graphql-server/tsconfig.json @@ -6,6 +6,9 @@ { "path": "./tsconfig.build.json" }, + { + "path": "./tsconfig.bun.json" + }, { "path": "./tsconfig.spec.json" } diff --git a/packages/graphql-server/tsconfig.spec.json b/packages/graphql-server/tsconfig.spec.json index 98883968f..511a77143 100644 --- a/packages/graphql-server/tsconfig.spec.json +++ b/packages/graphql-server/tsconfig.spec.json @@ -5,7 +5,7 @@ "types": ["vitest/globals"] }, "exclude": ["bun_test"], - + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/hello/tsconfig.spec.json b/packages/hello/tsconfig.spec.json index f1428dff8..887243a21 100644 --- a/packages/hello/tsconfig.spec.json +++ b/packages/hello/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/hello", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/medley-router/tsconfig.spec.json b/packages/medley-router/tsconfig.spec.json index bef87b667..b84503a01 100644 --- a/packages/medley-router/tsconfig.spec.json +++ b/packages/medley-router/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/medley-router", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/node-ws/tsconfig.spec.json b/packages/node-ws/tsconfig.spec.json index 6c34c5e08..c60c26c64 100644 --- a/packages/node-ws/tsconfig.spec.json +++ b/packages/node-ws/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/node-ws", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/oauth-providers/tsconfig.spec.json b/packages/oauth-providers/tsconfig.spec.json index 34b7316dd..0ee144abb 100644 --- a/packages/oauth-providers/tsconfig.spec.json +++ b/packages/oauth-providers/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/oauth-providers", "types": ["vitest/globals"] }, - "include": ["mocks.ts", "**/*.test.ts"], + "include": ["mocks.ts", "**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/oidc-auth/tsconfig.spec.json b/packages/oidc-auth/tsconfig.spec.json index 13981866d..d9060a6ef 100644 --- a/packages/oidc-auth/tsconfig.spec.json +++ b/packages/oidc-auth/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/oidc-auth", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/otel/tsconfig.spec.json b/packages/otel/tsconfig.spec.json index 13981866d..d9060a6ef 100644 --- a/packages/otel/tsconfig.spec.json +++ b/packages/otel/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/oidc-auth", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/prometheus/tsconfig.spec.json b/packages/prometheus/tsconfig.spec.json index 084707d0c..a81327798 100644 --- a/packages/prometheus/tsconfig.spec.json +++ b/packages/prometheus/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/prometheus", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/react-renderer/tsconfig.spec.json b/packages/react-renderer/tsconfig.spec.json index b7fe69a37..1782d6a03 100644 --- a/packages/react-renderer/tsconfig.spec.json +++ b/packages/react-renderer/tsconfig.spec.json @@ -8,7 +8,7 @@ "outDir": "../../dist/out-tsc/packages/react-renderer", "types": ["vitest/globals"] }, - "include": ["**/*.test.tsx"], + "include": ["**/*.test.tsx", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/sentry/tsconfig.spec.json b/packages/sentry/tsconfig.spec.json index 862ee1f7b..094885501 100644 --- a/packages/sentry/tsconfig.spec.json +++ b/packages/sentry/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/sentry", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/standard-validator/tsconfig.spec.json b/packages/standard-validator/tsconfig.spec.json index 95db8fbc5..a68ad693b 100644 --- a/packages/standard-validator/tsconfig.spec.json +++ b/packages/standard-validator/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/standard-validator", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/swagger-editor/tsconfig.spec.json b/packages/swagger-editor/tsconfig.spec.json index abc354fed..c6e213aac 100644 --- a/packages/swagger-editor/tsconfig.spec.json +++ b/packages/swagger-editor/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/swagger-editor", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/swagger-ui/src/option-renderer.test.ts b/packages/swagger-ui/src/option-renderer.test.ts index abb9422e2..28b16248a 100644 --- a/packages/swagger-ui/src/option-renderer.test.ts +++ b/packages/swagger-ui/src/option-renderer.test.ts @@ -1,5 +1,3 @@ -/*eslint quotes: ["off", "single"]*/ - import type { DistSwaggerUIOptions } from './swagger/renderer' import { renderSwaggerUIOptions } from './swagger/renderer' diff --git a/packages/swagger-ui/tsconfig.spec.json b/packages/swagger-ui/tsconfig.spec.json index fc4118de5..3e084b9d1 100644 --- a/packages/swagger-ui/tsconfig.spec.json +++ b/packages/swagger-ui/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/swagger-ui", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/trpc-server/tsconfig.spec.json b/packages/trpc-server/tsconfig.spec.json index 40353fb6f..fa3258400 100644 --- a/packages/trpc-server/tsconfig.spec.json +++ b/packages/trpc-server/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/trpc-server", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/tsyringe/tsconfig.spec.json b/packages/tsyringe/tsconfig.spec.json index 294f126f3..790382afe 100644 --- a/packages/tsyringe/tsconfig.spec.json +++ b/packages/tsyringe/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/tsyringe", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/typebox-validator/tsconfig.spec.json b/packages/typebox-validator/tsconfig.spec.json index 3f4dce9c2..ac62fd3be 100644 --- a/packages/typebox-validator/tsconfig.spec.json +++ b/packages/typebox-validator/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/typebox-validator", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/valibot-validator/tsconfig.spec.json b/packages/valibot-validator/tsconfig.spec.json index 90b7df89b..12e631dec 100644 --- a/packages/valibot-validator/tsconfig.spec.json +++ b/packages/valibot-validator/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/valibot-validator", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/zod-openapi/tsconfig.spec.json b/packages/zod-openapi/tsconfig.spec.json index 191c02704..acda4f262 100644 --- a/packages/zod-openapi/tsconfig.spec.json +++ b/packages/zod-openapi/tsconfig.spec.json @@ -4,7 +4,8 @@ "outDir": "../../dist/out-tsc/packages/zod-openapi", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + + "include": ["**/*.test.ts", "**/*.test-d.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/packages/zod-validator/tsconfig.spec.json b/packages/zod-validator/tsconfig.spec.json index 460b123b1..77c02e134 100644 --- a/packages/zod-validator/tsconfig.spec.json +++ b/packages/zod-validator/tsconfig.spec.json @@ -4,7 +4,7 @@ "outDir": "../../dist/out-tsc/packages/zod-validator", "types": ["vitest/globals"] }, - "include": ["**/*.test.ts"], + "include": ["**/*.test.ts", "vitest.config.ts"], "references": [ { "path": "./tsconfig.build.json" diff --git a/tsconfig.json b/tsconfig.json index 729f16396..beb24e19e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -39,6 +39,7 @@ { "path": "packages/typia-validator" }, { "path": "packages/valibot-validator" }, { "path": "packages/zod-openapi" }, - { "path": "packages/zod-validator" } + { "path": "packages/zod-validator" }, + { "path": "./tsconfig.repo-config-files.json" } ] } diff --git a/tsconfig.repo-config-files.json b/tsconfig.repo-config-files.json new file mode 100644 index 000000000..aa8306aaa --- /dev/null +++ b/tsconfig.repo-config-files.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "outDir": "dist/out-tsc/root/eslint", + "allowJs": true + }, + "include": [ + "eslint.config.mjs", + "packages/eslint-config/index.js", + "tsup.config.ts", + "vitest.config.ts", + "vitest.workspace.ts" + ] +} diff --git a/yarn.lock b/yarn.lock index 8bb033f75..4f56a6d11 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1839,7 +1839,6 @@ __metadata: resolution: "@hono/bun-transpiler@workspace:packages/bun-transpiler" dependencies: "@arethetypeswrong/cli": "npm:^0.17.4" - "@types/bun": "npm:^1.0.0" publint: "npm:^0.3.9" tsup: "npm:^8.4.0" typescript: "npm:^5.8.2" @@ -1973,12 +1972,10 @@ __metadata: resolution: "@hono/eslint-config@workspace:packages/eslint-config" dependencies: "@eslint/js": "npm:^9.10.0" - eslint: "npm:^9.23.0" eslint-config-prettier: "npm:^10.1.1" eslint-import-resolver-typescript: "npm:^4.2.2" eslint-plugin-import-x: "npm:^4.1.1" eslint-plugin-n: "npm:^17.10.2" - typescript: "npm:^5.3.3" typescript-eslint: "npm:^8.27.0" peerDependencies: eslint: ^9.0.0 @@ -2008,7 +2005,6 @@ __metadata: firebase-auth-cloudflare-workers: "npm:^2.0.6" firebase-tools: "npm:^13.29.1" miniflare: "npm:^3.20240208.0" - prettier: "npm:^3.2.5" publint: "npm:^0.3.9" tsup: "npm:^8.4.0" typescript: "npm:^5.8.2" @@ -4043,29 +4039,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^8.7.0": - version: 8.7.0 - resolution: "@typescript-eslint/eslint-plugin@npm:8.7.0" - dependencies: - "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.7.0" - "@typescript-eslint/type-utils": "npm:8.7.0" - "@typescript-eslint/utils": "npm:8.7.0" - "@typescript-eslint/visitor-keys": "npm:8.7.0" - graphemer: "npm:^1.4.0" - ignore: "npm:^5.3.1" - natural-compare: "npm:^1.4.0" - ts-api-utils: "npm:^1.3.0" - peerDependencies: - "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0 - eslint: ^8.57.0 || ^9.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: f04d6fa6a30e32d51feba0f08789f75ca77b6b67cfe494bdbd9aafa241871edc918fa8b344dc9d13dd59ae055d42c3920f0e542534f929afbfdca653dae598fa - languageName: node - linkType: hard - "@typescript-eslint/parser@npm:8.28.0": version: 8.28.0 resolution: "@typescript-eslint/parser@npm:8.28.0" @@ -4082,24 +4055,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/parser@npm:^8.7.0": - version: 8.7.0 - resolution: "@typescript-eslint/parser@npm:8.7.0" - dependencies: - "@typescript-eslint/scope-manager": "npm:8.7.0" - "@typescript-eslint/types": "npm:8.7.0" - "@typescript-eslint/typescript-estree": "npm:8.7.0" - "@typescript-eslint/visitor-keys": "npm:8.7.0" - debug: "npm:^4.3.4" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 1d5020ff1f5d3eb726bc6034d23f0a71e8fe7a713756479a0a0b639215326f71c0b44e2c25cc290b4e7c144bd3c958f1405199711c41601f0ea9174068714a64 - languageName: node - linkType: hard - "@typescript-eslint/scope-manager@npm:8.28.0": version: 8.28.0 resolution: "@typescript-eslint/scope-manager@npm:8.28.0" @@ -4110,16 +4065,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:8.7.0": - version: 8.7.0 - resolution: "@typescript-eslint/scope-manager@npm:8.7.0" - dependencies: - "@typescript-eslint/types": "npm:8.7.0" - "@typescript-eslint/visitor-keys": "npm:8.7.0" - checksum: 8b731a0d0bd3e8f6a322b3b25006f56879b5d2aad86625070fa438b803cf938cb8d5c597758bfa0d65d6e142b204dc6f363fa239bc44280a74e25aa427408eda - languageName: node - linkType: hard - "@typescript-eslint/type-utils@npm:8.28.0": version: 8.28.0 resolution: "@typescript-eslint/type-utils@npm:8.28.0" @@ -4135,21 +4080,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:8.7.0": - version: 8.7.0 - resolution: "@typescript-eslint/type-utils@npm:8.7.0" - dependencies: - "@typescript-eslint/typescript-estree": "npm:8.7.0" - "@typescript-eslint/utils": "npm:8.7.0" - debug: "npm:^4.3.4" - ts-api-utils: "npm:^1.3.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: 2bd9fb93a50ff1c060af41528e39c775ae93b09dd71450defdb42a13c68990dd388460ae4e81fb2f4a49c38dc12152c515d43e845eca6198c44b14aab66733bc - languageName: node - linkType: hard - "@typescript-eslint/types@npm:8.28.0": version: 8.28.0 resolution: "@typescript-eslint/types@npm:8.28.0" @@ -4157,13 +4087,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:8.7.0": - version: 8.7.0 - resolution: "@typescript-eslint/types@npm:8.7.0" - checksum: f7529eaea4ecc0f5e2d94ea656db8f930f6d1c1e65a3ffcb2f6bec87361173de2ea981405c2c483a35a927b3bdafb606319a1d0395a6feb1284448c8ba74c31e - languageName: node - linkType: hard - "@typescript-eslint/typescript-estree@npm:8.28.0": version: 8.28.0 resolution: "@typescript-eslint/typescript-estree@npm:8.28.0" @@ -4182,25 +4105,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.7.0": - version: 8.7.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.7.0" - dependencies: - "@typescript-eslint/types": "npm:8.7.0" - "@typescript-eslint/visitor-keys": "npm:8.7.0" - debug: "npm:^4.3.4" - fast-glob: "npm:^3.3.2" - is-glob: "npm:^4.0.3" - minimatch: "npm:^9.0.4" - semver: "npm:^7.6.0" - ts-api-utils: "npm:^1.3.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: d714605b6920a9631ab1511b569c1c158b1681c09005ab240125c442a63e906048064151a61ce5eb5f8fe75cea861ce5ae1d87be9d7296b012e4ab6d88755e8b - languageName: node - linkType: hard - "@typescript-eslint/utils@npm:8.28.0, @typescript-eslint/utils@npm:^8.27.0": version: 8.28.0 resolution: "@typescript-eslint/utils@npm:8.28.0" @@ -4216,20 +4120,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.7.0": - version: 8.7.0 - resolution: "@typescript-eslint/utils@npm:8.7.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.7.0" - "@typescript-eslint/types": "npm:8.7.0" - "@typescript-eslint/typescript-estree": "npm:8.7.0" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - checksum: 7355b754ce2fc118773ed27a3e02b7dfae270eec73c2d896738835ecf842e8309544dfd22c5105aba6cae2787bfdd84129bbc42f4b514f57909dc7f6890b8eba - languageName: node - linkType: hard - "@typescript-eslint/visitor-keys@npm:8.28.0": version: 8.28.0 resolution: "@typescript-eslint/visitor-keys@npm:8.28.0" @@ -4240,16 +4130,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.7.0": - version: 8.7.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.7.0" - dependencies: - "@typescript-eslint/types": "npm:8.7.0" - eslint-visitor-keys: "npm:^3.4.3" - checksum: 1240da13c15f9f875644b933b0ad73713ef12f1db5715236824c1ec359e6ef082ce52dd9b2186d40e28be6a816a208c226e6e9af96e5baeb24b4399fe786ae7c - languageName: node - linkType: hard - "@ungap/structured-clone@npm:^1.0.0": version: 1.3.0 resolution: "@ungap/structured-clone@npm:1.3.0" @@ -4660,7 +4540,7 @@ __metadata: languageName: node linkType: hard -"ansi-styles@npm:^6.1.0, ansi-styles@npm:^6.2.1": +"ansi-styles@npm:^6.1.0": version: 6.2.1 resolution: "ansi-styles@npm:6.2.1" checksum: 5d1ec38c123984bcedd996eac680d548f31828bd679a66db2bdf11844634dde55fec3efa9c6bb1d89056a5e79c1ac540c4c784d592ea1d25028a92227d2f2d5c @@ -5917,7 +5797,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.3, cross-spawn@npm:^7.0.5, cross-spawn@npm:^7.0.6": +"cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.5, cross-spawn@npm:^7.0.6": version: 7.0.6 resolution: "cross-spawn@npm:7.0.6" dependencies: @@ -7082,7 +6962,7 @@ __metadata: languageName: node linkType: hard -"eslint@npm:^9.17.0, eslint@npm:^9.23.0": +"eslint@npm:^9.23.0": version: 9.23.0 resolution: "eslint@npm:9.23.0" dependencies: @@ -8385,15 +8265,13 @@ __metadata: "@cloudflare/workers-types": "npm:^4.20230307.0" "@hono/eslint-config": "workspace:*" "@ryoppippi/unplugin-typia": "npm:^1.2.0" + "@types/bun": "npm:^1.0.0" "@types/node": "npm:^20.17.28" "@types/ws": "npm:^8.18.0" - "@typescript-eslint/eslint-plugin": "npm:^8.7.0" - "@typescript-eslint/parser": "npm:^8.7.0" "@vitest/coverage-istanbul": "npm:^3.0.8" - eslint: "npm:^9.17.0" + eslint: "npm:^9.23.0" hono: "npm:^4.7.5" - npm-run-all2: "npm:^6.2.2" - prettier: "npm:^2.7.1" + prettier: "npm:^3.5.3" tsup: "npm:^8.4.0" typescript: "npm:^5.8.2" vitest: "npm:^3.0.8" @@ -9133,13 +9011,6 @@ __metadata: languageName: node linkType: hard -"json-parse-even-better-errors@npm:^3.0.0": - version: 3.0.2 - resolution: "json-parse-even-better-errors@npm:3.0.2" - checksum: 147f12b005768abe9fab78d2521ce2b7e1381a118413d634a40e6d907d7d10f5e9a05e47141e96d6853af7cc36d2c834d0a014251be48791e037ff2f13d2b94b - languageName: node - linkType: hard - "json-parse-helpfulerror@npm:^1.0.3": version: 1.0.3 resolution: "json-parse-helpfulerror@npm:1.0.3" @@ -9918,13 +9789,6 @@ __metadata: languageName: node linkType: hard -"memorystream@npm:^0.3.1": - version: 0.3.1 - resolution: "memorystream@npm:0.3.1" - checksum: 4bd164657711d9747ff5edb0508b2944414da3464b7fe21ac5c67cf35bba975c4b446a0124bd0f9a8be54cfc18faf92e92bd77563a20328b1ccf2ff04e9f39b9 - languageName: node - linkType: hard - "merge-descriptors@npm:1.0.3": version: 1.0.3 resolution: "merge-descriptors@npm:1.0.3" @@ -10444,21 +10308,21 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.0, minimatch@npm:^9.0.4, minimatch@npm:^9.0.5": - version: 9.0.5 - resolution: "minimatch@npm:9.0.5" +"minimatch@npm:^9.0.1": + version: 9.0.3 + resolution: "minimatch@npm:9.0.3" dependencies: brace-expansion: "npm:^2.0.1" - checksum: de96cf5e35bdf0eab3e2c853522f98ffbe9a36c37797778d2665231ec1f20a9447a7e567cb640901f89e4daaa95ae5d70c65a9e8aa2bb0019b6facbc3c0575ed + checksum: 85f407dcd38ac3e180f425e86553911d101455ca3ad5544d6a7cec16286657e4f8a9aa6695803025c55e31e35a91a2252b5dc8e7d527211278b8b65b4dbd5eac languageName: node linkType: hard -"minimatch@npm:^9.0.1": - version: 9.0.3 - resolution: "minimatch@npm:9.0.3" +"minimatch@npm:^9.0.4, minimatch@npm:^9.0.5": + version: 9.0.5 + resolution: "minimatch@npm:9.0.5" dependencies: brace-expansion: "npm:^2.0.1" - checksum: 85f407dcd38ac3e180f425e86553911d101455ca3ad5544d6a7cec16286657e4f8a9aa6695803025c55e31e35a91a2252b5dc8e7d527211278b8b65b4dbd5eac + checksum: de96cf5e35bdf0eab3e2c853522f98ffbe9a36c37797778d2665231ec1f20a9447a7e567cb640901f89e4daaa95ae5d70c65a9e8aa2bb0019b6facbc3c0575ed languageName: node linkType: hard @@ -10905,34 +10769,6 @@ __metadata: languageName: node linkType: hard -"npm-normalize-package-bin@npm:^3.0.0": - version: 3.0.1 - resolution: "npm-normalize-package-bin@npm:3.0.1" - checksum: f1831a7f12622840e1375c785c3dab7b1d82dd521211c17ee5e9610cd1a34d8b232d3fdeebf50c170eddcb321d2c644bf73dbe35545da7d588c6b3fa488db0a5 - languageName: node - linkType: hard - -"npm-run-all2@npm:^6.2.2": - version: 6.2.6 - resolution: "npm-run-all2@npm:6.2.6" - dependencies: - ansi-styles: "npm:^6.2.1" - cross-spawn: "npm:^7.0.3" - memorystream: "npm:^0.3.1" - minimatch: "npm:^9.0.0" - pidtree: "npm:^0.6.0" - read-package-json-fast: "npm:^3.0.2" - shell-quote: "npm:^1.7.3" - which: "npm:^3.0.1" - bin: - npm-run-all: bin/npm-run-all/index.js - npm-run-all2: bin/npm-run-all/index.js - run-p: bin/run-p/index.js - run-s: bin/run-s/index.js - checksum: 043b0851958b22b1910002cacd996e2ee8d45fefd3aa0f6da2795c50f1eb1d520631f993f6c8c7d28aeca73882a95b35451024fcd796c26a7907e1a1dacb0a84 - languageName: node - linkType: hard - "nth-check@npm:^2.0.1": version: 2.1.1 resolution: "nth-check@npm:2.1.1" @@ -11540,15 +11376,6 @@ __metadata: languageName: node linkType: hard -"pidtree@npm:^0.6.0": - version: 0.6.0 - resolution: "pidtree@npm:0.6.0" - bin: - pidtree: bin/pidtree.js - checksum: 0829ec4e9209e230f74ebf4265f5ccc9ebfb488334b525cb13f86ff801dca44b362c41252cd43ae4d7653a10a5c6ab3be39d2c79064d6895e0d78dc50a5ed6e9 - languageName: node - linkType: hard - "pify@npm:^4.0.1": version: 4.0.1 resolution: "pify@npm:4.0.1" @@ -11702,7 +11529,7 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^3.2.5": +"prettier@npm:^3.5.3": version: 3.5.3 resolution: "prettier@npm:3.5.3" bin: @@ -12075,16 +11902,6 @@ __metadata: languageName: node linkType: hard -"read-package-json-fast@npm:^3.0.2": - version: 3.0.2 - resolution: "read-package-json-fast@npm:3.0.2" - dependencies: - json-parse-even-better-errors: "npm:^3.0.0" - npm-normalize-package-bin: "npm:^3.0.0" - checksum: 37787e075f0260a92be0428687d9020eecad7ece3bda37461c2219e50d1ec183ab6ba1d9ada193691435dfe119a42c8a5b5b5463f08c8ddbc3d330800b265318 - languageName: node - linkType: hard - "read-yaml-file@npm:^1.1.0": version: 1.1.0 resolution: "read-yaml-file@npm:1.1.0" @@ -12996,13 +12813,6 @@ __metadata: languageName: node linkType: hard -"shell-quote@npm:^1.7.3": - version: 1.8.2 - resolution: "shell-quote@npm:1.8.2" - checksum: 85fdd44f2ad76e723d34eb72c753f04d847ab64e9f1f10677e3f518d0e5b0752a176fd805297b30bb8c3a1556ebe6e77d2288dbd7b7b0110c7e941e9e9c20ce1 - languageName: node - linkType: hard - "side-channel-list@npm:^1.0.0": version: 1.0.0 resolution: "side-channel-list@npm:1.0.0" @@ -13924,15 +13734,6 @@ __metadata: languageName: node linkType: hard -"ts-api-utils@npm:^1.3.0": - version: 1.3.0 - resolution: "ts-api-utils@npm:1.3.0" - peerDependencies: - typescript: ">=4.2.0" - checksum: f54a0ba9ed56ce66baea90a3fa087a484002e807f28a8ccb2d070c75e76bde64bd0f6dce98b3802834156306050871b67eec325cb4e918015a360a3f0868c77c - languageName: node - linkType: hard - "ts-api-utils@npm:^2.0.1": version: 2.1.0 resolution: "ts-api-utils@npm:2.1.0" @@ -14114,16 +13915,6 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^5.3.3": - version: 5.3.3 - resolution: "typescript@npm:5.3.3" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: e33cef99d82573624fc0f854a2980322714986bc35b9cb4d1ce736ed182aeab78e2cb32b385efa493b2a976ef52c53e20d6c6918312353a91850e2b76f1ea44f - languageName: node - linkType: hard - "typescript@npm:^5.8.2": version: 5.8.2 resolution: "typescript@npm:5.8.2" @@ -14154,16 +13945,6 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^5.3.3#optional!builtin": - version: 5.3.3 - resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 1d0a5f4ce496c42caa9a30e659c467c5686eae15d54b027ee7866744952547f1be1262f2d40de911618c242b510029d51d43ff605dba8fb740ec85ca2d3f9500 - languageName: node - linkType: hard - "typescript@patch:typescript@npm%3A^5.8.2#optional!builtin": version: 5.8.2 resolution: "typescript@patch:typescript@npm%3A5.8.2#optional!builtin::version=5.8.2&hash=e012d7" @@ -14899,17 +14680,6 @@ __metadata: languageName: node linkType: hard -"which@npm:^3.0.1": - version: 3.0.1 - resolution: "which@npm:3.0.1" - dependencies: - isexe: "npm:^2.0.0" - bin: - node-which: bin/which.js - checksum: 15263b06161a7c377328fd2066cb1f093f5e8a8f429618b63212b5b8847489be7bcab0ab3eb07f3ecc0eda99a5a7ea52105cf5fa8266bedd083cc5a9f6da24f1 - languageName: node - linkType: hard - "which@npm:^4.0.0": version: 4.0.0 resolution: "which@npm:4.0.0"