@pplancq/eslint-config 6.0.17 → 6.0.18
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 +11 -0
- package/README.md +1 -1
- package/bin/init.mjs +4 -4
- package/main.js +18 -18
- package/package.json +9 -9
- package/rules/base.js +509 -509
- package/rules/import.js +87 -87
- package/rules/playwright.js +55 -55
- package/rules/prettier.js +107 -107
- package/rules/react-jsx-a11y.js +70 -70
- package/rules/react.js +256 -256
- package/rules/typescript.js +157 -157
- package/rules/vitest.js +56 -56
package/rules/import.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import importPlugin from
|
|
1
|
+
import importPlugin from "eslint-plugin-import";
|
|
2
2
|
|
|
3
3
|
export const importRules = {
|
|
4
4
|
plugins: {
|
|
5
5
|
import: importPlugin,
|
|
6
6
|
},
|
|
7
7
|
languageOptions: {
|
|
8
|
-
ecmaVersion:
|
|
9
|
-
sourceType:
|
|
8
|
+
ecmaVersion: "latest",
|
|
9
|
+
sourceType: "module",
|
|
10
10
|
globals: {
|
|
11
11
|
es6: true,
|
|
12
12
|
},
|
|
@@ -16,83 +16,83 @@ export const importRules = {
|
|
|
16
16
|
|
|
17
17
|
// import/consistent-type-specifier-style
|
|
18
18
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/consistent-type-specifier-style.md
|
|
19
|
-
|
|
19
|
+
"import/consistent-type-specifier-style": "off",
|
|
20
20
|
|
|
21
21
|
// import/default
|
|
22
22
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/default.md
|
|
23
|
-
|
|
23
|
+
"import/default": "off",
|
|
24
24
|
|
|
25
25
|
// import/dynamic-import-chunkname
|
|
26
26
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/dynamic-import-chunkname.md
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
"import/dynamic-import-chunkname": [
|
|
28
|
+
"off",
|
|
29
29
|
{
|
|
30
30
|
importFunctions: [],
|
|
31
|
-
webpackChunknameFormat:
|
|
31
|
+
webpackChunknameFormat: "[0-9a-zA-Z-_/.]+",
|
|
32
32
|
},
|
|
33
33
|
],
|
|
34
34
|
|
|
35
35
|
// import/export
|
|
36
36
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/export.md
|
|
37
|
-
|
|
37
|
+
"import/export": "error",
|
|
38
38
|
|
|
39
39
|
// import/exports-last
|
|
40
40
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/exports-last.md
|
|
41
|
-
|
|
41
|
+
"import/exports-last": "off",
|
|
42
42
|
|
|
43
43
|
// import/extensions
|
|
44
44
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/extensions.md
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
"import/extensions": [
|
|
46
|
+
"error",
|
|
47
|
+
"ignorePackages",
|
|
48
48
|
{
|
|
49
|
-
js:
|
|
50
|
-
mjs:
|
|
51
|
-
jsx:
|
|
49
|
+
js: "never",
|
|
50
|
+
mjs: "never",
|
|
51
|
+
jsx: "never",
|
|
52
52
|
},
|
|
53
53
|
],
|
|
54
54
|
|
|
55
55
|
// import/first
|
|
56
56
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md
|
|
57
|
-
|
|
57
|
+
"import/first": "error",
|
|
58
58
|
|
|
59
59
|
// import/group-exports
|
|
60
60
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/group-exports.md
|
|
61
|
-
|
|
61
|
+
"import/group-exports": "off",
|
|
62
62
|
|
|
63
63
|
// import/imports-first
|
|
64
64
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/imports-first.md
|
|
65
65
|
// This rule is deprecated.
|
|
66
|
-
|
|
66
|
+
"import/imports-first": "off",
|
|
67
67
|
|
|
68
68
|
// import/max-dependencies
|
|
69
69
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/max-dependencies.md
|
|
70
|
-
|
|
70
|
+
"import/max-dependencies": ["off", { max: 10 }],
|
|
71
71
|
|
|
72
72
|
// import/named
|
|
73
73
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/named.md
|
|
74
|
-
|
|
74
|
+
"import/named": "error",
|
|
75
75
|
|
|
76
76
|
// import/namespace
|
|
77
77
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/namespace.md
|
|
78
|
-
|
|
78
|
+
"import/namespace": "off",
|
|
79
79
|
|
|
80
80
|
// import/newline-after-import
|
|
81
81
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/newline-after-import.md
|
|
82
|
-
|
|
82
|
+
"import/newline-after-import": "error",
|
|
83
83
|
|
|
84
84
|
// import/no-absolute-path
|
|
85
85
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-absolute-path.md
|
|
86
|
-
|
|
86
|
+
"import/no-absolute-path": "error",
|
|
87
87
|
|
|
88
88
|
// import/no-amd
|
|
89
89
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-amd.md
|
|
90
|
-
|
|
90
|
+
"import/no-amd": "error",
|
|
91
91
|
|
|
92
92
|
// import/no-anonymous-default-export
|
|
93
93
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-anonymous-default-export.md
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
"import/no-anonymous-default-export": [
|
|
95
|
+
"off",
|
|
96
96
|
{
|
|
97
97
|
allowArray: false,
|
|
98
98
|
allowArrowFunction: false,
|
|
@@ -105,60 +105,60 @@ export const importRules = {
|
|
|
105
105
|
|
|
106
106
|
// import/no-commonjs
|
|
107
107
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-commonjs.md
|
|
108
|
-
|
|
108
|
+
"import/no-commonjs": "off",
|
|
109
109
|
|
|
110
110
|
// import/no-cycle
|
|
111
111
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-cycle.md
|
|
112
|
-
|
|
112
|
+
"import/no-cycle": ["error", { maxDepth: "∞" }],
|
|
113
113
|
|
|
114
114
|
// import/no-default-export
|
|
115
115
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md
|
|
116
|
-
|
|
116
|
+
"import/no-default-export": "error",
|
|
117
117
|
|
|
118
118
|
// import/no-deprecated
|
|
119
119
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-deprecated.md
|
|
120
|
-
|
|
120
|
+
"import/no-deprecated": "off",
|
|
121
121
|
|
|
122
122
|
// import/no-duplicates
|
|
123
123
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-duplicates.md
|
|
124
|
-
|
|
124
|
+
"import/no-duplicates": "error",
|
|
125
125
|
|
|
126
126
|
// import/no-dynamic-require
|
|
127
127
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-dynamic-require.md
|
|
128
|
-
|
|
128
|
+
"import/no-dynamic-require": "error",
|
|
129
129
|
|
|
130
130
|
// import/no-empty-named-blocks
|
|
131
131
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-empty-named-blocks.md
|
|
132
|
-
|
|
132
|
+
"import/no-empty-named-blocks": "off",
|
|
133
133
|
|
|
134
134
|
// import/no-extraneous-dependencies
|
|
135
135
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
"import/no-extraneous-dependencies": [
|
|
137
|
+
"error",
|
|
138
138
|
{
|
|
139
139
|
devDependencies: [
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
140
|
+
"test/**", // tape, common npm pattern
|
|
141
|
+
"tests/**", // also common npm pattern
|
|
142
|
+
"spec/**", // mocha, rspec-like pattern
|
|
143
|
+
"**/__tests__/**", // jest pattern
|
|
144
|
+
"**/__mocks__/**", // jest pattern
|
|
145
|
+
"test.{js,jsx}", // repos with a single test file
|
|
146
|
+
"test-*.{js,jsx}", // repos with multiple top-level test files
|
|
147
|
+
"**/*{.,_}{test,spec}.{js,jsx}", // tests where the extension or filename suffix denotes that it is a test
|
|
148
|
+
"**/jest.config.js", // jest config
|
|
149
|
+
"**/jest.setup.js", // jest setup
|
|
150
|
+
"**/vue.config.js", // vue-cli config
|
|
151
|
+
"**/webpack.config.js", // webpack config
|
|
152
|
+
"**/webpack.config.*.js", // webpack config
|
|
153
|
+
"**/rollup.config.js", // rollup config
|
|
154
|
+
"**/rollup.config.*.js", // rollup config
|
|
155
|
+
"**/gulpfile.js", // gulp config
|
|
156
|
+
"**/gulpfile.*.js", // gulp config
|
|
157
|
+
"**/Gruntfile{,.js}", // grunt config
|
|
158
|
+
"**/protractor.conf.js", // protractor config
|
|
159
|
+
"**/protractor.conf.*.js", // protractor config
|
|
160
|
+
"**/karma.conf.js", // karma config
|
|
161
|
+
"**/.eslintrc.js", // eslint config
|
|
162
162
|
],
|
|
163
163
|
optionalDependencies: false,
|
|
164
164
|
},
|
|
@@ -166,8 +166,8 @@ export const importRules = {
|
|
|
166
166
|
|
|
167
167
|
// import/no-import-module-exports
|
|
168
168
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-import-module-exports.md
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
"import/no-import-module-exports": [
|
|
170
|
+
"error",
|
|
171
171
|
{
|
|
172
172
|
exceptions: [],
|
|
173
173
|
},
|
|
@@ -175,8 +175,8 @@ export const importRules = {
|
|
|
175
175
|
|
|
176
176
|
// import/no-internal-modules
|
|
177
177
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-internal-modules.md
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
"import/no-internal-modules": [
|
|
179
|
+
"off",
|
|
180
180
|
{
|
|
181
181
|
allow: [],
|
|
182
182
|
},
|
|
@@ -184,60 +184,60 @@ export const importRules = {
|
|
|
184
184
|
|
|
185
185
|
// import/no-mutable-exports
|
|
186
186
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-mutable-exports.md
|
|
187
|
-
|
|
187
|
+
"import/no-mutable-exports": "error",
|
|
188
188
|
|
|
189
189
|
// import/no-named-as-default
|
|
190
190
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-as-default.md
|
|
191
|
-
|
|
191
|
+
"import/no-named-as-default": "error",
|
|
192
192
|
|
|
193
193
|
// import/no-named-as-default-member
|
|
194
194
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-as-default-member.md
|
|
195
|
-
|
|
195
|
+
"import/no-named-as-default-member": "error",
|
|
196
196
|
|
|
197
197
|
// import/no-named-default
|
|
198
198
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-default.md
|
|
199
|
-
|
|
199
|
+
"import/no-named-default": "error",
|
|
200
200
|
|
|
201
201
|
// import/no-named-export
|
|
202
202
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-export.md
|
|
203
|
-
|
|
203
|
+
"import/no-named-export": "off",
|
|
204
204
|
|
|
205
205
|
// import/no-namespace
|
|
206
206
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-namespace.md
|
|
207
|
-
|
|
207
|
+
"import/no-namespace": "off",
|
|
208
208
|
|
|
209
209
|
// import/no-nodejs-modules
|
|
210
210
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-nodejs-modules.md
|
|
211
|
-
|
|
211
|
+
"import/no-nodejs-modules": "off",
|
|
212
212
|
|
|
213
213
|
// import/no-relative-packages
|
|
214
214
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-relative-packages.md
|
|
215
|
-
|
|
215
|
+
"import/no-relative-packages": "error",
|
|
216
216
|
|
|
217
217
|
// import/no-relative-parent-imports
|
|
218
218
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-relative-parent-imports.md
|
|
219
|
-
|
|
219
|
+
"import/no-relative-parent-imports": "off",
|
|
220
220
|
|
|
221
221
|
// import/no-restricted-paths
|
|
222
222
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-restricted-paths.md
|
|
223
|
-
|
|
223
|
+
"import/no-restricted-paths": "off",
|
|
224
224
|
|
|
225
225
|
// import/no-self-import
|
|
226
226
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-self-import.md
|
|
227
|
-
|
|
227
|
+
"import/no-self-import": "error",
|
|
228
228
|
|
|
229
229
|
// import/no-unassigned-import
|
|
230
230
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unassigned-import.md
|
|
231
|
-
|
|
231
|
+
"import/no-unassigned-import": "off",
|
|
232
232
|
|
|
233
233
|
// import/no-unresolved
|
|
234
234
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unresolved.md
|
|
235
|
-
|
|
235
|
+
"import/no-unresolved": ["error", { commonjs: true, caseSensitive: true }],
|
|
236
236
|
|
|
237
237
|
// import/no-unused-modules
|
|
238
238
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unused-modules.md
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
"import/no-unused-modules": [
|
|
240
|
+
"off",
|
|
241
241
|
{
|
|
242
242
|
ignoreExports: [],
|
|
243
243
|
missingExports: true,
|
|
@@ -247,31 +247,31 @@ export const importRules = {
|
|
|
247
247
|
|
|
248
248
|
// import/no-useless-path-segments
|
|
249
249
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-useless-path-segments.md
|
|
250
|
-
|
|
250
|
+
"import/no-useless-path-segments": ["error", { commonjs: true }],
|
|
251
251
|
|
|
252
252
|
// import/no-webpack-loader-syntax
|
|
253
253
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-webpack-loader-syntax.md
|
|
254
|
-
|
|
254
|
+
"import/no-webpack-loader-syntax": "error",
|
|
255
255
|
|
|
256
256
|
// import/order
|
|
257
257
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md
|
|
258
|
-
|
|
258
|
+
"import/order": ["error", { groups: [["builtin", "external", "internal"]] }],
|
|
259
259
|
|
|
260
260
|
// import/prefer-default-export
|
|
261
261
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/prefer-default-export.md
|
|
262
|
-
|
|
262
|
+
"import/prefer-default-export": "off",
|
|
263
263
|
|
|
264
264
|
// import/unambiguous
|
|
265
265
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/unambiguous.md
|
|
266
|
-
|
|
266
|
+
"import/unambiguous": "off",
|
|
267
267
|
},
|
|
268
268
|
settings: {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
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": {
|
|
273
273
|
node: {
|
|
274
|
-
extensions: [
|
|
274
|
+
extensions: [".js"],
|
|
275
275
|
},
|
|
276
276
|
},
|
|
277
277
|
},
|