@@ -29,6 +29,9 @@ globals:
29
29
window : readonly
30
30
31
31
plugins :
32
+ - ' @stylistic/js'
33
+ - ' @stylistic/ts'
34
+ - ' @stylistic/plus'
32
35
- ' @typescript-eslint'
33
36
- ava
34
37
- eslint-comments
@@ -45,7 +48,7 @@ plugins:
45
48
46
49
rules :
47
50
# # Added by eslint-config-standard
48
- array-bracket-spacing : 2
51
+ ' @stylistic/js/ array-bracket-spacing' : 2
49
52
camelcase :
50
53
- 2
51
54
- allow : ['^UNSAFE_']
57
60
- 2
58
61
- always
59
62
- ' null ' : ignore
60
- multiline-ternary :
63
+ ' @stylistic/js/ multiline-ternary' :
61
64
- 2
62
65
- always-multiline
63
66
no-async-promise-executor : 2
@@ -136,7 +139,7 @@ rules:
136
139
prefer-regex-literals :
137
140
- 2
138
141
- disallowRedundantWrapping : true
139
- spaced-comment :
142
+ ' @stylistic/js/ spaced-comment' :
140
143
- 2
141
144
- always
142
145
- line :
@@ -206,59 +209,59 @@ rules:
206
209
n/no-path-concat : 0
207
210
208
211
# # Disabled by eslint-config-prettier although added by eslint-config-standard
209
- arrow-spacing : 0
210
- comma-style : 0
211
- computed-property-spacing : 0
212
- dot-location : 0
213
- eol-last : 0
214
- generator-star-spacing : 0
215
- new-parens : 0
216
- no-floating-decimal : 0
217
- no-mixed-operators : 0
218
- no-mixed-spaces-and-tabs : 0
219
- no-multi-spaces : 0
220
- no-multiple-empty-lines : 0
221
- no-trailing-spaces : 0
212
+ ' @stylistic/js/arrow-spacing ' : 0
213
+ ' @stylistic/js/comma-style ' : 0
214
+ ' @stylistic/js/computed-property-spacing ' : 0
215
+ ' @stylistic/js/dot-location ' : 0
216
+ ' @stylistic/js/eol-last ' : 0
217
+ ' @stylistic/js/generator-star-spacing ' : 0
218
+ ' @stylistic/js/new-parens ' : 0
219
+ ' @stylistic/js/no-floating-decimal ' : 0
220
+ ' @stylistic/js/no-mixed-operators ' : 0
221
+ ' @stylistic/js/no-mixed-spaces-and-tabs ' : 0
222
+ ' @stylistic/js/no-multi-spaces ' : 0
223
+ ' @stylistic/js/no-multiple-empty-lines ' : 0
224
+ ' @stylistic/js/no-trailing-spaces ' : 0
225
+ ' @stylistic/js/no-whitespace-before-property ' : 0
226
+ ' @stylistic/js/object-curly-newline ' : 0
227
+ ' @stylistic/js/object-property-newline ' : 0
228
+ ' @stylistic/js/operator-linebreak ' : 0
229
+ ' @stylistic/js/padded-blocks ' : 0
230
+ ' @stylistic/js/quote-props ' : 0
231
+ ' @stylistic/js/rest-spread-spacing ' : 0
232
+ ' @stylistic/js/semi-spacing ' : 0
233
+ ' @stylistic/js/space-in-parens ' : 0
234
+ ' @stylistic/js/space-unary-ops ' : 0
235
+ ' @stylistic/js/template-curly-spacing ' : 0
236
+ ' @stylistic/js/template-tag-spacing ' : 0
237
+ ' @stylistic/js/wrap-iife ' : 0
238
+ ' @stylistic/js/yield-star-spacing ' : 0
222
239
no-unexpected-multiline : 0
223
- no-whitespace-before-property : 0
224
- object-curly-newline : 0
225
- object-property-newline : 0
226
- operator-linebreak : 0
227
- padded-blocks : 0
228
- quote-props : 0
229
- rest-spread-spacing : 0
230
- semi-spacing : 0
231
- space-in-parens : 0
232
- space-unary-ops : 0
233
- template-curly-spacing : 0
234
- template-tag-spacing : 0
235
- wrap-iife : 0
236
- yield-star-spacing : 0
237
240
unicorn/no-nested-ternary : 0
238
241
239
242
# Disabled by eslint-config-prettier
240
- array-bracket-newline : 0
241
- array-element-newline : 0
242
- arrow-parens : 0
243
- function-paren- newline : 0
244
- function-call-argument- newline : 0
245
- implicit-arrow-linebreak : 0
246
- jsx-quotes : 0
247
- linebreak-style : 0
248
- max-len : 0
249
- max-statements-per-line : 0
250
- newline-per-chained-call : 0
251
- no-confusing-arrow : 0
252
- nonblock-statement-body-position : 0
253
- one-var-declaration-per-line : 0
254
- semi-style : 0
255
- switch-colon-spacing : 0
256
- wrap-regex : 0
243
+ ' @stylistic/js/ array-bracket-newline' : 0
244
+ ' @stylistic/js/ array-element-newline' : 0
245
+ ' @stylistic/js/ arrow-parens' : 0
246
+ ' @stylistic/js/ function-call-argument- newline' : 0
247
+ ' @stylistic/js/ function-paren- newline' : 0
248
+ ' @stylistic/js/ implicit-arrow-linebreak' : 0
249
+ ' @stylistic/js/ jsx-quotes' : 0
250
+ ' @stylistic/js/ linebreak-style' : 0
251
+ ' @stylistic/js/ max-len' : 0
252
+ ' @stylistic/js/ max-statements-per-line' : 0
253
+ ' @stylistic/js/ newline-per-chained-call' : 0
254
+ ' @stylistic/js/ no-confusing-arrow' : 0
255
+ ' @stylistic/js/ nonblock-statement-body-position' : 0
256
+ ' @stylistic/js/ one-var-declaration-per-line' : 0
257
+ ' @stylistic/js/ semi-style' : 0
258
+ ' @stylistic/js/ switch-colon-spacing' : 0
259
+ ' @stylistic/js/ wrap-regex' : 0
257
260
unicorn/empty-brace-spaces : 0
258
261
unicorn/number-literal-case : 0
259
262
260
263
# # Warned against, but allowed by eslint-config-prettier
261
- no-tabs : 2
264
+ ' @stylistic/js/ no-tabs' : 2
262
265
263
266
# # Globals
264
267
n/prefer-global/console : 2
@@ -278,10 +281,10 @@ rules:
278
281
no-inline-comments :
279
282
- 2
280
283
- ignorePattern : c8
281
- multiline-comment-style :
284
+ ' @stylistic/js/ multiline-comment-style' :
282
285
- 2
283
286
- separate-lines
284
- line-comment-position : 2
287
+ ' @stylistic/js/ line-comment-position' : 2
285
288
# This makes commenting/uncommenting code tedious
286
289
capitalized-comments : 0
287
290
# We allow TODO comments
@@ -312,6 +315,7 @@ rules:
312
315
313
316
# # Indentation
314
317
unicorn/template-indent : 2
318
+ ' @stylistic/plus/indent-binary-ops ' : 0
315
319
316
320
# # Parenthesis
317
321
unicorn/no-unreadable-iife : 2
@@ -957,7 +961,7 @@ overrides:
957
961
rules :
958
962
# # Added by eslint-config-standard
959
963
dot-notation : 2
960
- lines-between-class-members :
964
+ ' @stylistic/js/ lines-between-class-members' :
961
965
- 2
962
966
- always
963
967
- exceptAfterSingleLine : true
@@ -981,26 +985,26 @@ overrides:
981
985
- caughtErrors : all
982
986
983
987
# # Disabled by eslint-config-prettier
984
- block-spacing : 0
985
- brace-style : 0
986
- comma-dangle : 0
987
- comma-spacing : 0
988
- func -call-spacing : 0
989
- indent : 0
990
- key-spacing : 0
991
- keyword-spacing : 0
992
- lines-around-comment : 0
993
- no-extra-parens : 0
994
- no-extra-semi : 0
995
- object-curly-spacing : 0
996
- quotes : 0
997
- semi : 0
998
- space-before-blocks : 0
999
- space-before-function-paren : 0
1000
- space-infix-ops : 0
988
+ ' @stylistic/js/ block-spacing' : 0
989
+ ' @stylistic/js/ brace-style' : 0
990
+ ' @stylistic/js/ comma-dangle' : 0
991
+ ' @stylistic/js/ comma-spacing' : 0
992
+ ' @stylistic/js/function -call-spacing' : 0
993
+ ' @stylistic/js/ indent' : 0
994
+ ' @stylistic/js/ key-spacing' : 0
995
+ ' @stylistic/js/ keyword-spacing' : 0
996
+ ' @stylistic/js/ lines-around-comment' : 0
997
+ ' @stylistic/js/ no-extra-parens' : 0
998
+ ' @stylistic/js/ no-extra-semi' : 0
999
+ ' @stylistic/js/ object-curly-spacing' : 0
1000
+ ' @stylistic/js/ quotes' : 0
1001
+ ' @stylistic/js/ semi' : 0
1002
+ ' @stylistic/js/ space-before-blocks' : 0
1003
+ ' @stylistic/js/ space-before-function-paren' : 0
1004
+ ' @stylistic/js/ space-infix-ops' : 0
1001
1005
1002
1006
# # Blank lines
1003
- padding-line-between-statements :
1007
+ ' @stylistic/js/ padding-line-between-statements' :
1004
1008
- 2
1005
1009
- blankLine : always
1006
1010
prev : [multiline-block-like, directive]
@@ -1066,7 +1070,7 @@ overrides:
1066
1070
rules :
1067
1071
# Same rules as JavaScript files
1068
1072
' @typescript-eslint/dot-notation ' : 2
1069
- ' @typescript-eslint /lines-between-class-members ' :
1073
+ ' @stylistic/ts /lines-between-class-members ' :
1070
1074
- 2
1071
1075
- always
1072
1076
- exceptAfterSingleLine : true
@@ -1088,31 +1092,35 @@ overrides:
1088
1092
' @typescript-eslint/no-unused-vars ' :
1089
1093
- 2
1090
1094
- caughtErrors : all
1091
- ' @typescript-eslint/block-spacing ' : 0
1092
- ' @typescript-eslint/brace-style ' : 0
1093
- ' @typescript-eslint/comma-dangle ' : 0
1094
- ' @typescript-eslint/comma-spacing ' : 0
1095
- ' @typescript-eslint/func-call-spacing ' : 0
1096
- ' @typescript-eslint/indent ' : 0
1097
- ' @typescript-eslint/key-spacing ' : 0
1098
- ' @typescript-eslint/keyword-spacing ' : 0
1099
- ' @typescript-eslint/lines-around-comment ' : 0
1100
- ' @typescript-eslint/no-extra-parens ' : 0
1101
- ' @typescript-eslint/no-extra-semi ' : 0
1102
- ' @typescript-eslint/object-curly-spacing ' : 0
1103
- ' @typescript-eslint/quotes ' : 0
1104
- ' @typescript-eslint/semi ' : 0
1105
- ' @typescript-eslint/space-before-blocks ' : 0
1106
- ' @typescript-eslint/space-before-function-paren ' : 0
1107
- ' @typescript-eslint/space-infix-ops ' : 0
1108
- ' @typescript-eslint/padding-line-between-statements ' :
1095
+ ' @stylistic/ts/block-spacing ' : 0
1096
+ ' @stylistic/ts/brace-style ' : 0
1097
+ ' @stylistic/ts/comma-dangle ' : 0
1098
+ ' @stylistic/ts/comma-spacing ' : 0
1099
+ ' @stylistic/ts/function-call-spacing ' : 0
1100
+ ' @stylistic/ts/indent ' : 0
1101
+ ' @stylistic/ts/key-spacing ' : 0
1102
+ ' @stylistic/ts/keyword-spacing ' : 0
1103
+ ' @stylistic/ts/lines-around-comment ' : 0
1104
+ ' @stylistic/ts/no-extra-parens ' : 0
1105
+ ' @stylistic/ts/no-extra-semi ' : 0
1106
+ ' @stylistic/ts/object-curly-newline ' : 0
1107
+ ' @stylistic/ts/object-curly-spacing ' : 0
1108
+ ' @stylistic/ts/quote-props ' : 0
1109
+ ' @stylistic/ts/quotes ' : 0
1110
+ ' @stylistic/ts/semi ' : 0
1111
+ ' @stylistic/ts/space-before-blocks ' : 0
1112
+ ' @stylistic/ts/space-before-function-paren ' : 0
1113
+ ' @stylistic/ts/space-infix-ops ' : 0
1114
+ ' @stylistic/ts/padding-line-between-statements ' :
1109
1115
- 2
1110
1116
- blankLine : always
1111
1117
prev : [multiline-block-like, directive, interface, type]
1112
1118
next : ' *'
1113
1119
- blankLine : always
1114
1120
prev : ' *'
1115
1121
next : multiline-block-like
1122
+ ' @stylistic/plus/type-generic-spacing ' : 0
1123
+ ' @stylistic/plus/type-named-tuple-spacing ' : 0
1116
1124
' @typescript-eslint/no-shadow ' :
1117
1125
- 2
1118
1126
- builtinGlobals : true
@@ -1142,6 +1150,7 @@ overrides:
1142
1150
# - enforceForDeclarationWithTypeAnnotation: true
1143
1151
' @typescript-eslint/class-methods-use-this ' : 2
1144
1152
' @typescript-eslint/no-invalid-this ' : 2
1153
+ ' @typescript-eslint/prefer-promise-reject-errors ' : 2
1145
1154
' @typescript-eslint/require-await ' : 2
1146
1155
' @typescript-eslint/return-await ' : 2
1147
1156
' @typescript-eslint/no-restricted-imports ' :
@@ -1153,8 +1162,8 @@ overrides:
1153
1162
allowTypeImports : true
1154
1163
1155
1164
# # Disabled by eslint-config-prettier
1156
- ' @typescript-eslint /member-delimiter-style ' : 0
1157
- ' @typescript-eslint /type-annotation-spacing ' : 0
1165
+ ' @stylistic/ts /member-delimiter-style ' : 0
1166
+ ' @stylistic/ts /type-annotation-spacing ' : 0
1158
1167
1159
1168
# Types requires more lines of code
1160
1169
max-lines :
@@ -1217,6 +1226,7 @@ overrides:
1217
1226
# `${...}` is useful in validation error messages where input might be
1218
1227
# unknown or of many different types
1219
1228
' @typescript-eslint/restrict-template-expressions ' : 0
1229
+ ' @typescript-eslint/no-unnecessary-template-expression ' : 2
1220
1230
1221
1231
# # Tests
1222
1232
' @typescript-eslint/no-unnecessary-boolean-literal-compare ' : 2
@@ -1237,7 +1247,9 @@ overrides:
1237
1247
' @typescript-eslint/no-for-in-array ' : 2
1238
1248
1239
1249
# # Switch
1240
- ' @typescript-eslint/switch-exhaustiveness-check ' : 2
1250
+ ' @typescript-eslint/switch-exhaustiveness-check ' :
1251
+ - 2
1252
+ - requireDefaultForNonUnion : true
1241
1253
1242
1254
# # Functions
1243
1255
' @typescript-eslint/method-signature-style ' : 2
@@ -1282,6 +1294,7 @@ overrides:
1282
1294
1283
1295
# # Arrays
1284
1296
' @typescript-eslint/array-type ' : 2
1297
+ ' @typescript-eslint/prefer-find ' : 2
1285
1298
' @typescript-eslint/prefer-includes ' : 2
1286
1299
' @typescript-eslint/prefer-reduce-type-parameter ' : 2
1287
1300
' @typescript-eslint/require-array-sort-compare ' :
@@ -1292,6 +1305,9 @@ overrides:
1292
1305
' @typescript-eslint/restrict-plus-operands ' : 2
1293
1306
' @typescript-eslint/prefer-string-starts-ends-with ' : 2
1294
1307
1308
+ # # Numbers
1309
+ ' @typescript-eslint/no-unsafe-unary-minus ' : 2
1310
+
1295
1311
# # RegExps
1296
1312
' @typescript-eslint/prefer-regexp-exec ' : 2
1297
1313
@@ -1444,7 +1460,7 @@ overrides:
1444
1460
1445
1461
# Inline comments can be nicer in documentation
1446
1462
# Examples usually include the return value as inline comments
1447
- line-comment-position : 0
1463
+ ' @stylistic/js/ line-comment-position' : 0
1448
1464
no-inline-comments : 0
1449
1465
1450
1466
# Documentation often require the module itself.
0 commit comments