Skip to content

Commit

Permalink
chore: 🤖 use typescript eslint config (unstable) (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy-guzman authored Oct 31, 2024
1 parent 6d22679 commit 54d329d
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .knip.json
Original file line number Diff line number Diff line change
@@ -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"]
}
}
2 changes: 1 addition & 1 deletion .lefthook.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
}
Binary file modified bun.lockb
Binary file not shown.
3 changes: 2 additions & 1 deletion eslint.config.mjs → eslint.config.ts
Original file line number Diff line number Diff line change
@@ -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"]],
});
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 54d329d

Please sign in to comment.