@@ -12,64 +12,66 @@ import nPlugin from 'eslint-plugin-n';
1212const filename = fileURLToPath ( import . meta. url ) ;
1313const dirname = path . dirname ( filename ) ;
1414
15- export default defineConfig (
16- {
17- name : 'Base config' ,
18- extends : createBaseConfig ( {
19- baseDirectory : dirname ,
20- } ) ,
21- plugins : {
22- n : nPlugin ,
23- } ,
24- rules : {
25- // No time for this
26- 'react/prop-types' : 'off' ,
27- 'jsx-a11y/control-has-associated-label' : 'off' ,
28- 'jsx-a11y/no-autofocus' : 'off' ,
29- '@typescript-eslint/triple-slash-reference' : 'off' ,
30- // Enforce using node: protocol for builtin modules
31- 'n/prefer-node-protocol' : 'error' ,
32- 'material-ui/no-empty-box' : 'off' ,
33- } ,
34- settings : {
35- 'import/resolver' : {
36- typescript : {
37- project : [ 'tsconfig.json' ] ,
15+ export default /** @type {import('eslint').Linter.Config[] } */ (
16+ defineConfig (
17+ {
18+ name : 'Base config' ,
19+ extends : createBaseConfig ( {
20+ baseDirectory : dirname ,
21+ } ) ,
22+ plugins : {
23+ n : nPlugin ,
24+ } ,
25+ rules : {
26+ // No time for this
27+ 'react/prop-types' : 'off' ,
28+ 'jsx-a11y/control-has-associated-label' : 'off' ,
29+ 'jsx-a11y/no-autofocus' : 'off' ,
30+ '@typescript-eslint/triple-slash-reference' : 'off' ,
31+ // Enforce using node: protocol for builtin modules
32+ 'n/prefer-node-protocol' : 'error' ,
33+ 'material-ui/no-empty-box' : 'off' ,
34+ } ,
35+ settings : {
36+ 'import/resolver' : {
37+ typescript : {
38+ project : [ 'tsconfig.json' ] ,
39+ } ,
3840 } ,
3941 } ,
4042 } ,
41- } ,
42- {
43- files : [
44- // matching the pattern of the test runner
45- `**/*${ EXTENSION_TEST_FILE } ` ,
46- ] ,
47- extends : createTestConfig ( ) ,
48- } ,
49- {
50- files : [ `apps/**/*.${ EXTENSION_TS } ` ] ,
51- rules : {
52- '@typescript-eslint/no-explicit-any' : 'off' ,
43+ {
44+ files : [
45+ // matching the pattern of the test runner
46+ `**/*${ EXTENSION_TEST_FILE } ` ,
47+ ] ,
48+ extends : createTestConfig ( ) ,
5349 } ,
54- } ,
55- {
56- files : [ `packages/babel-*/**/*. ${ EXTENSION_TS } ` ] ,
57- rules : {
58- '@typescript-eslint/no-require-imports' : 'off' ,
50+ {
51+ files : [ `apps/**/*. ${ EXTENSION_TS } ` ] ,
52+ rules : {
53+ '@typescript-eslint/no-explicit-any' : 'off' ,
54+ } ,
5955 } ,
60- } ,
61- {
62- files : [ 'packages/bundle-size-checker/**/*' ] ,
63- rules : {
64- // Allow .js file extensions in import statements for ESM compatibility
65- 'import/extensions' : [
66- 'error' ,
67- 'ignorePackages' ,
68- {
69- js : 'always' ,
70- mjs : 'always' ,
71- } ,
72- ] ,
56+ {
57+ files : [ `packages/babel-*/**/*.${ EXTENSION_TS } ` ] ,
58+ rules : {
59+ '@typescript-eslint/no-require-imports' : 'off' ,
60+ } ,
61+ } ,
62+ {
63+ files : [ 'packages/bundle-size-checker/**/*' ] ,
64+ rules : {
65+ // Allow .js file extensions in import statements for ESM compatibility
66+ 'import/extensions' : [
67+ 'error' ,
68+ 'ignorePackages' ,
69+ {
70+ js : 'always' ,
71+ mjs : 'always' ,
72+ } ,
73+ ] ,
74+ } ,
7375 } ,
74- } ,
76+ )
7577) ;
0 commit comments