diff --git a/.knip.json b/.knip.json index 6e85425..979bd08 100644 --- a/.knip.json +++ b/.knip.json @@ -1,5 +1,8 @@ { "$schema": "https://unpkg.com/knip@5/schema.json", "ignore": ["src/route-tree.gen.ts"], - "ignoreDependencies": ["gitzy", "@iconify-json/*"] + "ignoreDependencies": ["gitzy", "@iconify-json/*"], + "eslint": { + "entry": ["eslint.config.ts"] + } } diff --git a/.lefthook.json b/.lefthook.json index b43f129..0ead507 100644 --- a/.lefthook.json +++ b/.lefthook.json @@ -5,7 +5,7 @@ "commands": { "lint": { "glob": "*.{js,cjs,ts,tsx}", - "run": "bunx eslint --fix {staged_files}", + "run": "bunx eslint --flag unstable_ts_config --fix {staged_files}", "stage_fixed": true }, "format": { diff --git a/.vscode/settings.json b/.vscode/settings.json index 3d97f68..da3e988 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -28,5 +28,8 @@ ], "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", - "eslint.experimental.useFlatConfig": true + "eslint.useFlatConfig": true, + "eslint.options": { + "flags": ["unstable_ts_config"] + } } diff --git a/bun.lockb b/bun.lockb index 8e5cdb7..f417e02 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/eslint.config.mjs b/eslint.config.ts similarity index 62% rename from eslint.config.mjs rename to eslint.config.ts index cdd30b6..5a9e17d 100644 --- a/eslint.config.mjs +++ b/eslint.config.ts @@ -1,8 +1,9 @@ -// @ts-check import jimmyDotCodes from "@jimmy.codes/eslint-config"; +// @ts-expect-error missing types import eslintPluginStorybook from "eslint-plugin-storybook"; export default jimmyDotCodes({ autoDetect: true, + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access overrides: [...eslintPluginStorybook.configs["flat/recommended"]], }); diff --git a/package.json b/package.json index 5173b83..f517362 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "format": "prettier --check --cache .", "format:fix": "prettier --write --cache .", "knip": "knip", - "lint": "eslint --color --cache --cache-location ./node_modules/.cache/eslint .", + "lint": "eslint --flag unstable_ts_config --color --cache --cache-location ./node_modules/.cache/eslint .", "lint:fix": "bun lint --fix", "prepare": "is-ci || lefthook install", "preview": "vite preview", @@ -68,6 +68,7 @@ "gitzy": "5.4.0", "happy-dom": "15.7.4", "is-ci": "3.0.1", + "jiti": "2.3.3", "knip": "5.34.4", "lefthook": "1.8.2", "msw": "2.6.0",