@mimica/eslint-config 3.0.1 → 3.1.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/index.mjs +26 -42
- package/package.json +6 -1
package/index.mjs
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { fileURLToPath } from "node:url";
|
|
3
|
-
|
|
4
1
|
import js from "@eslint/js";
|
|
5
2
|
import { FlatCompat } from "@eslint/eslintrc";
|
|
6
3
|
|
|
@@ -12,10 +9,8 @@ import promise from "eslint-plugin-promise";
|
|
|
12
9
|
import youDontNeedLodashUnderscore from "eslint-plugin-you-dont-need-lodash-underscore";
|
|
13
10
|
import inker from "eslint-plugin-inker";
|
|
14
11
|
|
|
15
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
16
|
-
const __dirname = path.dirname(__filename);
|
|
17
12
|
const compat = new FlatCompat({
|
|
18
|
-
baseDirectory:
|
|
13
|
+
baseDirectory: import.meta.dirname,
|
|
19
14
|
recommendedConfig: js.configs.recommended,
|
|
20
15
|
allConfig: js.configs.all,
|
|
21
16
|
});
|
|
@@ -26,7 +21,6 @@ export default [
|
|
|
26
21
|
{
|
|
27
22
|
plugins: {
|
|
28
23
|
sonarjs,
|
|
29
|
-
unicorn,
|
|
30
24
|
inker,
|
|
31
25
|
promise,
|
|
32
26
|
"you-dont-need-lodash-underscore": youDontNeedLodashUnderscore,
|
|
@@ -45,22 +39,19 @@ export default [
|
|
|
45
39
|
},
|
|
46
40
|
|
|
47
41
|
rules: {
|
|
48
|
-
"arrow-parens": 0,
|
|
49
|
-
|
|
42
|
+
"arrow-parens": 0, // TODO: do not disable "arrow-parens" rule
|
|
50
43
|
camelcase: [
|
|
51
44
|
1,
|
|
52
45
|
{
|
|
53
46
|
allow: [],
|
|
54
47
|
},
|
|
55
48
|
],
|
|
56
|
-
|
|
57
49
|
"consistent-return": 0,
|
|
58
50
|
curly: [2, "all"],
|
|
59
51
|
"function-paren-newline": [0, "never"],
|
|
60
52
|
"guard-for-in": 1,
|
|
61
53
|
"implicit-arrow-linebreak": 0,
|
|
62
54
|
indent: 0,
|
|
63
|
-
|
|
64
55
|
"lines-between-class-members": [
|
|
65
56
|
2,
|
|
66
57
|
"always",
|
|
@@ -68,22 +59,18 @@ export default [
|
|
|
68
59
|
exceptAfterSingleLine: true,
|
|
69
60
|
},
|
|
70
61
|
],
|
|
71
|
-
|
|
72
62
|
"max-params": 2,
|
|
73
63
|
"no-confusing-arrow": 0,
|
|
74
64
|
"no-console": 2,
|
|
75
65
|
"no-continue": 0,
|
|
76
66
|
"no-loop-func": 1,
|
|
77
|
-
|
|
78
67
|
"no-param-reassign": [
|
|
79
68
|
2,
|
|
80
69
|
{
|
|
81
70
|
props: false,
|
|
82
71
|
},
|
|
83
72
|
],
|
|
84
|
-
|
|
85
73
|
"no-plusplus": 0,
|
|
86
|
-
|
|
87
74
|
"no-restricted-syntax": [
|
|
88
75
|
2,
|
|
89
76
|
"ForInStatement",
|
|
@@ -95,21 +82,12 @@ export default [
|
|
|
95
82
|
message: "Use #private instead.",
|
|
96
83
|
},
|
|
97
84
|
],
|
|
98
|
-
|
|
99
85
|
"no-underscore-dangle": 0,
|
|
100
86
|
"no-unused-private-class-members": 2,
|
|
101
|
-
|
|
102
|
-
"no-unused-vars": [
|
|
103
|
-
2,
|
|
104
|
-
{
|
|
105
|
-
args: "none",
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
|
|
87
|
+
"no-unused-vars": [2, { args: "none" }],
|
|
109
88
|
"no-useless-escape": 2,
|
|
110
89
|
"object-curly-newline": 0,
|
|
111
90
|
"operator-linebreak": 0,
|
|
112
|
-
|
|
113
91
|
"padding-line-between-statements": [
|
|
114
92
|
2,
|
|
115
93
|
{
|
|
@@ -143,7 +121,6 @@ export default [
|
|
|
143
121
|
next: "cjs-export",
|
|
144
122
|
},
|
|
145
123
|
],
|
|
146
|
-
|
|
147
124
|
"prefer-destructuring": [
|
|
148
125
|
2,
|
|
149
126
|
{
|
|
@@ -151,14 +128,14 @@ export default [
|
|
|
151
128
|
object: true,
|
|
152
129
|
},
|
|
153
130
|
],
|
|
154
|
-
|
|
155
131
|
quotes: [0, "double"],
|
|
156
132
|
semi: [2, "always"],
|
|
133
|
+
|
|
157
134
|
"sonarjs/no-inverted-boolean-check": 2,
|
|
158
135
|
"sonarjs/prefer-immediate-return": 2,
|
|
159
136
|
"sonarjs/prefer-while": 2,
|
|
160
|
-
"unicorn/better-regex": 2,
|
|
161
137
|
|
|
138
|
+
"unicorn/better-regex": 2,
|
|
162
139
|
"unicorn/catch-error-name": [
|
|
163
140
|
2,
|
|
164
141
|
{
|
|
@@ -166,7 +143,6 @@ export default [
|
|
|
166
143
|
ignore: ["error"],
|
|
167
144
|
},
|
|
168
145
|
],
|
|
169
|
-
|
|
170
146
|
"unicorn/consistent-destructuring": 2,
|
|
171
147
|
"unicorn/consistent-existence-index-check": 0,
|
|
172
148
|
"unicorn/consistent-function-scoping": 0,
|
|
@@ -177,29 +153,34 @@ export default [
|
|
|
177
153
|
"unicorn/import-style": 0,
|
|
178
154
|
"unicorn/no-anonymous-default-export": 0,
|
|
179
155
|
"unicorn/no-array-callback-reference": 0,
|
|
180
|
-
|
|
181
156
|
"unicorn/no-array-reduce": [
|
|
182
157
|
2,
|
|
183
158
|
{
|
|
184
159
|
allowSimpleOperations: false,
|
|
185
160
|
},
|
|
186
161
|
],
|
|
187
|
-
|
|
188
162
|
"unicorn/no-nested-ternary": 0,
|
|
189
163
|
"unicorn/no-null": 0,
|
|
190
164
|
"unicorn/no-process-exit": 0,
|
|
191
|
-
"unicorn/no-useless-undefined": 0,
|
|
165
|
+
"unicorn/no-useless-undefined": 0, // TODO: enable
|
|
192
166
|
"unicorn/numeric-separators-style": 0,
|
|
193
|
-
"unicorn/prefer-add-event-listener": 0,
|
|
167
|
+
"unicorn/prefer-add-event-listener": 0, // TODO: enable
|
|
194
168
|
"unicorn/prefer-module": 0,
|
|
195
169
|
"unicorn/prefer-query-selector": 0,
|
|
196
|
-
"unicorn/prefer-set-has": 0,
|
|
197
|
-
"unicorn/prefer-spread": 0,
|
|
170
|
+
"unicorn/prefer-set-has": 0, // TODO: enable
|
|
171
|
+
"unicorn/prefer-spread": 0, // TODO: enable
|
|
198
172
|
"unicorn/prefer-switch": 0,
|
|
199
|
-
"unicorn/prefer-ternary": 0,
|
|
173
|
+
"unicorn/prefer-ternary": 0, // TODO: enable
|
|
200
174
|
"unicorn/prefer-top-level-await": 0,
|
|
201
175
|
"unicorn/prevent-abbreviations": 0,
|
|
202
176
|
"unicorn/switch-case-braces": 0,
|
|
177
|
+
// "unicorn/template-indent": [
|
|
178
|
+
// 2,
|
|
179
|
+
// {
|
|
180
|
+
// selectors: ["TemplateLiteral"],
|
|
181
|
+
// comments: ["sql"],
|
|
182
|
+
// },
|
|
183
|
+
// ],
|
|
203
184
|
|
|
204
185
|
"inker/enforce-import-name": [
|
|
205
186
|
2,
|
|
@@ -207,7 +188,6 @@ export default [
|
|
|
207
188
|
paths: [
|
|
208
189
|
{
|
|
209
190
|
name: "path",
|
|
210
|
-
|
|
211
191
|
importNames: [
|
|
212
192
|
{
|
|
213
193
|
imported: "namespace",
|
|
@@ -221,7 +201,6 @@ export default [
|
|
|
221
201
|
},
|
|
222
202
|
{
|
|
223
203
|
name: "date-fns",
|
|
224
|
-
|
|
225
204
|
importNames: [
|
|
226
205
|
{
|
|
227
206
|
imported: "format",
|
|
@@ -235,7 +214,6 @@ export default [
|
|
|
235
214
|
},
|
|
236
215
|
{
|
|
237
216
|
name: "joi",
|
|
238
|
-
|
|
239
217
|
importNames: [
|
|
240
218
|
{
|
|
241
219
|
imported: "default",
|
|
@@ -245,7 +223,6 @@ export default [
|
|
|
245
223
|
},
|
|
246
224
|
{
|
|
247
225
|
name: "lodash",
|
|
248
|
-
|
|
249
226
|
importNames: [
|
|
250
227
|
{
|
|
251
228
|
imported: "namespace",
|
|
@@ -260,7 +237,6 @@ export default [
|
|
|
260
237
|
],
|
|
261
238
|
},
|
|
262
239
|
],
|
|
263
|
-
|
|
264
240
|
"inker/no-true-as-default": 2,
|
|
265
241
|
|
|
266
242
|
"import/order": [
|
|
@@ -280,19 +256,23 @@ export default [
|
|
|
280
256
|
},
|
|
281
257
|
],
|
|
282
258
|
|
|
259
|
+
// "promise/catch-or-return": 2,
|
|
283
260
|
"promise/no-new-statics": 2,
|
|
284
261
|
"promise/no-return-wrap": 2,
|
|
285
262
|
"promise/param-names": 2,
|
|
286
263
|
"promise/prefer-await-to-then": 2,
|
|
287
264
|
"promise/valid-params": 2,
|
|
265
|
+
|
|
288
266
|
"you-dont-need-lodash-underscore/concat": 2,
|
|
289
267
|
"you-dont-need-lodash-underscore/drop": 2,
|
|
290
268
|
"you-dont-need-lodash-underscore/drop-right": 2,
|
|
291
269
|
"you-dont-need-lodash-underscore/fill": 2,
|
|
292
270
|
"you-dont-need-lodash-underscore/find": 2,
|
|
293
271
|
"you-dont-need-lodash-underscore/find-index": 2,
|
|
272
|
+
// "you-dont-need-lodash-underscore/from-pairs": 2,
|
|
294
273
|
"you-dont-need-lodash-underscore/index-of": 2,
|
|
295
274
|
"you-dont-need-lodash-underscore/is-array": 2,
|
|
275
|
+
// "you-dont-need-lodash-underscore/is-array-buffer": 2,
|
|
296
276
|
"you-dont-need-lodash-underscore/join": 2,
|
|
297
277
|
"you-dont-need-lodash-underscore/last-index-of": 2,
|
|
298
278
|
"you-dont-need-lodash-underscore/slice": 2,
|
|
@@ -302,15 +282,18 @@ export default [
|
|
|
302
282
|
"you-dont-need-lodash-underscore/includes": 2,
|
|
303
283
|
"you-dont-need-lodash-underscore/is-nil": 2,
|
|
304
284
|
"you-dont-need-lodash-underscore/map": 2,
|
|
285
|
+
// "you-dont-need-lodash-underscore/pluck": 2,
|
|
305
286
|
"you-dont-need-lodash-underscore/reduce": 2,
|
|
306
287
|
"you-dont-need-lodash-underscore/reduce-right": 2,
|
|
307
288
|
"you-dont-need-lodash-underscore/size": 2,
|
|
308
289
|
"you-dont-need-lodash-underscore/some": 2,
|
|
309
290
|
"you-dont-need-lodash-underscore/bind": 2,
|
|
291
|
+
// "you-dont-need-lodash-underscore/partial": 2,
|
|
310
292
|
"you-dont-need-lodash-underscore/is-finite": 2,
|
|
311
293
|
"you-dont-need-lodash-underscore/is-integer": 2,
|
|
312
294
|
"you-dont-need-lodash-underscore/is-nan": 2,
|
|
313
295
|
"you-dont-need-lodash-underscore/assign": 2,
|
|
296
|
+
// "you-dont-need-lodash-underscore/extend": 2,
|
|
314
297
|
"you-dont-need-lodash-underscore/keys": 2,
|
|
315
298
|
"you-dont-need-lodash-underscore/to-pairs": 2,
|
|
316
299
|
"you-dont-need-lodash-underscore/values": 2,
|
|
@@ -321,8 +304,9 @@ export default [
|
|
|
321
304
|
"you-dont-need-lodash-underscore/replace": 2,
|
|
322
305
|
"you-dont-need-lodash-underscore/split": 2,
|
|
323
306
|
"you-dont-need-lodash-underscore/starts-with": 2,
|
|
324
|
-
"
|
|
307
|
+
// "you-dont-need-lodash-underscore/template": 2,
|
|
325
308
|
|
|
309
|
+
"eslint-comments/no-unused-disable": 2,
|
|
326
310
|
"eslint-comments/no-use": [
|
|
327
311
|
2,
|
|
328
312
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mimica/eslint-config",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Mimica eslint config",
|
|
5
5
|
"main": "index.mjs",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -37,5 +37,10 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"prettier": "^3.0.3"
|
|
40
|
+
},
|
|
41
|
+
"overrides": {
|
|
42
|
+
"eslint-config-airbnb-base": {
|
|
43
|
+
"eslint": "^9"
|
|
44
|
+
}
|
|
40
45
|
}
|
|
41
46
|
}
|