eslint-config-heck 3.0.0 → 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.
Files changed (3) hide show
  1. package/node.cjs +183 -145
  2. package/nodeWithBiome.cjs +169 -125
  3. package/package.json +4 -3
package/node.cjs CHANGED
@@ -20,7 +20,7 @@ const env = {
20
20
 
21
21
  const globals = {};
22
22
  const extendConfigs = ["plugin:import/typescript"];
23
- const plugins = ["react", "react-hooks", "unicorn", "import"];
23
+ const plugins = ["@stylistic", "react", "react-hooks", "unicorn", "import"];
24
24
  const settings = {
25
25
  react: {
26
26
  version: "detect",
@@ -29,26 +29,37 @@ const settings = {
29
29
 
30
30
  const rules = {
31
31
  // Possible problems
32
+ "array-callback-return": [
33
+ "error",
34
+ {
35
+ allowImplicit: true,
36
+ checkForEach: false,
37
+ },
38
+ ],
39
+ "constructor-super": "error",
32
40
  "for-direction": "error",
33
41
  "getter-return": "error",
34
42
  "no-async-promise-executor": "error",
35
43
  "no-await-in-loop": "warn",
44
+ "no-class-assign": "error",
36
45
  "no-compare-neg-zero": "error",
37
46
  "no-cond-assign": "error",
38
- "no-console": "error",
47
+ "no-const-assign": "error",
39
48
  "no-constant-binary-expression": "error",
40
49
  "no-constant-condition": "error",
50
+ "no-constructor-return": "error",
41
51
  "no-control-regex": "error",
42
52
  "no-debugger": "error",
43
53
  "no-dupe-args": "error",
54
+ "no-dupe-class-members": "error",
44
55
  "no-dupe-else-if": "error",
45
56
  "no-dupe-keys": "error",
46
57
  "no-duplicate-case": "error",
47
- "no-empty": "error",
58
+ "no-duplicate-imports": "off",
48
59
  "no-empty-character-class": "error",
60
+ "no-empty-pattern": "error",
49
61
  "no-ex-assign": "error",
50
- "no-extra-boolean-cast": "error",
51
- "no-extra-semi": "error",
62
+ "no-fallthrough": "error",
52
63
  "no-func-assign": "error",
53
64
  "no-import-assign": "error",
54
65
  "no-inner-declarations": "error",
@@ -65,14 +76,19 @@ const rules = {
65
76
  "no-loss-of-precision": "error",
66
77
  "no-misleading-character-class": "error",
67
78
  "no-new-native-nonconstructor": "error",
79
+ "no-new-symbol": "error",
68
80
  "no-obj-calls": "error",
69
81
  "no-promise-executor-return": "error",
70
82
  "no-prototype-builtins": "error",
71
- "no-regex-spaces": "error",
83
+ "no-self-assign": "error",
84
+ "no-self-compare": "error",
72
85
  "no-setter-return": "error",
73
86
  "no-sparse-arrays": "error",
74
87
  "no-template-curly-in-string": "error",
88
+ "no-this-before-super": "off",
89
+ "no-undef": "error",
75
90
  "no-unexpected-multiline": "error",
91
+ "no-unmodified-loop-condition": "error",
76
92
  "no-unreachable": "error",
77
93
  "no-unreachable-loop": "error",
78
94
  "no-unsafe-finally": "error",
@@ -83,6 +99,15 @@ const rules = {
83
99
  disallowArithmeticOperators: true,
84
100
  },
85
101
  ],
102
+ "no-unused-private-class-members": "error",
103
+ "no-unused-vars": [
104
+ "error",
105
+ {
106
+ args: "after-used",
107
+ caughtErrors: "all",
108
+ },
109
+ ],
110
+ "no-use-before-define": ["error", "nofunc"],
86
111
  "no-useless-backreference": "error",
87
112
  "require-atomic-updates": "error",
88
113
  "use-isnan": "error",
@@ -97,31 +122,58 @@ const rules = {
97
122
  enforceForClassMembers: true,
98
123
  },
99
124
  ],
100
- "array-callback-return": [
101
- "error",
102
- {
103
- allowImplicit: true,
104
- checkForEach: false,
105
- },
106
- ],
125
+ "arrow-body-style": ["error", "as-needed"],
107
126
  "block-scoped-var": "error",
127
+ camelcase: "off",
128
+ "capitalized-comments": "off",
108
129
  "class-methods-use-this": "error",
109
130
  complexity: "off",
110
131
  "consistent-return": "error",
132
+ "consistent-this": ["error", "that"],
111
133
  curly: ["error", "all"],
112
134
  "default-case": "off",
113
135
  "default-case-last": "error",
114
136
  "default-param-last": "error",
115
137
  "dot-notation": "error",
116
138
  eqeqeq: ["error", "always"],
139
+ "func-name-matching": "off",
140
+ "func-names": "off",
141
+ "func-style": ["error", "declaration", { allowArrowFunctions: true }],
117
142
  "grouped-accessor-pairs": ["error", "getBeforeSet"],
118
143
  "guard-for-in": "error",
144
+ "id-denylist": "off",
145
+ "id-length": [
146
+ "error",
147
+ {
148
+ exceptions: ["_", "i", "j", "x", "y", "z"],
149
+ },
150
+ ],
151
+ "id-match": "off",
152
+ "init-declarations": "off",
119
153
  "logical-assignment-operators": "error",
120
154
  "max-classes-per-file": "off",
155
+ "max-depth": "off",
156
+ "max-lines": "off",
157
+ "max-lines-per-function": "off",
158
+ "max-nested-callbacks": "off",
159
+ "max-params": "off",
160
+ "max-statements": "off",
161
+ "multiline-comment-style": "off",
162
+ "new-cap": "error",
121
163
  "no-alert": "error",
164
+ "no-array-constructor": "error",
165
+ "no-bitwise": [
166
+ "error",
167
+ {
168
+ allow: [],
169
+ int32Hint: false,
170
+ },
171
+ ],
122
172
  "no-caller": "error",
123
173
  "no-case-declarations": "error",
124
- "no-constructor-return": "error",
174
+ "no-console": "error",
175
+ "no-continue": "off",
176
+ "no-delete-var": "error",
125
177
  "no-div-regex": "off",
126
178
  "no-else-return": [
127
179
  "error",
@@ -129,31 +181,38 @@ const rules = {
129
181
  allowElseIf: false,
130
182
  },
131
183
  ],
184
+ "no-empty": "error",
132
185
  "no-empty-function": "error",
133
- "no-empty-pattern": "error",
134
186
  "no-empty-static-block": "error",
135
187
  "no-eq-null": "off",
136
188
  "no-eval": "error",
137
189
  "no-extend-native": "error",
138
190
  "no-extra-bind": "error",
191
+ "no-extra-boolean-cast": "error",
139
192
  "no-extra-label": "error",
140
- "no-fallthrough": "error",
141
- "no-floating-decimal": "error",
142
193
  "no-global-assign": "error",
143
194
  "no-implicit-coercion": "error",
144
195
  "no-implicit-globals": "off",
145
196
  "no-implied-eval": "error",
197
+ "no-inline-comments": "error",
146
198
  "no-invalid-this": "error",
147
199
  "no-iterator": "error",
200
+ "no-label-var": "off",
148
201
  "no-labels": "error",
149
202
  "no-lone-blocks": "error",
203
+ "no-lonely-if": "error",
150
204
  "no-loop-func": "error",
151
205
  "no-magic-numbers": "off",
206
+ "no-multi-assign": "error",
152
207
  "no-multi-str": "error",
208
+ "no-negated-condition": "off",
209
+ "no-nested-ternary": "error",
153
210
  "no-new": "error",
154
211
  "no-new-func": "error",
155
212
  "no-new-wrappers": "error",
156
213
  "no-nonoctal-decimal-escape": "error",
214
+ "no-object-constructor": "error",
215
+ "no-octal": "error",
157
216
  "no-octal-escape": "error",
158
217
  "no-param-reassign": [
159
218
  "error",
@@ -161,120 +220,24 @@ const rules = {
161
220
  props: true,
162
221
  },
163
222
  ],
223
+ "no-plusplus": "off",
164
224
  "no-proto": "error",
165
225
  "no-redeclare": "error",
226
+ "no-regex-spaces": "error",
227
+ "no-restricted-exports": "off",
228
+ "no-restricted-globals": "error",
229
+ "no-restricted-imports": "off",
166
230
  "no-restricted-properties": "off",
231
+ "no-restricted-syntax": "off",
167
232
  "no-return-assign": ["error", "always"],
168
233
  "no-script-url": "error",
169
- "no-self-assign": "error",
170
- "no-self-compare": "error",
171
234
  "no-sequences": "error",
172
- "no-throw-literal": "error",
173
- "no-unmodified-loop-condition": "error",
174
- "no-unused-expressions": "error",
175
- "no-unused-labels": "off",
176
- "no-useless-call": "error",
177
- "no-useless-catch": "error",
178
- "no-useless-concat": "error",
179
- "no-useless-escape": "error",
180
- "no-useless-return": "error",
181
- "no-void": "error",
182
- "no-warning-comments": "warn",
183
- "no-with": "error",
184
- "prefer-named-capture-group": "error",
185
- "prefer-object-has-own": "error",
186
- "prefer-promise-reject-errors": "error",
187
- "prefer-regex-literals": "error",
188
- radix: ["error", "always"],
189
- "require-await": "off",
190
- "require-unicode-regexp": "error",
191
- "vars-on-top": "error",
192
- yoda: [
193
- "error",
194
- "never",
195
- {
196
- exceptRange: true,
197
- onlyEquality: false,
198
- },
199
- ],
200
-
201
- // Strict mode
202
- strict: ["error", "global"],
203
-
204
- // Variables
205
- "init-declarations": "off",
206
- "no-delete-var": "error",
207
- "no-label-var": "off",
208
- "no-restricted-globals": "error",
209
235
  "no-shadow": "error",
210
236
  "no-shadow-restricted-names": "error",
211
- "no-undef": "error",
237
+ "no-ternary": "off",
238
+ "no-throw-literal": "error",
212
239
  "no-undef-init": "error",
213
240
  "no-undefined": "off",
214
- "no-unused-vars": [
215
- "error",
216
- {
217
- args: "after-used",
218
- caughtErrors: "all",
219
- },
220
- ],
221
- "no-use-before-define": ["error", "nofunc"],
222
-
223
- // Layout & Formatting
224
- camelcase: "off",
225
- "capitalized-comments": "off",
226
- "consistent-this": ["error", "that"],
227
- "func-name-matching": "off",
228
- "func-names": "off",
229
- "func-style": ["error", "declaration", { allowArrowFunctions: true }],
230
- "id-denylist": "off",
231
- "id-length": [
232
- "error",
233
- {
234
- exceptions: ["_", "i", "j", "x", "y", "z"],
235
- },
236
- ],
237
- "id-match": "off",
238
- // redundant with no-inline-comments
239
- "line-comment-position": "off",
240
- "lines-around-comment": "off",
241
- "max-depth": "off",
242
- "max-lines": "off",
243
- "max-lines-per-function": "off",
244
- "max-nested-callbacks": "off",
245
- "max-params": "off",
246
- "max-statements": "off",
247
- "max-statements-per-line": "error",
248
- "multiline-comment-style": ["error", "separate-lines"],
249
- "new-cap": "error",
250
- "no-array-constructor": "error",
251
- "no-bitwise": [
252
- "error",
253
- {
254
- allow: [],
255
- int32Hint: false,
256
- },
257
- ],
258
- "no-continue": "off",
259
- "no-inline-comments": "error",
260
- "no-lonely-if": "error",
261
- "no-mixed-operators": "error",
262
- "no-multi-assign": "error",
263
- "no-multiple-empty-lines": [
264
- "error",
265
- {
266
- max: 1,
267
- maxEOF: 1,
268
- maxBOF: 0,
269
- },
270
- ],
271
- "no-negated-condition": "off",
272
-
273
- "no-nested-ternary": "error",
274
- "no-object-constructor": "error",
275
- "no-plusplus": "off",
276
- "no-restricted-syntax": "off",
277
- "no-ternary": "off",
278
241
  "no-underscore-dangle": [
279
242
  "error",
280
243
  {
@@ -282,39 +245,25 @@ const rules = {
282
245
  },
283
246
  ],
284
247
  "no-unneeded-ternary": "error",
285
- "one-var": ["error", "never"],
286
- "one-var-declaration-per-line": "off",
287
- "operator-assignment": "error",
288
- "padding-line-between-statements": "off",
289
- "prefer-exponentiation-operator": "error",
290
- "prefer-object-spread": "error",
291
- "quote-props": ["error", "as-needed"],
292
- "sort-keys": "off",
293
- "sort-vars": "off",
294
- "spaced-comment": ["error", "always"],
295
- "unicode-bom": "error",
296
-
297
- // ECMAScript6
298
- "arrow-body-style": ["error", "as-needed"],
299
- "constructor-super": "error",
300
- "no-class-assign": "error",
301
- "no-confusing-arrow": "off",
302
- "no-const-assign": "error",
303
- "no-dupe-class-members": "error",
304
- "no-duplicate-imports": "off",
305
- "no-new-symbol": "error",
306
- "no-restricted-imports": "off",
307
- "no-restricted-exports": "off",
308
- "no-this-before-super": "off",
248
+ "no-unused-expressions": "error",
249
+ "no-unused-labels": "off",
250
+ "no-useless-call": "error",
251
+ "no-useless-catch": "error",
309
252
  "no-useless-computed-key": [
310
253
  "error",
311
254
  {
312
255
  enforceForClassMembers: true,
313
256
  },
314
257
  ],
258
+ "no-useless-concat": "error",
315
259
  "no-useless-constructor": "error",
260
+ "no-useless-escape": "error",
316
261
  "no-useless-rename": "error",
262
+ "no-useless-return": "error",
317
263
  "no-var": "error",
264
+ "no-void": "error",
265
+ "no-warning-comments": "warn",
266
+ "no-with": "error",
318
267
  "object-shorthand": [
319
268
  "error",
320
269
  "always",
@@ -322,6 +271,8 @@ const rules = {
322
271
  avoidExplicitReturnArrows: true,
323
272
  },
324
273
  ],
274
+ "one-var": ["error", "never"],
275
+ "operator-assignment": "error",
325
276
  "prefer-arrow-callback": "error",
326
277
  "prefer-const": [
327
278
  "error",
@@ -343,10 +294,19 @@ const rules = {
343
294
  },
344
295
  },
345
296
  ],
297
+ "prefer-exponentiation-operator": "error",
298
+ "prefer-named-capture-group": "error",
346
299
  "prefer-numeric-literals": "error",
300
+ "prefer-object-has-own": "error",
301
+ "prefer-object-spread": "error",
302
+ "prefer-promise-reject-errors": "error",
303
+ "prefer-regex-literals": "error",
347
304
  "prefer-rest-params": "error",
348
305
  "prefer-spread": "error",
349
306
  "prefer-template": "error",
307
+ radix: ["error", "always"],
308
+ "require-await": "off",
309
+ "require-unicode-regexp": "error",
350
310
  "require-yield": "error",
351
311
  "sort-imports": [
352
312
  "error",
@@ -355,7 +315,85 @@ const rules = {
355
315
  memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
356
316
  },
357
317
  ],
318
+ "sort-keys": "off",
319
+ "sort-vars": "off",
320
+ strict: ["error", "global"],
358
321
  "symbol-description": "error",
322
+ "vars-on-top": "error",
323
+ yoda: [
324
+ "error",
325
+ "never",
326
+ {
327
+ exceptRange: true,
328
+ onlyEquality: false,
329
+ },
330
+ ],
331
+
332
+ // Layout & Formatting
333
+ "line-comment-position": "off",
334
+ "unicode-bom": "error",
335
+
336
+ // @stylistic
337
+ "@stylistic/jsx-pascal-case": "error",
338
+ "@stylistic/max-statements-per-line": "error",
339
+ "@stylistic/multiline-comment-style": ["error", "separate-lines"],
340
+ "@stylistic/no-floating-decimal": "error",
341
+ "@stylistic/no-mixed-operators": "error",
342
+ "@stylistic/padding-line-between-statements": [
343
+ "error",
344
+ // return
345
+ {
346
+ blankLine: "always",
347
+ prev: "*",
348
+ next: "return",
349
+ },
350
+ // const, let, var
351
+ {
352
+ blankLine: "always",
353
+ prev: ["const", "let", "var"],
354
+ next: "*",
355
+ },
356
+ {
357
+ blankLine: "always",
358
+ prev: "*",
359
+ next: ["const", "let", "var"],
360
+ },
361
+ {
362
+ blankLine: "any",
363
+ prev: ["const", "let", "var"],
364
+ next: ["const", "let", "var"],
365
+ },
366
+ // import
367
+ {
368
+ blankLine: "always",
369
+ prev: ["import", "cjs-import"],
370
+ next: "*",
371
+ },
372
+ {
373
+ blankLine: "never",
374
+ prev: ["import", "cjs-import"],
375
+ next: ["import", "cjs-import"],
376
+ },
377
+ // export
378
+ {
379
+ blankLine: "always",
380
+ prev: "*",
381
+ next: ["export", "cjs-export"],
382
+ },
383
+ {
384
+ blankLine: "any",
385
+ prev: ["export", "cjs-export"],
386
+ next: ["export", "cjs-export"],
387
+ },
388
+ // function
389
+ {
390
+ blankLine: "always",
391
+ prev: "*",
392
+ next: "function",
393
+ },
394
+ ],
395
+ "@stylistic/quote-props": ["error", "as-needed"],
396
+ "@stylistic/spaced-comment": ["error", "always"],
359
397
 
360
398
  // eslint-plugin-react
361
399
  "react/boolean-prop-naming": "off",
package/nodeWithBiome.cjs CHANGED
@@ -20,7 +20,7 @@ const env = {
20
20
 
21
21
  const globals = {};
22
22
  const extendConfigs = ["plugin:import/typescript"];
23
- const plugins = ["react", "react-hooks", "unicorn", "import"];
23
+ const plugins = ["@stylistic", "react", "react-hooks", "unicorn", "import"];
24
24
  const settings = {
25
25
  react: {
26
26
  version: "detect",
@@ -29,26 +29,37 @@ const settings = {
29
29
 
30
30
  const rules = {
31
31
  // Possible problems
32
+ "array-callback-return": [
33
+ "error",
34
+ {
35
+ allowImplicit: true,
36
+ checkForEach: false,
37
+ },
38
+ ],
39
+ "constructor-super": "off",
32
40
  "for-direction": "off",
33
41
  "getter-return": "off",
34
42
  "no-async-promise-executor": "off",
35
43
  "no-await-in-loop": "warn",
44
+ "no-class-assign": "off",
36
45
  "no-compare-neg-zero": "off",
37
46
  "no-cond-assign": "off",
38
- "no-console": "off",
47
+ "no-const-assign": "off",
39
48
  "no-constant-binary-expression": "error",
40
49
  "no-constant-condition": "off",
50
+ "no-constructor-return": "off",
41
51
  "no-control-regex": "off",
42
52
  "no-debugger": "off",
43
53
  "no-dupe-args": "off",
54
+ "no-dupe-class-members": "off",
44
55
  "no-dupe-else-if": "off",
45
56
  "no-dupe-keys": "off",
46
57
  "no-duplicate-case": "off",
47
- "no-empty": "off",
58
+ "no-duplicate-imports": "off",
48
59
  "no-empty-character-class": "off",
60
+ "no-empty-pattern": "off",
49
61
  "no-ex-assign": "off",
50
- "no-extra-boolean-cast": "off",
51
- "no-extra-semi": "off",
62
+ "no-fallthrough": "off",
52
63
  "no-func-assign": "off",
53
64
  "no-import-assign": "off",
54
65
  "no-inner-declarations": "off",
@@ -65,19 +76,27 @@ const rules = {
65
76
  "no-loss-of-precision": "off",
66
77
  "no-misleading-character-class": "off",
67
78
  "no-new-native-nonconstructor": "off",
79
+ "no-new-symbol": "off",
68
80
  "no-obj-calls": "off",
69
81
  "no-promise-executor-return": "error",
70
82
  "no-prototype-builtins": "off",
71
- "no-regex-spaces": "off",
83
+ "no-self-assign": "off",
84
+ "no-self-compare": "off",
72
85
  "no-setter-return": "off",
73
86
  "no-sparse-arrays": "off",
74
87
  "no-template-curly-in-string": "error",
88
+ "no-this-before-super": "off",
89
+ "no-undef": "off",
75
90
  "no-unexpected-multiline": "error",
91
+ "no-unmodified-loop-condition": "error",
76
92
  "no-unreachable": "off",
77
93
  "no-unreachable-loop": "error",
78
94
  "no-unsafe-finally": "off",
79
95
  "no-unsafe-negation": "off",
80
96
  "no-unsafe-optional-chaining": "off",
97
+ "no-unused-private-class-members": "off",
98
+ "no-unused-vars": "off",
99
+ "no-use-before-define": ["error", "nofunc"],
81
100
  "no-useless-backreference": "error",
82
101
  "require-atomic-updates": "error",
83
102
  "use-isnan": "off",
@@ -92,154 +111,112 @@ const rules = {
92
111
  enforceForClassMembers: true,
93
112
  },
94
113
  ],
95
- "array-callback-return": [
96
- "error",
97
- {
98
- allowImplicit: true,
99
- checkForEach: false,
100
- },
101
- ],
114
+ "arrow-body-style": ["error", "as-needed"],
102
115
  "block-scoped-var": "error",
116
+ camelcase: "off",
117
+ "capitalized-comments": "off",
103
118
  "class-methods-use-this": "error",
104
119
  complexity: "off",
105
120
  "consistent-return": "error",
121
+ "consistent-this": ["error", "that"],
106
122
  curly: "off",
107
123
  "default-case": "off",
108
124
  "default-case-last": "off",
109
125
  "default-param-last": "off",
110
126
  "dot-notation": "off",
111
127
  eqeqeq: "off",
128
+ "func-name-matching": "off",
129
+ "func-names": "off",
130
+ "func-style": ["error", "declaration", { allowArrowFunctions: true }],
112
131
  "grouped-accessor-pairs": ["error", "getBeforeSet"],
113
132
  "guard-for-in": "error",
133
+ "id-denylist": "off",
134
+ "id-length": [
135
+ "error",
136
+ {
137
+ exceptions: ["_", "i", "j", "x", "y", "z"],
138
+ },
139
+ ],
140
+ "id-match": "off",
141
+ "init-declarations": "off",
114
142
  "logical-assignment-operators": "error",
115
143
  "max-classes-per-file": "off",
144
+ "max-depth": "off",
145
+ "max-lines": "off",
146
+ "max-lines-per-function": "off",
147
+ "max-nested-callbacks": "off",
148
+ "max-params": "off",
149
+ "max-statements": "off",
150
+ "multiline-comment-style": "off",
151
+ "new-cap": "error",
116
152
  "no-alert": "error",
153
+ "no-array-constructor": "off",
154
+ "no-bitwise": [
155
+ "error",
156
+ {
157
+ allow: [],
158
+ int32Hint: false,
159
+ },
160
+ ],
117
161
  "no-caller": "error",
118
162
  "no-case-declarations": "off",
119
- "no-constructor-return": "off",
163
+ "no-console": "off",
164
+ "no-continue": "off",
165
+ "no-delete-var": "off",
120
166
  "no-div-regex": "off",
121
167
  "no-else-return": "off",
168
+ "no-empty": "off",
122
169
  "no-empty-function": "off",
123
- "no-empty-pattern": "off",
124
170
  "no-empty-static-block": "off",
125
171
  "no-eq-null": "off",
126
172
  "no-eval": "off",
127
173
  "no-extend-native": "error",
128
174
  "no-extra-bind": "error",
175
+ "no-extra-boolean-cast": "off",
129
176
  "no-extra-label": "off",
130
- "no-fallthrough": "off",
131
- "no-floating-decimal": "error",
132
177
  "no-global-assign": "off",
133
178
  "no-implicit-coercion": "error",
134
179
  "no-implicit-globals": "off",
135
180
  "no-implied-eval": "error",
181
+ "no-inline-comments": "error",
136
182
  "no-invalid-this": "error",
137
183
  "no-iterator": "error",
184
+ "no-label-var": "off",
138
185
  "no-labels": "error",
139
186
  "no-lone-blocks": "off",
187
+ "no-lonely-if": "off",
140
188
  "no-loop-func": "error",
141
189
  "no-magic-numbers": "off",
190
+ "no-multi-assign": "error",
142
191
  "no-multi-str": "error",
192
+ "no-negated-condition": "off",
193
+ "no-nested-ternary": "error",
143
194
  "no-new": "error",
144
195
  "no-new-func": "error",
145
196
  "no-new-wrappers": "off",
146
197
  "no-nonoctal-decimal-escape": "off",
198
+ "no-object-constructor": "error",
199
+ "no-octal": "off",
147
200
  "no-octal-escape": "error",
148
201
  "no-param-reassign": "off",
202
+ "no-plusplus": "off",
149
203
  "no-proto": "error",
150
204
  "no-redeclare": "off",
205
+ "no-regex-spaces": "off",
206
+ "no-restricted-exports": "off",
207
+ "no-restricted-globals": "off",
208
+ "no-restricted-imports": "off",
151
209
  "no-restricted-properties": "off",
210
+ "no-restricted-syntax": "off",
152
211
  "no-return-assign": "off",
153
212
  "no-script-url": "error",
154
- "no-self-assign": "off",
155
- "no-self-compare": "off",
156
213
  "no-sequences": "off",
157
- "no-throw-literal": "off",
158
- "no-unmodified-loop-condition": "error",
159
- "no-unused-expressions": "error",
160
- "no-unused-labels": "off",
161
- "no-useless-call": "error",
162
- "no-useless-catch": "off",
163
- "no-useless-concat": "off",
164
- "no-useless-escape": "error",
165
- "no-useless-return": "error",
166
- "no-void": "off",
167
- "no-warning-comments": "warn",
168
- "no-with": "off",
169
- "prefer-named-capture-group": "error",
170
- "prefer-object-has-own": "error",
171
- "prefer-promise-reject-errors": "error",
172
- "prefer-regex-literals": "error",
173
- radix: ["error", "always"],
174
- "require-await": "off",
175
- "require-unicode-regexp": "error",
176
- "vars-on-top": "error",
177
- yoda: "off",
178
-
179
- // Strict mode
180
- strict: ["error", "global"],
181
-
182
- // Variables
183
- "init-declarations": "off",
184
- "no-delete-var": "off",
185
- "no-label-var": "off",
186
- "no-restricted-globals": "off",
187
214
  "no-shadow": "error",
188
215
  "no-shadow-restricted-names": "off",
189
- "no-undef": "off",
216
+ "no-ternary": "off",
217
+ "no-throw-literal": "off",
190
218
  "no-undef-init": "off",
191
219
  "no-undefined": "off",
192
- "no-unused-vars": "off",
193
- "no-use-before-define": ["error", "nofunc"],
194
-
195
- // Layout & Formatting
196
- camelcase: "off",
197
- "capitalized-comments": "off",
198
- "consistent-this": ["error", "that"],
199
- "func-name-matching": "off",
200
- "func-names": "off",
201
- "func-style": ["error", "declaration", { allowArrowFunctions: true }],
202
- "id-denylist": "off",
203
- "id-length": [
204
- "error",
205
- {
206
- exceptions: ["_", "i", "j", "x", "y", "z"],
207
- },
208
- ],
209
- "id-match": "off",
210
- // redundant with no-inline-comments
211
- "line-comment-position": "off",
212
- "lines-around-comment": "off",
213
- "max-depth": "off",
214
- "max-lines": "off",
215
- "max-lines-per-function": "off",
216
- "max-nested-callbacks": "off",
217
- "max-params": "off",
218
- "max-statements": "off",
219
- "max-statements-per-line": "error",
220
- "multiline-comment-style": ["error", "separate-lines"],
221
- "new-cap": "error",
222
- "no-array-constructor": "off",
223
- "no-bitwise": [
224
- "error",
225
- {
226
- allow: [],
227
- int32Hint: false,
228
- },
229
- ],
230
- "no-continue": "off",
231
- "no-inline-comments": "error",
232
- "no-lonely-if": "off",
233
- "no-mixed-operators": "off",
234
- "no-multi-assign": "error",
235
- "no-multiple-empty-lines": "off",
236
- "no-negated-condition": "off",
237
-
238
- "no-nested-ternary": "error",
239
- "no-object-constructor": "error",
240
- "no-plusplus": "off",
241
- "no-restricted-syntax": "off",
242
- "no-ternary": "off",
243
220
  "no-underscore-dangle": [
244
221
  "error",
245
222
  {
@@ -247,39 +224,25 @@ const rules = {
247
224
  },
248
225
  ],
249
226
  "no-unneeded-ternary": "off",
250
- "one-var": "off",
251
- "one-var-declaration-per-line": "off",
252
- "operator-assignment": "off",
253
- "padding-line-between-statements": "off",
254
- "prefer-exponentiation-operator": "off",
255
- "prefer-object-spread": "error",
256
- "quote-props": ["error", "as-needed"],
257
- "sort-keys": "off",
258
- "sort-vars": "off",
259
- "spaced-comment": ["error", "always"],
260
- "unicode-bom": "error",
261
-
262
- // ECMAScript6
263
- "arrow-body-style": ["error", "as-needed"],
264
- "constructor-super": "off",
265
- "no-class-assign": "off",
266
- "no-confusing-arrow": "off",
267
- "no-const-assign": "off",
268
- "no-dupe-class-members": "off",
269
- "no-duplicate-imports": "off",
270
- "no-new-symbol": "off",
271
- "no-restricted-imports": "off",
272
- "no-restricted-exports": "off",
273
- "no-this-before-super": "off",
227
+ "no-unused-expressions": "error",
228
+ "no-unused-labels": "off",
229
+ "no-useless-call": "error",
230
+ "no-useless-catch": "off",
274
231
  "no-useless-computed-key": [
275
232
  "error",
276
233
  {
277
234
  enforceForClassMembers: true,
278
235
  },
279
236
  ],
237
+ "no-useless-concat": "off",
280
238
  "no-useless-constructor": "off",
239
+ "no-useless-escape": "error",
281
240
  "no-useless-rename": "off",
241
+ "no-useless-return": "error",
282
242
  "no-var": "off",
243
+ "no-void": "off",
244
+ "no-warning-comments": "warn",
245
+ "no-with": "off",
283
246
  "object-shorthand": [
284
247
  "error",
285
248
  "always",
@@ -287,6 +250,8 @@ const rules = {
287
250
  avoidExplicitReturnArrows: true,
288
251
  },
289
252
  ],
253
+ "one-var": "off",
254
+ "operator-assignment": "off",
290
255
  "prefer-arrow-callback": "off",
291
256
  "prefer-const": "off",
292
257
  "prefer-destructuring": [
@@ -302,13 +267,92 @@ const rules = {
302
267
  },
303
268
  },
304
269
  ],
270
+ "prefer-exponentiation-operator": "off",
271
+ "prefer-named-capture-group": "error",
305
272
  "prefer-numeric-literals": "off",
273
+ "prefer-object-has-own": "error",
274
+ "prefer-object-spread": "error",
275
+ "prefer-promise-reject-errors": "error",
276
+ "prefer-regex-literals": "error",
306
277
  "prefer-rest-params": "off",
307
278
  "prefer-spread": "error",
308
279
  "prefer-template": "off",
280
+ radix: ["error", "always"],
281
+ "require-await": "off",
282
+ "require-unicode-regexp": "error",
309
283
  "require-yield": "off",
310
284
  "sort-imports": "off",
285
+ "sort-keys": "off",
286
+ "sort-vars": "off",
287
+ strict: ["error", "global"],
311
288
  "symbol-description": "error",
289
+ "vars-on-top": "error",
290
+ yoda: "off",
291
+
292
+ // Layout & Formatting
293
+ "line-comment-position": "off",
294
+ "unicode-bom": "error",
295
+
296
+ // @stylistic
297
+ "@stylistic/jsx-pascal-case": "error",
298
+ "@stylistic/max-statements-per-line": "error",
299
+ "@stylistic/multiline-comment-style": ["error", "separate-lines"],
300
+ "@stylistic/no-floating-decimal": "error",
301
+ "@stylistic/padding-line-between-statements": [
302
+ "error",
303
+ // return
304
+ {
305
+ blankLine: "always",
306
+ prev: "*",
307
+ next: "return",
308
+ },
309
+ // const, let, var
310
+ {
311
+ blankLine: "always",
312
+ prev: ["const", "let", "var"],
313
+ next: "*",
314
+ },
315
+ {
316
+ blankLine: "always",
317
+ prev: "*",
318
+ next: ["const", "let", "var"],
319
+ },
320
+ {
321
+ blankLine: "any",
322
+ prev: ["const", "let", "var"],
323
+ next: ["const", "let", "var"],
324
+ },
325
+ // import
326
+ {
327
+ blankLine: "always",
328
+ prev: ["import", "cjs-import"],
329
+ next: "*",
330
+ },
331
+ {
332
+ blankLine: "never",
333
+ prev: ["import", "cjs-import"],
334
+ next: ["import", "cjs-import"],
335
+ },
336
+ // export
337
+ {
338
+ blankLine: "always",
339
+ prev: "*",
340
+ next: ["export", "cjs-export"],
341
+ },
342
+ {
343
+ blankLine: "any",
344
+ prev: ["export", "cjs-export"],
345
+ next: ["export", "cjs-export"],
346
+ },
347
+ // function
348
+ {
349
+ blankLine: "always",
350
+ prev: "*",
351
+ next: "function",
352
+ },
353
+ ],
354
+ "@stylistic/quote-props": ["error", "as-needed"],
355
+ "@stylistic/spaced-comment": ["error", "always"],
312
356
 
313
357
  // eslint-plugin-react
314
358
  "react/boolean-prop-naming": "off",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-heck",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "Contains an ESLint configuration for ES2015+, TypeScript, and React.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -29,12 +29,13 @@
29
29
  "author": "atheck",
30
30
  "license": "MIT",
31
31
  "dependencies": {
32
+ "@stylistic/eslint-plugin": "2.7.1",
32
33
  "@typescript-eslint/eslint-plugin": "8.3.0",
33
34
  "@typescript-eslint/parser": "8.3.0",
34
35
  "eslint": "8.57.0",
35
36
  "eslint-import-resolver-typescript": "3.6.3",
36
37
  "eslint-plugin-import": "2.29.1",
37
- "eslint-plugin-jest": "28.8.0",
38
+ "eslint-plugin-jest": "28.8.1",
38
39
  "eslint-plugin-react": "7.35.0",
39
40
  "eslint-plugin-react-hooks": "4.6.2",
40
41
  "eslint-plugin-react-native": "4.1.0",
@@ -45,7 +46,7 @@
45
46
  "devDependencies": {
46
47
  "@biomejs/biome": "1.8.3",
47
48
  "@testing-library/dom": "10.4.0",
48
- "@testing-library/react": "16.0.0",
49
+ "@testing-library/react": "16.0.1",
49
50
  "@types/jest": "29.5.12",
50
51
  "@types/react": "18.3.4",
51
52
  "jest": "29.7.0",