1- import { defineConfig , globalIgnores } from " eslint/config" ;
2- import { fixupConfigRules , fixupPluginRules } from " @eslint/compat" ;
3- import typescriptEslint from " @typescript-eslint/eslint-plugin" ;
4- import react from " eslint-plugin-react" ;
5- import reactHooks from " eslint-plugin-react-hooks" ;
6- import jsxA11Y from " eslint-plugin-jsx-a11y" ;
7- import tsParser from " @typescript-eslint/parser" ;
8- import path from " node:path" ;
9- import { fileURLToPath } from " node:url" ;
10- import js from " @eslint/js" ;
11- import { FlatCompat } from " @eslint/eslintrc" ;
1+ import { defineConfig , globalIgnores } from ' eslint/config' ;
2+ import { fixupConfigRules , fixupPluginRules } from ' @eslint/compat' ;
3+ import typescriptEslint from ' @typescript-eslint/eslint-plugin' ;
4+ import react from ' eslint-plugin-react' ;
5+ import reactHooks from ' eslint-plugin-react-hooks' ;
6+ import jsxA11Y from ' eslint-plugin-jsx-a11y' ;
7+ import tsParser from ' @typescript-eslint/parser' ;
8+ import path from ' node:path' ;
9+ import { fileURLToPath } from ' node:url' ;
10+ import js from ' @eslint/js' ;
11+ import { FlatCompat } from ' @eslint/eslintrc' ;
1212
1313const __filename = fileURLToPath ( import . meta. url ) ;
1414const __dirname = path . dirname ( __filename ) ;
1515const compat = new FlatCompat ( {
16- baseDirectory : __dirname ,
17- recommendedConfig : js . configs . recommended ,
18- allConfig : js . configs . all
16+ baseDirectory : __dirname ,
17+ recommendedConfig : js . configs . recommended ,
18+ allConfig : js . configs . all ,
1919} ) ;
2020
21- export default defineConfig ( [ globalIgnores ( [ "**/lib/" , "**/node_modules" ] ) , {
22- extends : fixupConfigRules ( compat . extends (
23- "plugin:@typescript-eslint/recommended" ,
24- "plugin:react/recommended" ,
25- "plugin:react-hooks/recommended" ,
26- "plugin:jsx-a11y/recommended" ,
27- "plugin:react/jsx-runtime" ,
28- "prettier" ,
29- "plugin:storybook/recommended" ,
30- ) ) ,
21+ export default defineConfig ( [
22+ globalIgnores ( [ '**/lib/' , '**/node_modules' ] ) ,
23+ {
24+ extends : fixupConfigRules (
25+ compat . extends (
26+ 'plugin:@typescript-eslint/recommended' ,
27+ 'plugin:react/recommended' ,
28+ 'plugin:react-hooks/recommended' ,
29+ 'plugin:jsx-a11y/recommended' ,
30+ 'plugin:react/jsx-runtime' ,
31+ 'prettier' ,
32+ 'plugin:storybook/recommended' ,
33+ ) ,
34+ ) ,
3135
3236 plugins : {
33- " @typescript-eslint" : fixupPluginRules ( typescriptEslint ) ,
34- react : fixupPluginRules ( react ) ,
35- " react-hooks" : fixupPluginRules ( reactHooks ) ,
36- " jsx-a11y" : fixupPluginRules ( jsxA11Y ) ,
37+ ' @typescript-eslint' : fixupPluginRules ( typescriptEslint ) ,
38+ react : fixupPluginRules ( react ) ,
39+ ' react-hooks' : fixupPluginRules ( reactHooks ) ,
40+ ' jsx-a11y' : fixupPluginRules ( jsxA11Y ) ,
3741 } ,
3842
3943 languageOptions : {
40- parser : tsParser ,
44+ parser : tsParser ,
4145 } ,
4246
4347 settings : {
44- react : {
45- version : " detect" ,
46- } ,
48+ react : {
49+ version : ' detect' ,
50+ } ,
4751 } ,
48- } ] ) ;
52+ } ,
53+ ] ) ;
0 commit comments