@@ -4,138 +4,139 @@ module.exports = {
4
4
node : true ,
5
5
} ,
6
6
extends : [
7
- ' airbnb-base' ,
8
- ' plugin:editorconfig/noconflict' ,
9
- ' plugin:promise/recommended' ,
10
- ' plugin:array-func/all' ,
11
- ' plugin:node/recommended' ,
12
- ' plugin:security-node /recommended' ,
13
- ' plugin:unicorn/all' ,
14
- ' plugin:eslint-comments/recommended' ,
15
- ' plugin:prettier/recommended' ,
16
- ' plugin:jest/all' ,
17
- ' prettier' ,
7
+ " airbnb-base" ,
8
+ " plugin:editorconfig/noconflict" ,
9
+ " plugin:promise/recommended" ,
10
+ " plugin:array-func/all" ,
11
+ " plugin:node/recommended" ,
12
+ " plugin:security/recommended" ,
13
+ " plugin:unicorn/all" ,
14
+ " plugin:eslint-comments/recommended" ,
15
+ " plugin:prettier/recommended" ,
16
+ " plugin:jest/all" ,
17
+ " prettier" ,
18
18
] ,
19
19
overrides : [
20
20
{
21
- files : [ ' ./*' , ' setup-tests.js' , ' setupTests.js' ] ,
21
+ files : [ " ./*" , " setup-tests.js" , " setupTests.js" ] ,
22
22
rules : {
23
- ' import/no-extraneous-dependencies' : [
24
- ' error' ,
23
+ " import/no-extraneous-dependencies" : [
24
+ " error" ,
25
25
{
26
26
devDependencies : true ,
27
27
} ,
28
28
] ,
29
- ' node/no-extraneous-import' : ' off' ,
30
- ' node/no-unpublished-import' : ' off' ,
31
- ' node/no-unpublished-require' : ' off' ,
32
- ' no-console' : ' off' ,
29
+ " node/no-extraneous-import" : " off" ,
30
+ " node/no-unpublished-import" : " off" ,
31
+ " node/no-unpublished-require" : " off" ,
32
+ " no-console" : " off" ,
33
33
} ,
34
34
} ,
35
35
{
36
36
env : {
37
- ' jest/globals' : true ,
37
+ " jest/globals" : true ,
38
38
} ,
39
- files : [ ' **/*.test.js' ] ,
39
+ files : [ " **/*.test.js" ] ,
40
40
rules : {
41
- ' import/no-extraneous-dependencies' : [
42
- ' error' ,
41
+ " import/no-extraneous-dependencies" : [
42
+ " error" ,
43
43
{
44
44
devDependencies : true ,
45
45
} ,
46
46
] ,
47
- 'no-magic-numbers' : 'off' ,
48
- 'node/no-extraneous-import' : 'off' ,
47
+ "no-magic-numbers" : "off" ,
48
+ "node/no-extraneous-import" : "off" ,
49
+ "jest/require-hook" : "error" ,
49
50
} ,
50
51
} ,
51
52
{
52
53
env : {
53
- ' jest/globals' : true ,
54
+ " jest/globals" : true ,
54
55
} ,
55
- files : [ ' **/__mocks__/**' ] ,
56
+ files : [ " **/__mocks__/**" ] ,
56
57
rules : {
57
- ' import/prefer-default-export' : ' off' ,
58
- ' no-magic-numbers' : ' off' ,
58
+ " import/prefer-default-export" : " off" ,
59
+ " no-magic-numbers" : " off" ,
59
60
} ,
60
61
} ,
61
62
] ,
62
63
parserOptions : {
63
64
ecmaVersion : 2021 ,
64
65
} ,
65
66
plugins : [
66
- ' prettier' ,
67
- ' promise' ,
68
- ' unicorn' ,
69
- ' array-func' ,
70
- ' node' ,
71
- ' eslint-comments' ,
72
- ' jest' ,
73
- ' simple-import-sort' ,
74
- ' editorconfig' ,
75
- ' security-node' ,
67
+ " prettier" ,
68
+ " promise" ,
69
+ " unicorn" ,
70
+ " array-func" ,
71
+ " node" ,
72
+ " eslint-comments" ,
73
+ " jest" ,
74
+ " simple-import-sort" ,
75
+ " editorconfig" ,
76
+ " security" ,
76
77
] ,
77
78
root : true ,
78
79
rules : {
79
- ' no-param-reassign' : [ ' error' , { props : false } ] ,
80
+ " no-param-reassign" : [ " error" , { props : false } ] ,
80
81
// 'consistent-return': 'off',
81
82
// 'arrow-body-style': 0,
82
83
// 'comma-dangle': 0,
83
84
// 'import/prefer-await-to-then': 'off',
84
85
// 'no-underscore-dangle': 'off',
85
- ' unicorn/no-null' : ' off' ,
86
- ' import/extensions' : [
87
- ' error' ,
88
- ' ignorePackages' ,
86
+ " unicorn/no-null" : " off" ,
87
+ " import/extensions" : [
88
+ " error" ,
89
+ " ignorePackages" ,
89
90
{
90
- js : ' never' ,
91
- ts : ' never' ,
92
- tsx : ' never' ,
91
+ js : " never" ,
92
+ ts : " never" ,
93
+ tsx : " never" ,
93
94
} ,
94
95
] ,
95
- ' no-void' : [ ' error' , { allowAsStatement : true } ] ,
96
- ' no-magic-numbers' : [
97
- ' error' ,
96
+ " no-void" : [ " error" , { allowAsStatement : true } ] ,
97
+ " no-magic-numbers" : [
98
+ " error" ,
98
99
{
99
100
ignore : [ 0 , 1 , - 1 ] ,
100
101
ignoreDefaultValues : true ,
101
102
} ,
102
103
] ,
103
- ' no-console' : ' off' ,
104
- ' jest/prefer-expect-assertions' : ' off' ,
105
- ' jest/no-conditional-expect' : ' off' ,
106
- ' jest/expect-expect' : ' off' ,
107
- ' jest/prefer-strict-equal' : ' off' ,
108
- ' unicorn/prefer-spread' : ' off' ,
109
- ' simple-import-sort/imports' : [
110
- ' error' ,
104
+ " no-console" : " off" ,
105
+ " jest/prefer-expect-assertions" : " off" ,
106
+ " jest/no-conditional-expect" : " off" ,
107
+ " jest/expect-expect" : " off" ,
108
+ " jest/prefer-strict-equal" : " off" ,
109
+ " unicorn/prefer-spread" : " off" ,
110
+ " simple-import-sort/imports" : [
111
+ " error" ,
111
112
{
112
113
groups : [
113
114
// Node.js builtins.
114
115
// eslint-disable-next-line global-require
115
- [ `^(${ require ( ' module' ) . builtinModules . join ( '|' ) } )(/|$)` ] ,
116
+ [ `^(${ require ( " module" ) . builtinModules . join ( "|" ) } )(/|$)` ] ,
116
117
// Packages.
117
- [ ' ^@?(\\w|.)[^./]' ] ,
118
+ [ " ^@?(\\w|.)[^./]" ] ,
118
119
// Side effect imports.
119
- [ ' ^\\u0000' ] ,
120
+ [ " ^\\u0000" ] ,
120
121
// Parent imports. Put `..` last.
121
- [ ' ^\\.\\.(?!/?$)' , ' ^\\.\\./?$' ] ,
122
+ [ " ^\\.\\.(?!/?$)" , " ^\\.\\./?$" ] ,
122
123
// Other relative imports. Put same-folder imports and `.` last.
123
- [ ' ^\\./(?=.*/)(?!/?$)' , ' ^\\.(?!/?$)' , ' ^\\./?$' ] ,
124
+ [ " ^\\./(?=.*/)(?!/?$)" , " ^\\.(?!/?$)" , " ^\\./?$" ] ,
124
125
] ,
125
126
} ,
126
127
] ,
127
- ' simple-import-sort/exports' : ' error' ,
128
- ' import/order' : ' off' ,
129
- ' no-loss-of-precision' : ' warn' ,
130
- ' promise/no-nesting' : ' error' ,
131
- ' unicorn/prefer-node-protocol' : ' off' ,
132
- 'security-node/detect-crlf' : ' warn' ,
133
- ' unicorn/no-unsafe-regex' : 'warn' ,
134
- ' unicorn/prefer-at' : ' off' ,
135
- 'unicorn/ no-process-exit' : ' off' ,
136
- ' no-process-exit' : ' off' ,
137
- ' unicorn/no-array-for-each' : ' off' ,
138
- ' unicorn/prefer-top-level-await' : ' off' ,
139
- 'unicorn/no-array-reduce' : ' off' ,
128
+ " simple-import-sort/exports" : " error" ,
129
+ " import/order" : " off" ,
130
+ " no-loss-of-precision" : " warn" ,
131
+ " promise/no-nesting" : " error" ,
132
+ " unicorn/prefer-node-protocol" : " off" ,
133
+ "unicorn/no-unsafe-regex" : " warn" ,
134
+ " unicorn/prefer-at" : "off" ,
135
+ " unicorn/no-process-exit" : " off" ,
136
+ " no-process-exit" : " off" ,
137
+ "unicorn/ no-array-for-each" : " off" ,
138
+ " unicorn/prefer-top-level-await" : " off" ,
139
+ " unicorn/no-array-reduce" : " off" ,
140
+ "jest/require-hook" : " off" ,
140
141
} ,
141
142
} ;
0 commit comments