@will-stone/eslint-config 0.14.0 → 0.15.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/dist/index.cjs +6 -150
  2. package/dist/index.js +6 -150
  3. package/package.json +14 -14
package/dist/index.cjs CHANGED
@@ -99,88 +99,6 @@ function base() {
99
99
  /**
100
100
  * Built-in rules
101
101
  */
102
- // Off for Prettier
103
- // https://github.com/prettier/eslint-config-prettier/blob/main/index.js
104
- // TODO move to prettier config
105
- "array-bracket-newline": "off",
106
- "array-bracket-spacing": "off",
107
- "array-element-newline": "off",
108
- "arrow-parens": "off",
109
- "arrow-spacing": "off",
110
- "block-spacing": "off",
111
- "brace-style": "off",
112
- "comma-dangle": "off",
113
- "comma-spacing": "off",
114
- "comma-style": "off",
115
- "computed-property-spacing": "off",
116
- "curly": 0,
117
- "dot-location": "off",
118
- "eol-last": "off",
119
- "func-call-spacing": "off",
120
- "function-call-argument-newline": "off",
121
- "function-paren-newline": "off",
122
- "generator-star": "off",
123
- "generator-star-spacing": "off",
124
- "implicit-arrow-linebreak": "off",
125
- "indent": "off",
126
- "jsx-quotes": "off",
127
- "key-spacing": "off",
128
- "keyword-spacing": "off",
129
- "linebreak-style": "off",
130
- "lines-around-comment": 0,
131
- "max-len": 0,
132
- "multiline-ternary": "off",
133
- "new-parens": "off",
134
- "newline-per-chained-call": "off",
135
- "no-arrow-condition": "off",
136
- "no-comma-dangle": "off",
137
- "no-confusing-arrow": 0,
138
- "no-extra-parens": "off",
139
- "no-extra-semi": "off",
140
- "no-floating-decimal": "off",
141
- "no-mixed-operators": 0,
142
- "no-mixed-spaces-and-tabs": "off",
143
- "no-multi-spaces": "off",
144
- "no-multiple-empty-lines": "off",
145
- "no-reserved-keys": "off",
146
- "no-space-before-semi": "off",
147
- "no-tabs": 0,
148
- "no-trailing-spaces": "off",
149
- "no-unexpected-multiline": 0,
150
- "no-whitespace-before-property": "off",
151
- "no-wrap-func": "off",
152
- "nonblock-statement-body-position": "off",
153
- "object-curly-newline": "off",
154
- "object-curly-spacing": "off",
155
- "object-property-newline": "off",
156
- "one-var-declaration-per-line": "off",
157
- "operator-linebreak": "off",
158
- "padded-blocks": "off",
159
- "quote-props": "off",
160
- "quotes": 0,
161
- "rest-spread-spacing": "off",
162
- "semi": "off",
163
- "semi-spacing": "off",
164
- "semi-style": "off",
165
- "space-after-function-name": "off",
166
- "space-after-keywords": "off",
167
- "space-before-blocks": "off",
168
- "space-before-function-paren": "off",
169
- "space-before-function-parentheses": "off",
170
- "space-before-keywords": "off",
171
- "space-in-brackets": "off",
172
- "space-in-parens": "off",
173
- "space-infix-ops": "off",
174
- "space-return-throw-case": "off",
175
- "space-unary-ops": "off",
176
- "space-unary-word-ops": "off",
177
- "switch-colon-spacing": "off",
178
- "template-curly-spacing": "off",
179
- "template-tag-spacing": "off",
180
- "unicode-bom": "off",
181
- "wrap-iife": "off",
182
- "wrap-regex": "off",
183
- "yield-star-spacing": "off",
184
102
  "accessor-pairs": "error",
185
103
  "array-callback-return": [
186
104
  "error",
@@ -201,6 +119,7 @@ function base() {
201
119
  // Not sure if required
202
120
  "consistent-this": "error",
203
121
  "constructor-super": "error",
122
+ "curly": "off",
204
123
  "default-case": "error",
205
124
  "default-case-last": "error",
206
125
  "default-param-last": "error",
@@ -222,7 +141,6 @@ function base() {
222
141
  "id-match": "off",
223
142
  "init-declarations": "off",
224
143
  "line-comment-position": "error",
225
- "lines-between-class-members": "warn",
226
144
  "logical-assignment-operators": ["warn", "always"],
227
145
  "max-classes-per-file": "off",
228
146
  "max-depth": "off",
@@ -231,7 +149,6 @@ function base() {
231
149
  "max-nested-callbacks": "error",
232
150
  "max-params": "off",
233
151
  "max-statements": "off",
234
- "max-statements-per-line": "error",
235
152
  "multiline-comment-style": "off",
236
153
  "new-cap": "error",
237
154
  "no-alert": "error",
@@ -239,7 +156,6 @@ function base() {
239
156
  "no-async-promise-executor": "error",
240
157
  "no-await-in-loop": "error",
241
158
  "no-bitwise": "error",
242
- "no-buffer-constructor": "error",
243
159
  "no-caller": "error",
244
160
  "no-case-declarations": "error",
245
161
  "no-class-assign": "error",
@@ -274,7 +190,7 @@ function base() {
274
190
  "no-extra-bind": "warn",
275
191
  "no-extra-boolean-cast": "warn",
276
192
  "no-extra-label": "warn",
277
- "no-fallthrough": "error",
193
+ "no-fallthrough": ["error", { allowEmptyCase: true }],
278
194
  "no-func-assign": "error",
279
195
  "no-global-assign": "error",
280
196
  "no-implicit-coercion": "warn",
@@ -303,7 +219,6 @@ function base() {
303
219
  "no-new": "error",
304
220
  "no-new-func": "error",
305
221
  "no-new-native-nonconstructor": "error",
306
- "no-new-object": "error",
307
222
  "no-new-symbol": "error",
308
223
  "no-new-wrappers": "error",
309
224
  "no-nonoctal-decimal-escape": "error",
@@ -324,7 +239,6 @@ function base() {
324
239
  "no-restricted-properties": "off",
325
240
  "no-restricted-syntax": "off",
326
241
  "no-return-assign": "error",
327
- "no-return-await": "error",
328
242
  "no-script-url": "error",
329
243
  "no-self-assign": "error",
330
244
  "no-self-compare": "error",
@@ -341,6 +255,7 @@ function base() {
341
255
  "no-undef-init": "warn",
342
256
  "no-undefined": "off",
343
257
  "no-underscore-dangle": "off",
258
+ "no-unexpected-multiline": "off",
344
259
  "no-unmodified-loop-condition": "error",
345
260
  "no-unneeded-ternary": "warn",
346
261
  "no-unreachable": "error",
@@ -378,17 +293,6 @@ function base() {
378
293
  "object-shorthand": ["warn", "always", { ignoreConstructors: true }],
379
294
  "one-var": ["warn", "never"],
380
295
  "operator-assignment": ["warn", "never"],
381
- "padding-line-between-statements": [
382
- "warn",
383
- { blankLine: "always", next: "*", prev: "multiline-block-like" },
384
- { blankLine: "always", next: "multiline-block-like", prev: "*" },
385
- { blankLine: "always", next: "*", prev: "multiline-const" },
386
- { blankLine: "always", next: "multiline-const", prev: "*" },
387
- { blankLine: "always", next: "*", prev: "multiline-let" },
388
- { blankLine: "always", next: "multiline-let", prev: "*" },
389
- { blankLine: "always", next: "*", prev: "multiline-var" },
390
- { blankLine: "always", next: "multiline-var", prev: "*" }
391
- ],
392
296
  // Can cause issues when Prettier is enabled
393
297
  "prefer-arrow-callback": "off",
394
298
  "prefer-const": "warn",
@@ -424,11 +328,11 @@ function base() {
424
328
  // Not required as one-var rule is set to 'error' and so there will
425
329
  // never be vars to sort.
426
330
  "sort-vars": "off",
427
- "spaced-comment": ["warn", "always", { markers: ["/"] }],
428
331
  // Generally gets in the way as it's difficult to know when this may be
429
332
  // required.
430
333
  "strict": "off",
431
334
  "symbol-description": "error",
335
+ "unicode-bom": ["error", "never"],
432
336
  "use-isnan": "error",
433
337
  "valid-typeof": ["error", { requireStringLiterals: true }],
434
338
  "vars-on-top": "error",
@@ -775,7 +679,6 @@ function react() {
775
679
  }
776
680
  ],
777
681
  "jsx-a11y/label-has-associated-control": "error",
778
- "jsx-a11y/label-has-for": "off",
779
682
  "jsx-a11y/lang": "error",
780
683
  "jsx-a11y/media-has-caption": "error",
781
684
  "jsx-a11y/mouse-events-have-key-events": "error",
@@ -1125,7 +1028,6 @@ function typescript(options) {
1125
1028
  "@typescript-eslint/triple-slash-reference": "error",
1126
1029
  "no-array-constructor": "off",
1127
1030
  "no-empty-function": "off",
1128
- "no-extra-semi": "off",
1129
1031
  /**
1130
1032
  * These require type checking
1131
1033
  */
@@ -1134,6 +1036,7 @@ function typescript(options) {
1134
1036
  "@typescript-eslint/consistent-type-exports": "warn",
1135
1037
  "@typescript-eslint/dot-notation": "off",
1136
1038
  "@typescript-eslint/naming-convention": "off",
1039
+ "@typescript-eslint/no-array-delete": "off",
1137
1040
  "@typescript-eslint/no-base-to-string": "off",
1138
1041
  "@typescript-eslint/no-confusing-void-expression": "off",
1139
1042
  "@typescript-eslint/no-duplicate-type-constituents": "off",
@@ -1163,6 +1066,7 @@ function typescript(options) {
1163
1066
  "@typescript-eslint/prefer-includes": "off",
1164
1067
  "@typescript-eslint/prefer-nullish-coalescing": "off",
1165
1068
  "@typescript-eslint/prefer-optional-chain": "off",
1069
+ "@typescript-eslint/prefer-promise-reject-errors": "off",
1166
1070
  "@typescript-eslint/prefer-readonly": "off",
1167
1071
  "@typescript-eslint/prefer-readonly-parameter-types": "off",
1168
1072
  "@typescript-eslint/prefer-reduce-type-parameter": "off",
@@ -1179,35 +1083,11 @@ function typescript(options) {
1179
1083
  "@typescript-eslint/switch-exhaustiveness-check": "off",
1180
1084
  "@typescript-eslint/unbound-method": "off"
1181
1085
  } : {},
1182
- /**
1183
- * Off for Prettier
1184
- * https://github.com/prettier/eslint-config-prettier/blob/main/index.js
1185
- */
1186
- "@typescript-eslint/block-spacing": "off",
1187
- "@typescript-eslint/brace-style": "off",
1188
- "@typescript-eslint/comma-dangle": "off",
1189
- "@typescript-eslint/comma-spacing": "off",
1190
- "@typescript-eslint/func-call-spacing": "off",
1191
- "@typescript-eslint/indent": "off",
1192
- "@typescript-eslint/key-spacing": "off",
1193
- "@typescript-eslint/keyword-spacing": "off",
1194
- "@typescript-eslint/lines-around-comment": "off",
1195
- "@typescript-eslint/member-delimiter-style": "off",
1196
- "@typescript-eslint/no-extra-parens": "off",
1197
- "@typescript-eslint/no-extra-semi": "off",
1198
- "@typescript-eslint/object-curly-spacing": "off",
1199
- "@typescript-eslint/quotes": "off",
1200
- "@typescript-eslint/semi": "off",
1201
- "@typescript-eslint/space-before-blocks": "off",
1202
- "@typescript-eslint/space-before-function-paren": "off",
1203
- "@typescript-eslint/space-infix-ops": "off",
1204
- "@typescript-eslint/type-annotation-spacing": "off",
1205
1086
  /**
1206
1087
  * Superseded by TS rules below
1207
1088
  */
1208
1089
  "class-methods-use-this": "off",
1209
1090
  "default-param-last": "off",
1210
- "lines-between-class-members": "off",
1211
1091
  "no-duplicate-imports": "off",
1212
1092
  "no-invalid-this": "off",
1213
1093
  "no-loop-func": "off",
@@ -1219,7 +1099,6 @@ function typescript(options) {
1219
1099
  "no-unused-vars": "off",
1220
1100
  "no-use-before-define": "off",
1221
1101
  "no-useless-constructor": "off",
1222
- "padding-line-between-statements": "off",
1223
1102
  /**
1224
1103
  * The rest
1225
1104
  */
@@ -1242,11 +1121,6 @@ function typescript(options) {
1242
1121
  "@typescript-eslint/explicit-function-return-type": "off",
1243
1122
  "@typescript-eslint/explicit-member-accessibility": "warn",
1244
1123
  "@typescript-eslint/init-declarations": "off",
1245
- "@typescript-eslint/lines-between-class-members": [
1246
- "warn",
1247
- "always",
1248
- { exceptAfterOverload: true }
1249
- ],
1250
1124
  "@typescript-eslint/max-params": "off",
1251
1125
  "@typescript-eslint/member-ordering": "error",
1252
1126
  "@typescript-eslint/method-signature-style": "warn",
@@ -1267,7 +1141,6 @@ function typescript(options) {
1267
1141
  "@typescript-eslint/no-require-imports": "error",
1268
1142
  "@typescript-eslint/no-restricted-imports": "off",
1269
1143
  "@typescript-eslint/no-shadow": ["error"],
1270
- "@typescript-eslint/no-type-alias": "off",
1271
1144
  "@typescript-eslint/no-unnecessary-type-constraint": "warn",
1272
1145
  "@typescript-eslint/no-unsafe-declaration-merging": "error",
1273
1146
  "@typescript-eslint/no-unused-expressions": ["error"],
@@ -1283,17 +1156,6 @@ function typescript(options) {
1283
1156
  "@typescript-eslint/no-use-before-define": "error",
1284
1157
  "@typescript-eslint/no-useless-constructor": "error",
1285
1158
  "@typescript-eslint/no-useless-empty-export": "warn",
1286
- "@typescript-eslint/padding-line-between-statements": [
1287
- "error",
1288
- { blankLine: "always", next: "*", prev: "multiline-block-like" },
1289
- { blankLine: "always", next: "multiline-block-like", prev: "*" },
1290
- { blankLine: "always", next: "*", prev: "multiline-const" },
1291
- { blankLine: "always", next: "multiline-const", prev: "*" },
1292
- { blankLine: "always", next: "*", prev: "multiline-let" },
1293
- { blankLine: "always", next: "multiline-let", prev: "*" },
1294
- { blankLine: "always", next: "*", prev: "multiline-var" },
1295
- { blankLine: "always", next: "multiline-var", prev: "*" }
1296
- ],
1297
1159
  "@typescript-eslint/parameter-properties": "off",
1298
1160
  "@typescript-eslint/prefer-enum-initializers": "error",
1299
1161
  // Unicorn does this better by providing a fixer
@@ -1336,7 +1198,6 @@ function unicorn() {
1336
1198
  // Don't care how if(blah.length) is checked
1337
1199
  "unicorn/explicit-length-check": "off",
1338
1200
  "unicorn/filename-case": "error",
1339
- "unicorn/import-index": ["warn", { ignoreImports: true }],
1340
1201
  // TODO Not sure if this is useful yet
1341
1202
  "unicorn/import-style": "off",
1342
1203
  "unicorn/new-for-builtins": "warn",
@@ -1381,9 +1242,6 @@ function unicorn() {
1381
1242
  "unicorn/no-unnecessary-polyfills": "error",
1382
1243
  "unicorn/no-unreadable-array-destructuring": "error",
1383
1244
  "unicorn/no-unreadable-iife": "error",
1384
- // Turned off for now, even Sindre doesn't like it:
1385
- // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/153
1386
- "unicorn/no-unsafe-regex": "off",
1387
1245
  // Recommended config turned this off so I will too
1388
1246
  "unicorn/no-unused-properties": "off",
1389
1247
  "unicorn/no-useless-fallback-in-spread": "warn",
@@ -1428,7 +1286,6 @@ function unicorn() {
1428
1286
  "unicorn/prefer-node-protocol": "off",
1429
1287
  "unicorn/prefer-number-properties": "warn",
1430
1288
  "unicorn/prefer-object-from-entries": "warn",
1431
- "unicorn/prefer-object-has-own": "warn",
1432
1289
  "unicorn/prefer-optional-catch-binding": "warn",
1433
1290
  "unicorn/prefer-prototype-methods": "warn",
1434
1291
  "unicorn/prefer-query-selector": "warn",
@@ -1446,7 +1303,6 @@ function unicorn() {
1446
1303
  "unicorn/prefer-top-level-await": "error",
1447
1304
  "unicorn/prefer-type-error": "warn",
1448
1305
  "unicorn/prevent-abbreviations": "off",
1449
- "unicorn/regex-shorthand": "warn",
1450
1306
  "unicorn/relative-url-style": "warn",
1451
1307
  "unicorn/require-array-join-separator": "warn",
1452
1308
  "unicorn/require-number-to-fixed-digits-argument": "warn",
package/dist/index.js CHANGED
@@ -99,88 +99,6 @@ function base() {
99
99
  /**
100
100
  * Built-in rules
101
101
  */
102
- // Off for Prettier
103
- // https://github.com/prettier/eslint-config-prettier/blob/main/index.js
104
- // TODO move to prettier config
105
- "array-bracket-newline": "off",
106
- "array-bracket-spacing": "off",
107
- "array-element-newline": "off",
108
- "arrow-parens": "off",
109
- "arrow-spacing": "off",
110
- "block-spacing": "off",
111
- "brace-style": "off",
112
- "comma-dangle": "off",
113
- "comma-spacing": "off",
114
- "comma-style": "off",
115
- "computed-property-spacing": "off",
116
- "curly": 0,
117
- "dot-location": "off",
118
- "eol-last": "off",
119
- "func-call-spacing": "off",
120
- "function-call-argument-newline": "off",
121
- "function-paren-newline": "off",
122
- "generator-star": "off",
123
- "generator-star-spacing": "off",
124
- "implicit-arrow-linebreak": "off",
125
- "indent": "off",
126
- "jsx-quotes": "off",
127
- "key-spacing": "off",
128
- "keyword-spacing": "off",
129
- "linebreak-style": "off",
130
- "lines-around-comment": 0,
131
- "max-len": 0,
132
- "multiline-ternary": "off",
133
- "new-parens": "off",
134
- "newline-per-chained-call": "off",
135
- "no-arrow-condition": "off",
136
- "no-comma-dangle": "off",
137
- "no-confusing-arrow": 0,
138
- "no-extra-parens": "off",
139
- "no-extra-semi": "off",
140
- "no-floating-decimal": "off",
141
- "no-mixed-operators": 0,
142
- "no-mixed-spaces-and-tabs": "off",
143
- "no-multi-spaces": "off",
144
- "no-multiple-empty-lines": "off",
145
- "no-reserved-keys": "off",
146
- "no-space-before-semi": "off",
147
- "no-tabs": 0,
148
- "no-trailing-spaces": "off",
149
- "no-unexpected-multiline": 0,
150
- "no-whitespace-before-property": "off",
151
- "no-wrap-func": "off",
152
- "nonblock-statement-body-position": "off",
153
- "object-curly-newline": "off",
154
- "object-curly-spacing": "off",
155
- "object-property-newline": "off",
156
- "one-var-declaration-per-line": "off",
157
- "operator-linebreak": "off",
158
- "padded-blocks": "off",
159
- "quote-props": "off",
160
- "quotes": 0,
161
- "rest-spread-spacing": "off",
162
- "semi": "off",
163
- "semi-spacing": "off",
164
- "semi-style": "off",
165
- "space-after-function-name": "off",
166
- "space-after-keywords": "off",
167
- "space-before-blocks": "off",
168
- "space-before-function-paren": "off",
169
- "space-before-function-parentheses": "off",
170
- "space-before-keywords": "off",
171
- "space-in-brackets": "off",
172
- "space-in-parens": "off",
173
- "space-infix-ops": "off",
174
- "space-return-throw-case": "off",
175
- "space-unary-ops": "off",
176
- "space-unary-word-ops": "off",
177
- "switch-colon-spacing": "off",
178
- "template-curly-spacing": "off",
179
- "template-tag-spacing": "off",
180
- "unicode-bom": "off",
181
- "wrap-iife": "off",
182
- "wrap-regex": "off",
183
- "yield-star-spacing": "off",
184
102
  "accessor-pairs": "error",
185
103
  "array-callback-return": [
186
104
  "error",
@@ -201,6 +119,7 @@ function base() {
201
119
  // Not sure if required
202
120
  "consistent-this": "error",
203
121
  "constructor-super": "error",
122
+ "curly": "off",
204
123
  "default-case": "error",
205
124
  "default-case-last": "error",
206
125
  "default-param-last": "error",
@@ -222,7 +141,6 @@ function base() {
222
141
  "id-match": "off",
223
142
  "init-declarations": "off",
224
143
  "line-comment-position": "error",
225
- "lines-between-class-members": "warn",
226
144
  "logical-assignment-operators": ["warn", "always"],
227
145
  "max-classes-per-file": "off",
228
146
  "max-depth": "off",
@@ -231,7 +149,6 @@ function base() {
231
149
  "max-nested-callbacks": "error",
232
150
  "max-params": "off",
233
151
  "max-statements": "off",
234
- "max-statements-per-line": "error",
235
152
  "multiline-comment-style": "off",
236
153
  "new-cap": "error",
237
154
  "no-alert": "error",
@@ -239,7 +156,6 @@ function base() {
239
156
  "no-async-promise-executor": "error",
240
157
  "no-await-in-loop": "error",
241
158
  "no-bitwise": "error",
242
- "no-buffer-constructor": "error",
243
159
  "no-caller": "error",
244
160
  "no-case-declarations": "error",
245
161
  "no-class-assign": "error",
@@ -274,7 +190,7 @@ function base() {
274
190
  "no-extra-bind": "warn",
275
191
  "no-extra-boolean-cast": "warn",
276
192
  "no-extra-label": "warn",
277
- "no-fallthrough": "error",
193
+ "no-fallthrough": ["error", { allowEmptyCase: true }],
278
194
  "no-func-assign": "error",
279
195
  "no-global-assign": "error",
280
196
  "no-implicit-coercion": "warn",
@@ -303,7 +219,6 @@ function base() {
303
219
  "no-new": "error",
304
220
  "no-new-func": "error",
305
221
  "no-new-native-nonconstructor": "error",
306
- "no-new-object": "error",
307
222
  "no-new-symbol": "error",
308
223
  "no-new-wrappers": "error",
309
224
  "no-nonoctal-decimal-escape": "error",
@@ -324,7 +239,6 @@ function base() {
324
239
  "no-restricted-properties": "off",
325
240
  "no-restricted-syntax": "off",
326
241
  "no-return-assign": "error",
327
- "no-return-await": "error",
328
242
  "no-script-url": "error",
329
243
  "no-self-assign": "error",
330
244
  "no-self-compare": "error",
@@ -341,6 +255,7 @@ function base() {
341
255
  "no-undef-init": "warn",
342
256
  "no-undefined": "off",
343
257
  "no-underscore-dangle": "off",
258
+ "no-unexpected-multiline": "off",
344
259
  "no-unmodified-loop-condition": "error",
345
260
  "no-unneeded-ternary": "warn",
346
261
  "no-unreachable": "error",
@@ -378,17 +293,6 @@ function base() {
378
293
  "object-shorthand": ["warn", "always", { ignoreConstructors: true }],
379
294
  "one-var": ["warn", "never"],
380
295
  "operator-assignment": ["warn", "never"],
381
- "padding-line-between-statements": [
382
- "warn",
383
- { blankLine: "always", next: "*", prev: "multiline-block-like" },
384
- { blankLine: "always", next: "multiline-block-like", prev: "*" },
385
- { blankLine: "always", next: "*", prev: "multiline-const" },
386
- { blankLine: "always", next: "multiline-const", prev: "*" },
387
- { blankLine: "always", next: "*", prev: "multiline-let" },
388
- { blankLine: "always", next: "multiline-let", prev: "*" },
389
- { blankLine: "always", next: "*", prev: "multiline-var" },
390
- { blankLine: "always", next: "multiline-var", prev: "*" }
391
- ],
392
296
  // Can cause issues when Prettier is enabled
393
297
  "prefer-arrow-callback": "off",
394
298
  "prefer-const": "warn",
@@ -424,11 +328,11 @@ function base() {
424
328
  // Not required as one-var rule is set to 'error' and so there will
425
329
  // never be vars to sort.
426
330
  "sort-vars": "off",
427
- "spaced-comment": ["warn", "always", { markers: ["/"] }],
428
331
  // Generally gets in the way as it's difficult to know when this may be
429
332
  // required.
430
333
  "strict": "off",
431
334
  "symbol-description": "error",
335
+ "unicode-bom": ["error", "never"],
432
336
  "use-isnan": "error",
433
337
  "valid-typeof": ["error", { requireStringLiterals: true }],
434
338
  "vars-on-top": "error",
@@ -775,7 +679,6 @@ function react() {
775
679
  }
776
680
  ],
777
681
  "jsx-a11y/label-has-associated-control": "error",
778
- "jsx-a11y/label-has-for": "off",
779
682
  "jsx-a11y/lang": "error",
780
683
  "jsx-a11y/media-has-caption": "error",
781
684
  "jsx-a11y/mouse-events-have-key-events": "error",
@@ -1125,7 +1028,6 @@ function typescript(options) {
1125
1028
  "@typescript-eslint/triple-slash-reference": "error",
1126
1029
  "no-array-constructor": "off",
1127
1030
  "no-empty-function": "off",
1128
- "no-extra-semi": "off",
1129
1031
  /**
1130
1032
  * These require type checking
1131
1033
  */
@@ -1134,6 +1036,7 @@ function typescript(options) {
1134
1036
  "@typescript-eslint/consistent-type-exports": "warn",
1135
1037
  "@typescript-eslint/dot-notation": "off",
1136
1038
  "@typescript-eslint/naming-convention": "off",
1039
+ "@typescript-eslint/no-array-delete": "off",
1137
1040
  "@typescript-eslint/no-base-to-string": "off",
1138
1041
  "@typescript-eslint/no-confusing-void-expression": "off",
1139
1042
  "@typescript-eslint/no-duplicate-type-constituents": "off",
@@ -1163,6 +1066,7 @@ function typescript(options) {
1163
1066
  "@typescript-eslint/prefer-includes": "off",
1164
1067
  "@typescript-eslint/prefer-nullish-coalescing": "off",
1165
1068
  "@typescript-eslint/prefer-optional-chain": "off",
1069
+ "@typescript-eslint/prefer-promise-reject-errors": "off",
1166
1070
  "@typescript-eslint/prefer-readonly": "off",
1167
1071
  "@typescript-eslint/prefer-readonly-parameter-types": "off",
1168
1072
  "@typescript-eslint/prefer-reduce-type-parameter": "off",
@@ -1179,35 +1083,11 @@ function typescript(options) {
1179
1083
  "@typescript-eslint/switch-exhaustiveness-check": "off",
1180
1084
  "@typescript-eslint/unbound-method": "off"
1181
1085
  } : {},
1182
- /**
1183
- * Off for Prettier
1184
- * https://github.com/prettier/eslint-config-prettier/blob/main/index.js
1185
- */
1186
- "@typescript-eslint/block-spacing": "off",
1187
- "@typescript-eslint/brace-style": "off",
1188
- "@typescript-eslint/comma-dangle": "off",
1189
- "@typescript-eslint/comma-spacing": "off",
1190
- "@typescript-eslint/func-call-spacing": "off",
1191
- "@typescript-eslint/indent": "off",
1192
- "@typescript-eslint/key-spacing": "off",
1193
- "@typescript-eslint/keyword-spacing": "off",
1194
- "@typescript-eslint/lines-around-comment": "off",
1195
- "@typescript-eslint/member-delimiter-style": "off",
1196
- "@typescript-eslint/no-extra-parens": "off",
1197
- "@typescript-eslint/no-extra-semi": "off",
1198
- "@typescript-eslint/object-curly-spacing": "off",
1199
- "@typescript-eslint/quotes": "off",
1200
- "@typescript-eslint/semi": "off",
1201
- "@typescript-eslint/space-before-blocks": "off",
1202
- "@typescript-eslint/space-before-function-paren": "off",
1203
- "@typescript-eslint/space-infix-ops": "off",
1204
- "@typescript-eslint/type-annotation-spacing": "off",
1205
1086
  /**
1206
1087
  * Superseded by TS rules below
1207
1088
  */
1208
1089
  "class-methods-use-this": "off",
1209
1090
  "default-param-last": "off",
1210
- "lines-between-class-members": "off",
1211
1091
  "no-duplicate-imports": "off",
1212
1092
  "no-invalid-this": "off",
1213
1093
  "no-loop-func": "off",
@@ -1219,7 +1099,6 @@ function typescript(options) {
1219
1099
  "no-unused-vars": "off",
1220
1100
  "no-use-before-define": "off",
1221
1101
  "no-useless-constructor": "off",
1222
- "padding-line-between-statements": "off",
1223
1102
  /**
1224
1103
  * The rest
1225
1104
  */
@@ -1242,11 +1121,6 @@ function typescript(options) {
1242
1121
  "@typescript-eslint/explicit-function-return-type": "off",
1243
1122
  "@typescript-eslint/explicit-member-accessibility": "warn",
1244
1123
  "@typescript-eslint/init-declarations": "off",
1245
- "@typescript-eslint/lines-between-class-members": [
1246
- "warn",
1247
- "always",
1248
- { exceptAfterOverload: true }
1249
- ],
1250
1124
  "@typescript-eslint/max-params": "off",
1251
1125
  "@typescript-eslint/member-ordering": "error",
1252
1126
  "@typescript-eslint/method-signature-style": "warn",
@@ -1267,7 +1141,6 @@ function typescript(options) {
1267
1141
  "@typescript-eslint/no-require-imports": "error",
1268
1142
  "@typescript-eslint/no-restricted-imports": "off",
1269
1143
  "@typescript-eslint/no-shadow": ["error"],
1270
- "@typescript-eslint/no-type-alias": "off",
1271
1144
  "@typescript-eslint/no-unnecessary-type-constraint": "warn",
1272
1145
  "@typescript-eslint/no-unsafe-declaration-merging": "error",
1273
1146
  "@typescript-eslint/no-unused-expressions": ["error"],
@@ -1283,17 +1156,6 @@ function typescript(options) {
1283
1156
  "@typescript-eslint/no-use-before-define": "error",
1284
1157
  "@typescript-eslint/no-useless-constructor": "error",
1285
1158
  "@typescript-eslint/no-useless-empty-export": "warn",
1286
- "@typescript-eslint/padding-line-between-statements": [
1287
- "error",
1288
- { blankLine: "always", next: "*", prev: "multiline-block-like" },
1289
- { blankLine: "always", next: "multiline-block-like", prev: "*" },
1290
- { blankLine: "always", next: "*", prev: "multiline-const" },
1291
- { blankLine: "always", next: "multiline-const", prev: "*" },
1292
- { blankLine: "always", next: "*", prev: "multiline-let" },
1293
- { blankLine: "always", next: "multiline-let", prev: "*" },
1294
- { blankLine: "always", next: "*", prev: "multiline-var" },
1295
- { blankLine: "always", next: "multiline-var", prev: "*" }
1296
- ],
1297
1159
  "@typescript-eslint/parameter-properties": "off",
1298
1160
  "@typescript-eslint/prefer-enum-initializers": "error",
1299
1161
  // Unicorn does this better by providing a fixer
@@ -1336,7 +1198,6 @@ function unicorn() {
1336
1198
  // Don't care how if(blah.length) is checked
1337
1199
  "unicorn/explicit-length-check": "off",
1338
1200
  "unicorn/filename-case": "error",
1339
- "unicorn/import-index": ["warn", { ignoreImports: true }],
1340
1201
  // TODO Not sure if this is useful yet
1341
1202
  "unicorn/import-style": "off",
1342
1203
  "unicorn/new-for-builtins": "warn",
@@ -1381,9 +1242,6 @@ function unicorn() {
1381
1242
  "unicorn/no-unnecessary-polyfills": "error",
1382
1243
  "unicorn/no-unreadable-array-destructuring": "error",
1383
1244
  "unicorn/no-unreadable-iife": "error",
1384
- // Turned off for now, even Sindre doesn't like it:
1385
- // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/153
1386
- "unicorn/no-unsafe-regex": "off",
1387
1245
  // Recommended config turned this off so I will too
1388
1246
  "unicorn/no-unused-properties": "off",
1389
1247
  "unicorn/no-useless-fallback-in-spread": "warn",
@@ -1428,7 +1286,6 @@ function unicorn() {
1428
1286
  "unicorn/prefer-node-protocol": "off",
1429
1287
  "unicorn/prefer-number-properties": "warn",
1430
1288
  "unicorn/prefer-object-from-entries": "warn",
1431
- "unicorn/prefer-object-has-own": "warn",
1432
1289
  "unicorn/prefer-optional-catch-binding": "warn",
1433
1290
  "unicorn/prefer-prototype-methods": "warn",
1434
1291
  "unicorn/prefer-query-selector": "warn",
@@ -1446,7 +1303,6 @@ function unicorn() {
1446
1303
  "unicorn/prefer-top-level-await": "error",
1447
1304
  "unicorn/prefer-type-error": "warn",
1448
1305
  "unicorn/prevent-abbreviations": "off",
1449
- "unicorn/regex-shorthand": "warn",
1450
1306
  "unicorn/relative-url-style": "warn",
1451
1307
  "unicorn/require-array-join-separator": "warn",
1452
1308
  "unicorn/require-number-to-fixed-digits-argument": "warn",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@will-stone/eslint-config",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Will Stone's ESLint config",
5
5
  "keywords": [
6
6
  "eslint-config"
@@ -43,22 +43,22 @@
43
43
  },
44
44
  "prettier": "@will-stone/prettier-config",
45
45
  "dependencies": {
46
- "@typescript-eslint/eslint-plugin": "^6.18.1",
47
- "@typescript-eslint/parser": "^6.18.1",
48
- "astro-eslint-parser": "^0.16.0",
46
+ "@typescript-eslint/eslint-plugin": "^6.19.1",
47
+ "@typescript-eslint/parser": "^6.19.1",
48
+ "astro-eslint-parser": "^0.16.2",
49
49
  "confusing-browser-globals": "^1.0.11",
50
50
  "eslint-config-flat-gitignore": "^0.1.2",
51
- "eslint-plugin-astro": "^0.31.0",
51
+ "eslint-plugin-astro": "^0.31.3",
52
52
  "eslint-plugin-i": "^2.29.1",
53
- "eslint-plugin-jest": "^27.6.1",
53
+ "eslint-plugin-jest": "^27.6.3",
54
54
  "eslint-plugin-jsx-a11y": "^6.8.0",
55
55
  "eslint-plugin-n": "^16.6.2",
56
- "eslint-plugin-prettier": "^5.1.2",
56
+ "eslint-plugin-prettier": "^5.1.3",
57
57
  "eslint-plugin-react": "^7.33.2",
58
58
  "eslint-plugin-react-hooks": "^4.6.0",
59
59
  "eslint-plugin-simple-import-sort": "^10.0.0",
60
60
  "eslint-plugin-switch-case": "^1.1.2",
61
- "eslint-plugin-tailwindcss": "^3.13.1",
61
+ "eslint-plugin-tailwindcss": "^3.14.1",
62
62
  "eslint-plugin-unicorn": "^50.0.1",
63
63
  "glob": "^10.3.10",
64
64
  "globals": "^13.24.0",
@@ -68,16 +68,16 @@
68
68
  "devDependencies": {
69
69
  "@changesets/cli": "^2.27.1",
70
70
  "@types/confusing-browser-globals": "^1.0.3",
71
- "@types/eslint": "^8.56.1",
72
- "@types/node": "^20.10.7",
71
+ "@types/eslint": "^8.56.2",
72
+ "@types/node": "^20.11.7",
73
73
  "@will-stone/prettier-config": "^7.0.2",
74
74
  "eslint": "^8.56.0",
75
- "eslint-flat-config-viewer": "^0.1.8",
76
- "husky": "^8.0.3",
75
+ "eslint-flat-config-viewer": "^0.1.11",
76
+ "husky": "^9.0.6",
77
77
  "lint-staged": "^15.2.0",
78
- "prettier": "^3.1.1",
78
+ "prettier": "^3.2.4",
79
79
  "tsup": "^8.0.1",
80
- "type-fest": "^4.9.0",
80
+ "type-fest": "^4.10.1",
81
81
  "typescript": "^5.3.3"
82
82
  },
83
83
  "peerDependencies": {