@@ -4,41 +4,47 @@ import prettier from 'eslint-config-prettier'
44import pluginImport from 'eslint-plugin-import'
55import pluginNode from 'eslint-plugin-n'
66
7- const config = [ {
8- languageOptions : {
9- globals : {
10- ...globals . node
11- } ,
7+ const config = [
8+ {
9+ languageOptions : {
10+ globals : {
11+ ...globals . node
12+ } ,
1213
13- ecmaVersion : 2020 ,
14- sourceType : 'module' ,
15- } ,
14+ ecmaVersion : 2020 ,
15+ sourceType : 'module'
16+ } ,
1617
17- rules : {
18- ...js . configs . recommended . rules ,
19- 'no-console' : 'error' ,
20- 'prefer-const' : 'error' ,
21- 'no-var' : 'error' ,
22- 'no-use-before-define' : 'error' ,
23- 'no-await-in-loop' : 'error' ,
24- 'n/exports-style' : [ 0 , 'error' ] ,
25- 'import/first' : 'error' ,
26- 'import/no-anonymous-default-export' : 'error' ,
27- 'import/no-unassigned-import' : 'error' ,
28- 'import/no-internal-modules' : [ 'error' , {
29- allow : [ 'src/**' ] ,
30- } ]
18+ rules : {
19+ ...js . configs . recommended . rules ,
20+ 'no-console' : 'error' ,
21+ 'prefer-const' : 'error' ,
22+ 'no-var' : 'error' ,
23+ 'no-use-before-define' : 'error' ,
24+ 'no-await-in-loop' : 'error' ,
25+ 'n/exports-style' : [ 0 , 'error' ] ,
26+ 'import/first' : 'error' ,
27+ 'import/no-anonymous-default-export' : 'error' ,
28+ 'import/no-unassigned-import' : 'error' ,
29+ 'import/no-internal-modules' : [
30+ 'error' ,
31+ {
32+ allow : [ 'src/**' ]
33+ }
34+ ]
35+ } ,
36+ plugins : {
37+ import : pluginImport ,
38+ n : pluginNode ,
39+ prettier : prettier
40+ }
3141 } ,
32- plugins : {
33- 'import' : pluginImport ,
34- 'n' : pluginNode ,
35- 'prettier' : prettier
36- }
37- } , {
42+ {
3843 files : [ 'test/{**/,}*.js' ] ,
3944 languageOptions : {
40- globals : { ...globals . mocha }
45+ globals : { ...globals . mocha }
4146 }
42- } ]
47+ }
48+ ]
4349
44- export default config
50+ export default config
0 commit comments