@@ -8,16 +8,14 @@ import prettierPlugin from 'eslint-plugin-prettier/recommended'
88export default defineConfig ( [
99 {
1010 name : 'global ignores' ,
11- ignores : [ '**/coverage/**/*' , '**/dist/**/*' , 'docs/.vitepress/dist/**/*' , 'docs/.vitepress/cache/ **/*'] ,
11+ ignores : [ '**/coverage/**/*' , '**/dist/**/*' , 'docs/.vitepress/**/*' ] ,
1212 } ,
1313
1414 {
1515 name : 'js recommended' ,
1616 ...jsPlugin . configs . recommended ,
1717 } ,
1818
19- ...tsPlugin . configs . recommendedTypeChecked ,
20-
2119 {
2220 name : 'react recommended' ,
2321 ...reactPlugin . configs . flat . recommended ,
@@ -28,39 +26,23 @@ export default defineConfig([
2826 ...reactPlugin . configs . flat [ 'jsx-runtime' ] ,
2927 } ,
3028
31- prettierPlugin ,
32-
33- {
34- name : 'ts configuration' ,
35- files : [ '**/*.{ts,tsx}' ] ,
36- languageOptions : {
37- parserOptions : {
38- projectService : true ,
39- tsconfigRootDir : import . meta. dirname ,
40- } ,
41- } ,
42- rules : {
43- 'no-unused-vars' : 'off' ,
29+ ...tsPlugin . configs . recommendedTypeChecked ,
4430
45- '@typescript-eslint/consistent-type-imports' : 'error' ,
46- '@typescript-eslint/consistent-type-exports' : 'error' ,
47- '@typescript-eslint/no-unused-vars' : [
48- 'error' ,
49- {
50- ignoreRestSiblings : true ,
51- argsIgnorePattern : '^_' ,
52- destructuredArrayIgnorePattern : '^_' ,
53- } ,
54- ] ,
55- } ,
56- } ,
31+ prettierPlugin ,
5732
5833 {
5934 name : 'global configuration' ,
6035
6136 languageOptions : {
6237 ...reactPlugin . configs . flat . recommended . languageOptions ,
6338
39+ parserOptions : {
40+ projectService : {
41+ allowDefaultProject : [ 'eslint.config.mjs' ] ,
42+ } ,
43+ tsconfigRootDir : import . meta. dirname ,
44+ } ,
45+
6446 globals : {
6547 ...globals . serviceworker ,
6648 ...globals . browser ,
@@ -76,9 +58,26 @@ export default defineConfig([
7658 rules : {
7759 'no-console' : 'error' ,
7860 'no-debugger' : 'error' ,
61+ 'no-unused-vars' : 'off' ,
7962
8063 'react/prop-types' : 'off' ,
8164 'react/display-name' : 'off' ,
65+
66+ '@typescript-eslint/consistent-type-imports' : 'error' ,
67+ '@typescript-eslint/consistent-type-exports' : 'error' ,
68+ '@typescript-eslint/no-unsafe-assignment' : 'off' ,
69+ '@typescript-eslint/no-unsafe-member-access' : 'off' ,
70+ '@typescript-eslint/no-unsafe-return' : 'off' ,
71+ '@typescript-eslint/no-unsafe-argument' : 'off' ,
72+ '@typescript-eslint/no-explicit-any' : 'off' ,
73+ '@typescript-eslint/no-unused-vars' : [
74+ 'error' ,
75+ {
76+ ignoreRestSiblings : true ,
77+ argsIgnorePattern : '^_' ,
78+ destructuredArrayIgnorePattern : '^_' ,
79+ } ,
80+ ] ,
8281 } ,
8382 } ,
8483] )
0 commit comments