Skip to content

Commit 43940ed

Browse files
committed
ESLint
1 parent 1f0d85f commit 43940ed

9 files changed

+1557
-128
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ dist-ssr
2525
*.sw?
2626

2727
storybook-static/
28+
29+
.eslintcache

eslint.config.js

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
11
import js from '@eslint/js'
22
import globals from 'globals'
3+
import react from 'eslint-plugin-react'
34
import reactHooks from 'eslint-plugin-react-hooks'
45
import reactRefresh from 'eslint-plugin-react-refresh'
56
import tseslint from 'typescript-eslint'
67

78
export default tseslint.config(
8-
{ ignores: ['dist'] },
99
{
10-
extends: [js.configs.recommended, ...tseslint.configs.recommended],
10+
settings: { react: { version: '18.3' } },
11+
plugins: { react },
12+
rules: {
13+
...react.configs.recommended.rules,
14+
...react.configs['jsx-runtime'].rules,
15+
}
16+
},
17+
{ ignores: ['dist', 'node_modules', 'storybook-static', 'src/stories', '.storybook'] },
18+
{
19+
extends: [js.configs.recommended, ...tseslint.configs.recommendedTypeChecked, ...tseslint.configs.stylisticTypeChecked],
1120
files: ['**/*.{ts,tsx}'],
1221
languageOptions: {
13-
ecmaVersion: 2020,
22+
ecmaVersion: 2023,
1423
globals: globals.browser,
24+
parserOptions: {
25+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
26+
tsconfigRootDir: import.meta.dirname,
27+
}
1528
},
1629
plugins: {
1730
'react-hooks': reactHooks,

0 commit comments

Comments
 (0)