@pplancq/eslint-config 6.1.5 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +17 -1
- package/main.js +81 -25
- package/package.json +12 -9
- package/rules/base.js +2 -2
- package/rules/import.js +269 -262
- package/rules/playwright.js +3 -2
- package/rules/prettier.js +2 -2
- package/rules/react-jsx-a11y.js +216 -218
- package/rules/react.js +604 -591
- package/rules/typescript.js +554 -548
- package/rules/utils.js +63 -0
- package/rules/vitest.js +176 -168
package/rules/import.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable import/extensions */
|
|
2
|
+
import importXPlugin from "eslint-plugin-import-x";
|
|
3
|
+
import { prefix } from "./utils.js";
|
|
4
|
+
/* eslint-enable import/extensions */
|
|
2
5
|
|
|
3
|
-
export const importRules = {
|
|
6
|
+
export const importRules = ({ import: importNs = "import-x" } = {}) => ({
|
|
4
7
|
plugins: {
|
|
5
|
-
|
|
8
|
+
[importNs]: importXPlugin,
|
|
6
9
|
},
|
|
7
10
|
languageOptions: {
|
|
8
11
|
ecmaVersion: "latest",
|
|
@@ -11,268 +14,272 @@ export const importRules = {
|
|
|
11
14
|
es6: true,
|
|
12
15
|
},
|
|
13
16
|
},
|
|
14
|
-
rules:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
"
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
"
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
"
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
17
|
+
rules: prefix(
|
|
18
|
+
{
|
|
19
|
+
// eslint-plugin-import-x https://github.com/un-ts/eslint-plugin-import-x
|
|
20
|
+
|
|
21
|
+
// import-x/consistent-type-specifier-style
|
|
22
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/consistent-type-specifier-style.md
|
|
23
|
+
"import-x/consistent-type-specifier-style": "off",
|
|
24
|
+
|
|
25
|
+
// import-x/default
|
|
26
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/default.md
|
|
27
|
+
"import-x/default": "off",
|
|
28
|
+
|
|
29
|
+
// import-x/dynamic-import-chunkname
|
|
30
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/dynamic-import-chunkname.md
|
|
31
|
+
"import-x/dynamic-import-chunkname": [
|
|
32
|
+
"off",
|
|
33
|
+
{
|
|
34
|
+
importFunctions: [],
|
|
35
|
+
webpackChunknameFormat: "[0-9a-zA-Z-_/.]+",
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
|
|
39
|
+
// import-x/export
|
|
40
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/export.md
|
|
41
|
+
"import-x/export": "error",
|
|
42
|
+
|
|
43
|
+
// import-x/exports-last
|
|
44
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/exports-last.md
|
|
45
|
+
"import-x/exports-last": "off",
|
|
46
|
+
|
|
47
|
+
// import-x/extensions
|
|
48
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/extensions.md
|
|
49
|
+
"import-x/extensions": [
|
|
50
|
+
"error",
|
|
51
|
+
"ignorePackages",
|
|
52
|
+
{
|
|
53
|
+
js: "never",
|
|
54
|
+
mjs: "never",
|
|
55
|
+
jsx: "never",
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
|
|
59
|
+
// import-x/first
|
|
60
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/first.md
|
|
61
|
+
"import-x/first": "error",
|
|
62
|
+
|
|
63
|
+
// import-x/group-exports
|
|
64
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/group-exports.md
|
|
65
|
+
"import-x/group-exports": "off",
|
|
66
|
+
|
|
67
|
+
// import-x/imports-first
|
|
68
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/imports-first.md
|
|
69
|
+
// This rule is deprecated.
|
|
70
|
+
"import-x/imports-first": "off",
|
|
71
|
+
|
|
72
|
+
// import-x/max-dependencies
|
|
73
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/max-dependencies.md
|
|
74
|
+
"import-x/max-dependencies": ["off", { max: 10 }],
|
|
75
|
+
|
|
76
|
+
// import-x/named
|
|
77
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/named.md
|
|
78
|
+
"import-x/named": "error",
|
|
79
|
+
|
|
80
|
+
// import-x/namespace
|
|
81
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/namespace.md
|
|
82
|
+
"import-x/namespace": "off",
|
|
83
|
+
|
|
84
|
+
// import-x/newline-after-import
|
|
85
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/newline-after-import.md
|
|
86
|
+
"import-x/newline-after-import": "error",
|
|
87
|
+
|
|
88
|
+
// import-x/no-absolute-path
|
|
89
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-absolute-path.md
|
|
90
|
+
"import-x/no-absolute-path": "error",
|
|
91
|
+
|
|
92
|
+
// import-x/no-amd
|
|
93
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-amd.md
|
|
94
|
+
"import-x/no-amd": "error",
|
|
95
|
+
|
|
96
|
+
// import-x/no-anonymous-default-export
|
|
97
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-anonymous-default-export.md
|
|
98
|
+
"import-x/no-anonymous-default-export": [
|
|
99
|
+
"off",
|
|
100
|
+
{
|
|
101
|
+
allowArray: false,
|
|
102
|
+
allowArrowFunction: false,
|
|
103
|
+
allowAnonymousClass: false,
|
|
104
|
+
allowAnonymousFunction: false,
|
|
105
|
+
allowLiteral: false,
|
|
106
|
+
allowObject: false,
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
|
|
110
|
+
// import-x/no-commonjs
|
|
111
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-commonjs.md
|
|
112
|
+
"import-x/no-commonjs": "off",
|
|
113
|
+
|
|
114
|
+
// import-x/no-cycle
|
|
115
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-cycle.md
|
|
116
|
+
"import-x/no-cycle": ["error", { maxDepth: "∞" }],
|
|
117
|
+
|
|
118
|
+
// import-x/no-default-export
|
|
119
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-default-export.md
|
|
120
|
+
"import-x/no-default-export": "error",
|
|
121
|
+
|
|
122
|
+
// import-x/no-deprecated
|
|
123
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-deprecated.md
|
|
124
|
+
"import-x/no-deprecated": "off",
|
|
125
|
+
|
|
126
|
+
// import-x/no-duplicates
|
|
127
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-duplicates.md
|
|
128
|
+
"import-x/no-duplicates": "error",
|
|
129
|
+
|
|
130
|
+
// import-x/no-dynamic-require
|
|
131
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-dynamic-require.md
|
|
132
|
+
"import-x/no-dynamic-require": "error",
|
|
133
|
+
|
|
134
|
+
// import-x/no-empty-named-blocks
|
|
135
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-empty-named-blocks.md
|
|
136
|
+
"import-x/no-empty-named-blocks": "off",
|
|
137
|
+
|
|
138
|
+
// import-x/no-extraneous-dependencies
|
|
139
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-extraneous-dependencies.md
|
|
140
|
+
"import-x/no-extraneous-dependencies": [
|
|
141
|
+
"error",
|
|
142
|
+
{
|
|
143
|
+
devDependencies: [
|
|
144
|
+
"test/**", // tape, common npm pattern
|
|
145
|
+
"tests/**", // also common npm pattern
|
|
146
|
+
"spec/**", // mocha, rspec-like pattern
|
|
147
|
+
"**/__tests__/**", // jest pattern
|
|
148
|
+
"**/__mocks__/**", // jest pattern
|
|
149
|
+
"test.{js,jsx}", // repos with a single test file
|
|
150
|
+
"test-*.{js,jsx}", // repos with multiple top-level test files
|
|
151
|
+
"**/*{.,_}{test,spec}.{js,jsx}", // tests where the extension or filename suffix denotes that it is a test
|
|
152
|
+
"**/jest.config.js", // jest config
|
|
153
|
+
"**/jest.setup.js", // jest setup
|
|
154
|
+
"**/vue.config.js", // vue-cli config
|
|
155
|
+
"**/webpack.config.js", // webpack config
|
|
156
|
+
"**/webpack.config.*.js", // webpack config
|
|
157
|
+
"**/rollup.config.js", // rollup config
|
|
158
|
+
"**/rollup.config.*.js", // rollup config
|
|
159
|
+
"**/gulpfile.js", // gulp config
|
|
160
|
+
"**/gulpfile.*.js", // gulp config
|
|
161
|
+
"**/Gruntfile{,.js}", // grunt config
|
|
162
|
+
"**/protractor.conf.js", // protractor config
|
|
163
|
+
"**/protractor.conf.*.js", // protractor config
|
|
164
|
+
"**/karma.conf.js", // karma config
|
|
165
|
+
"**/.eslintrc.js", // eslint config
|
|
166
|
+
],
|
|
167
|
+
optionalDependencies: false,
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
|
|
171
|
+
// import-x/no-import-module-exports
|
|
172
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-import-module-exports.md
|
|
173
|
+
"import-x/no-import-module-exports": [
|
|
174
|
+
"error",
|
|
175
|
+
{
|
|
176
|
+
exceptions: [],
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
|
|
180
|
+
// import-x/no-internal-modules
|
|
181
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-internal-modules.md
|
|
182
|
+
"import-x/no-internal-modules": [
|
|
183
|
+
"off",
|
|
184
|
+
{
|
|
185
|
+
allow: [],
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
|
|
189
|
+
// import-x/no-mutable-exports
|
|
190
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-mutable-exports.md
|
|
191
|
+
"import-x/no-mutable-exports": "error",
|
|
192
|
+
|
|
193
|
+
// import-x/no-named-as-default
|
|
194
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-as-default.md
|
|
195
|
+
"import-x/no-named-as-default": "error",
|
|
196
|
+
|
|
197
|
+
// import-x/no-named-as-default-member
|
|
198
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-as-default-member.md
|
|
199
|
+
"import-x/no-named-as-default-member": "error",
|
|
200
|
+
|
|
201
|
+
// import-x/no-named-default
|
|
202
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-default.md
|
|
203
|
+
"import-x/no-named-default": "error",
|
|
204
|
+
|
|
205
|
+
// import-x/no-named-export
|
|
206
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-export.md
|
|
207
|
+
"import-x/no-named-export": "off",
|
|
208
|
+
|
|
209
|
+
// import-x/no-namespace
|
|
210
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-namespace.md
|
|
211
|
+
"import-x/no-namespace": "off",
|
|
212
|
+
|
|
213
|
+
// import-x/no-nodejs-modules
|
|
214
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-nodejs-modules.md
|
|
215
|
+
"import-x/no-nodejs-modules": "off",
|
|
216
|
+
|
|
217
|
+
// import-x/no-relative-packages
|
|
218
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-relative-packages.md
|
|
219
|
+
"import-x/no-relative-packages": "error",
|
|
220
|
+
|
|
221
|
+
// import-x/no-relative-parent-imports
|
|
222
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-relative-parent-imports.md
|
|
223
|
+
"import-x/no-relative-parent-imports": "off",
|
|
224
|
+
|
|
225
|
+
// import-x/no-restricted-paths
|
|
226
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-restricted-paths.md
|
|
227
|
+
"import-x/no-restricted-paths": "off",
|
|
228
|
+
|
|
229
|
+
// import-x/no-self-import
|
|
230
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-self-import.md
|
|
231
|
+
"import-x/no-self-import": "error",
|
|
232
|
+
|
|
233
|
+
// import-x/no-unassigned-import
|
|
234
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unassigned-import.md
|
|
235
|
+
"import-x/no-unassigned-import": "off",
|
|
236
|
+
|
|
237
|
+
// import-x/no-unresolved
|
|
238
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unresolved.md
|
|
239
|
+
"import-x/no-unresolved": ["error", { commonjs: true, caseSensitive: true }],
|
|
240
|
+
|
|
241
|
+
// import-x/no-unused-modules
|
|
242
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-unused-modules.md
|
|
243
|
+
"import-x/no-unused-modules": [
|
|
244
|
+
"off",
|
|
245
|
+
{
|
|
246
|
+
ignoreExports: [],
|
|
247
|
+
missingExports: true,
|
|
248
|
+
unusedExports: true,
|
|
249
|
+
},
|
|
250
|
+
],
|
|
251
|
+
|
|
252
|
+
// import-x/no-useless-path-segments
|
|
253
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-useless-path-segments.md
|
|
254
|
+
"import-x/no-useless-path-segments": ["error", { commonjs: true }],
|
|
255
|
+
|
|
256
|
+
// import-x/no-webpack-loader-syntax
|
|
257
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-webpack-loader-syntax.md
|
|
258
|
+
"import-x/no-webpack-loader-syntax": "error",
|
|
259
|
+
|
|
260
|
+
// import-x/order
|
|
261
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/order.md
|
|
262
|
+
"import-x/order": ["error", { groups: [["builtin", "external", "internal"]] }],
|
|
263
|
+
|
|
264
|
+
// import-x/prefer-default-export
|
|
265
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/prefer-default-export.md
|
|
266
|
+
"import-x/prefer-default-export": "off",
|
|
267
|
+
|
|
268
|
+
// import-x/unambiguous
|
|
269
|
+
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/unambiguous.md
|
|
270
|
+
"import-x/unambiguous": "off",
|
|
271
|
+
},
|
|
272
|
+
"import-x",
|
|
273
|
+
importNs,
|
|
274
|
+
),
|
|
268
275
|
settings: {
|
|
269
|
-
"import/extensions": [".js", ".mjs", ".jsx"],
|
|
270
|
-
"import/core-modules": [],
|
|
271
|
-
"import/ignore": ["node_modules", String.raw`\.(coffee|scss|css|less|hbs|svg|json)$`],
|
|
272
|
-
"import/resolver": {
|
|
276
|
+
"import-x/extensions": [".js", ".mjs", ".jsx"],
|
|
277
|
+
"import-x/core-modules": [],
|
|
278
|
+
"import-x/ignore": ["node_modules", String.raw`\.(coffee|scss|css|less|hbs|svg|json)$`],
|
|
279
|
+
"import-x/resolver": {
|
|
273
280
|
node: {
|
|
274
281
|
extensions: [".js"],
|
|
275
282
|
},
|
|
276
283
|
},
|
|
277
284
|
},
|
|
278
|
-
};
|
|
285
|
+
});
|
package/rules/playwright.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import playwrightPlugin from "eslint-plugin-playwright";
|
|
2
2
|
import globals from "globals";
|
|
3
3
|
|
|
4
|
-
export const playwrightRules = {
|
|
4
|
+
export const playwrightRules = ({ files } = {}) => ({
|
|
5
5
|
plugins: {
|
|
6
6
|
playwright: playwrightPlugin,
|
|
7
7
|
},
|
|
@@ -220,4 +220,5 @@ export const playwrightRules = {
|
|
|
220
220
|
// https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/valid-title.md
|
|
221
221
|
"playwright/valid-title": "error",
|
|
222
222
|
},
|
|
223
|
-
|
|
223
|
+
files,
|
|
224
|
+
});
|
package/rules/prettier.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
2
|
import prettierPlugin from "eslint-plugin-prettier";
|
|
3
3
|
|
|
4
|
-
export const prettierRules = {
|
|
4
|
+
export const prettierRules = () => ({
|
|
5
5
|
plugins: {
|
|
6
6
|
prettier: prettierPlugin,
|
|
7
7
|
},
|
|
@@ -10,4 +10,4 @@ export const prettierRules = {
|
|
|
10
10
|
// https://github.com/prettier/eslint-plugin-prettier
|
|
11
11
|
"prettier/prettier": "error",
|
|
12
12
|
},
|
|
13
|
-
};
|
|
13
|
+
});
|