@newsteam/eslint-config 0.0.242 → 0.0.243

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.
@@ -395,6 +395,12 @@ var rules = {
395
395
  },
396
396
  }
397
397
  ],
398
+ /*
399
+ * Line comments can be positioned above or beside code. This rule helps teams maintain a consistent style.
400
+ *
401
+ * https://eslint.style/rules/default/line-comment-position
402
+ */
403
+ "@stylistic/line-comment-position": "error",
398
404
  /*
399
405
  * Enforce consistent linebreak style
400
406
  *
@@ -448,6 +454,16 @@ var rules = {
448
454
  * https://eslint.style/rules/default/member-delimiter-style
449
455
  */
450
456
  "@stylistic/member-delimiter-style": "error",
457
+ /*
458
+ * Many style guides require a particular style for comments that span multiple lines.
459
+ * For example, some style guides prefer the use of a single block comment for multiline
460
+ * comments, whereas other style guides prefer consecutive line comments.
461
+ *
462
+ * Off because it's annoying
463
+ *
464
+ * https://eslint.style/rules/default/multiline-comment-style
465
+ */
466
+ "@stylistic/multiline-comment-style": "off",
451
467
  /*
452
468
  * Enforce newlines between operands of ternary expressions
453
469
  *
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  name: string;
7
7
  })[];
8
8
  "unicorn/consistent-destructuring": string;
9
+ "unicorn/consistent-empty-array-spread": string;
9
10
  "unicorn/consistent-function-scoping": string;
10
11
  "unicorn/custom-error-definition": string;
11
12
  "unicorn/empty-brace-spaces": string;
@@ -33,9 +34,11 @@ declare const _default: {
33
34
  "unicorn/no-for-loop": string;
34
35
  "unicorn/no-hex-escape": string;
35
36
  "unicorn/no-instanceof-array": string;
37
+ "unicorn/no-invalid-fetch-options": string;
36
38
  "unicorn/no-invalid-remove-event-listener": string;
37
39
  "unicorn/no-keyword-prefix": string;
38
40
  "unicorn/no-lonely-if": string;
41
+ "unicorn/no-magic-array-flat-depth": string;
39
42
  "unicorn/no-negated-condition": string;
40
43
  "unicorn/no-nested-ternary": string;
41
44
  "unicorn/no-new-array": string;
@@ -100,10 +103,14 @@ declare const _default: {
100
103
  "unicorn/prefer-set-has": string;
101
104
  "unicorn/prefer-set-size": string;
102
105
  "unicorn/prefer-spread": string;
106
+ "unicorn/prefer-string-raw": string;
103
107
  "unicorn/prefer-string-replace-all": string;
104
108
  "unicorn/prefer-string-slice": string;
105
109
  "unicorn/prefer-string-starts-ends-with": string;
106
110
  "unicorn/prefer-string-trim-start-end": string;
111
+ "unicorn/prefer-structured-clone": (string | {
112
+ functions: string[];
113
+ })[];
107
114
  "unicorn/prefer-switch": (string | {
108
115
  emptyDefaultCase: string;
109
116
  minimumCases: number;
@@ -8,13 +8,13 @@ var rules = {
8
8
  /*
9
9
  * Enforce the use of regex shorthands to improve readability. (fixable)
10
10
  *
11
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/better-regex.md
11
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/better-regex.md
12
12
  */
13
13
  "unicorn/better-regex": "error",
14
14
  /*
15
15
  * Enforce a specific parameter name in catch clauses.
16
16
  *
17
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/catch-error-name.md
17
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/catch-error-name.md
18
18
  */
19
19
  "unicorn/catch-error-name": [
20
20
  "error",
@@ -25,55 +25,61 @@ var rules = {
25
25
  /*
26
26
  * Use destructured variables over properties
27
27
  *
28
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/consistent-destructuring.md
28
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-destructuring.md
29
29
  */
30
30
  "unicorn/consistent-destructuring": "error",
31
+ /*
32
+ * Prefer consistent types when spreading a ternary in an array literal
33
+ *
34
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-empty-array-spread.md
35
+ */
36
+ "unicorn/consistent-empty-array-spread": "error",
31
37
  /*
32
38
  * Move function definitions to the highest possible scope.
33
39
  *
34
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/consistent-function-scoping.md
40
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-function-scoping.md
35
41
  */
36
42
  "unicorn/consistent-function-scoping": "error",
37
43
  /*
38
44
  * Enforce correct Error subclassing. (fixable)
39
45
  *
40
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/custom-error-definition.md
46
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/custom-error-definition.md
41
47
  */
42
48
  "unicorn/custom-error-definition": "error",
43
49
  /*
44
50
  * Enforce no spaces between braces. (fixable)
45
51
  *
46
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/empty-brace-spaces.md
52
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/empty-brace-spaces.md
47
53
  */
48
54
  "unicorn/empty-brace-spaces": "error",
49
55
  /*
50
56
  * Enforce passing a message value when throwing a built-in error.
51
57
  *
52
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/error-message.md
58
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/error-message.md
53
59
  */
54
60
  "unicorn/error-message": "error",
55
61
  /*
56
62
  * Require escape sequences to use uppercase values. (fixable)
57
63
  *
58
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/escape-case.md
64
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/escape-case.md
59
65
  */
60
66
  "unicorn/escape-case": "error",
61
67
  /*
62
68
  * Add expiration conditions to TODO comments
63
69
  *
64
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/expiring-todo-comments.md
70
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/expiring-todo-comments.md
65
71
  */
66
72
  "unicorn/expiring-todo-comments": "error",
67
73
  /*
68
74
  * Enforce explicitly comparing the length property of a value. (partly fixable)
69
75
  *
70
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/explicit-length-check.md
76
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/explicit-length-check.md
71
77
  */
72
78
  "unicorn/explicit-length-check": "error",
73
79
  /*
74
80
  * Enforce a case style for filenames.
75
81
  *
76
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/filename-case.md
82
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md
77
83
  */
78
84
  "unicorn/filename-case": [
79
85
  "error",
@@ -86,31 +92,31 @@ var rules = {
86
92
  *
87
93
  * Off for now...
88
94
  *
89
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/import-style.md
95
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/import-style.md
90
96
  */
91
97
  "unicorn/import-style": "off",
92
98
  /*
93
99
  * Enforce the use of new for all builtins, except String, Number and Boolean. (fixable)
94
100
  *
95
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/new-for-builtins.md
101
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/new-for-builtins.md
96
102
  */
97
103
  "unicorn/new-for-builtins": "error",
98
104
  /*
99
105
  * Enforce specifying rules to disable in eslint-disable comments.
100
106
  *
101
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-abusive-eslint-disable.md
107
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-abusive-eslint-disable.md
102
108
  */
103
109
  "unicorn/no-abusive-eslint-disable": "error",
104
110
  /*
105
111
  * Disallow anonymous functions and classes as the default export
106
112
  *
107
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-anonymous-default-export.md
113
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-anonymous-default-export.md
108
114
  */
109
115
  "unicorn/no-anonymous-default-export": "error",
110
116
  /*
111
117
  * Prevent passing a function reference directly to iterator methods
112
118
  *
113
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-array-callback-reference.md
119
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-callback-reference.md
114
120
  */
115
121
  "unicorn/no-array-callback-reference": "error",
116
122
  /*
@@ -119,93 +125,105 @@ var rules = {
119
125
  * We're turning this off because forEach is really convienient to use
120
126
  * with nodeLists, which can't be processed as arrays
121
127
  *
122
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-array-for-each.md
128
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-for-each.md
123
129
  */
124
130
  "unicorn/no-array-for-each": "off",
125
131
  /*
126
132
  * Disallow using the this argument in array methods
127
133
  *
128
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-array-method-this-argument.md
134
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-method-this-argument.md
129
135
  */
130
136
  "unicorn/no-array-method-this-argument": "error",
131
137
  /*
132
138
  * Enforce combining multiple Array#push() into one call
133
139
  *
134
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-array-push-push.md
140
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-push-push.md
135
141
  */
136
142
  "unicorn/no-array-push-push": "error",
137
143
  /*
138
144
  * Disallow Array#reduce() and Array#reduceRight()
139
145
  *
140
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-array-reduce.md
146
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-reduce.md
141
147
  */
142
148
  "unicorn/no-array-reduce": "error",
143
149
  /*
144
150
  * Forbid member access from await expression
145
151
  *
146
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-await-expression-member.md
152
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-expression-member.md
147
153
  */
148
154
  "unicorn/no-await-expression-member": "error",
149
155
  /*
150
156
  * Disallow member access from await expression
151
157
  *
152
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-await-in-promise-methods.md
158
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-in-promise-methods.md
153
159
  */
154
160
  "unicorn/no-await-in-promise-methods": "error",
155
161
  /*
156
162
  * Do not use leading/trailing space between console.log parameters. (fixable)
157
163
  *
158
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-console-spaces.md
164
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-console-spaces.md
159
165
  */
160
166
  "unicorn/no-console-spaces": "error",
161
167
  /*
162
168
  * Do not use document.cookie directly
163
169
  *
164
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-document-cookie.md
170
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-document-cookie.md
165
171
  */
166
172
  "unicorn/no-document-cookie": "error",
167
173
  /*
168
174
  * Disallow empty files
169
175
  *
170
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-empty-file.md
176
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-empty-file.md
171
177
  */
172
178
  "unicorn/no-empty-file": "error",
173
179
  /*
174
180
  * Do not use a for loop that can be replaced with a for-of loop
175
181
  *
176
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-for-loop.md
182
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-for-loop.md
177
183
  */
178
184
  "unicorn/no-for-loop": "error",
179
185
  /*
180
186
  * Enforce the use of unicode escapes instead of hexadecimal escapes. (fixable)
181
187
  *
182
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-hex-escape.md
188
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-hex-escape.md
183
189
  */
184
190
  "unicorn/no-hex-escape": "error",
185
191
  /*
186
192
  * Require Array.isArray() instead of instanceof Array
187
193
  *
188
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-instanceof-array.md
194
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-instanceof-array.md
189
195
  */
190
196
  "unicorn/no-instanceof-array": "error",
197
+ /*
198
+ * Disallow invalid options in fetch() and new Request()
199
+ *
200
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-fetch-options.md
201
+ */
202
+ "unicorn/no-invalid-fetch-options": "error",
191
203
  /*
192
204
  * Prevent calling EventTarget#removeEventListener() with the result of an expression
193
205
  *
194
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-invalid-remove-event-listener.md
206
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-remove-event-listener.md
195
207
  */
196
208
  "unicorn/no-invalid-remove-event-listener": "error",
197
209
  /*
198
210
  * Disallow identifiers starting with new or class
199
211
  *
200
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-keyword-prefix.md
212
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-keyword-prefix.md
201
213
  */
202
214
  "unicorn/no-keyword-prefix": "off",
203
215
  /*
204
216
  * Disallow if statements as the only statement in if blocks without else
205
217
  *
206
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-lonely-if.md
218
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-lonely-if.md
207
219
  */
208
220
  "unicorn/no-lonely-if": "error",
221
+ /*
222
+ * Disallow a magic number as the depth argument in Array#flat(…).
223
+ *
224
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-magic-array-flat-depth.md
225
+ */
226
+ "unicorn/no-magic-array-flat-depth": "error",
209
227
  /*
210
228
  * Disallow negated conditions
211
229
  *
@@ -213,37 +231,37 @@ var rules = {
213
231
  *
214
232
  * Turning off no-negated-condition because this overrides it
215
233
  *
216
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-negated-condition.md
234
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negated-condition.md
217
235
  */
218
236
  "unicorn/no-negated-condition": "error",
219
237
  /*
220
238
  * Disallow nested ternary expressions. (partly fixable)
221
239
  *
222
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-nested-ternary.md
240
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-nested-ternary.md
223
241
  */
224
242
  "unicorn/no-nested-ternary": "error",
225
243
  /*
226
244
  * Disallow new Array()
227
245
  *
228
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-new-array.md
246
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-array.md
229
247
  */
230
248
  "unicorn/no-new-array": "error",
231
249
  /*
232
250
  * Enforce the use of Buffer.from() and Buffer.alloc() instead of the deprecated new Buffer(). (fixable)
233
251
  *
234
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-new-buffer.md
252
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-buffer.md
235
253
  */
236
254
  "unicorn/no-new-buffer": "error",
237
255
  /*
238
256
  * Disallow the use of the null literal, to encourage using undefined instead.
239
257
  *
240
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-null.md
258
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-null.md
241
259
  */
242
260
  "unicorn/no-null": "error",
243
261
  /*
244
262
  * Disallow the use of objects as default parameters
245
263
  *
246
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/unicorn/no-object-as-default-parameter.md
264
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-object-as-default-parameter.md
247
265
  */
248
266
  "unicorn/no-object-as-default-parameter": "error",
249
267
  /*
@@ -251,97 +269,97 @@ var rules = {
251
269
  *
252
270
  * Handled by 'node/no-process-exit'
253
271
  *
254
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-process-exit.md
272
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-process-exit.md
255
273
  */
256
274
  "unicorn/no-process-exit": "off",
257
275
  /*
258
276
  * Disallow passing single-element arrays to Promise methods
259
277
  *
260
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-single-promise-in-promise-methods.md
278
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-single-promise-in-promise-methods.md
261
279
  */
262
280
  "unicorn/no-single-promise-in-promise-methods": "error",
263
281
  /*
264
282
  * Forbid classes that only have static members
265
283
  *
266
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-static-only-class.md
284
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-static-only-class.md
267
285
  */
268
286
  "unicorn/no-static-only-class": "error",
269
287
  /*
270
288
  * Disallow then property
271
289
  *
272
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-thenable.md
290
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-thenable.md
273
291
  */
274
292
  "unicorn/no-thenable": "error",
275
293
  /*
276
294
  * Disallow assigning this to a variable
277
295
  *
278
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-this-assignment.md
296
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-this-assignment.md
279
297
  */
280
298
  "unicorn/no-this-assignment": "error",
281
299
  /*
282
300
  * Disallow comparing undefined using typeof
283
301
  *
284
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-typeof-undefined.md
302
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-typeof-undefined.md
285
303
  */
286
304
  "unicorn/no-typeof-undefined": "error",
287
305
  /*
288
306
  * Disallow awaiting non-promise values
289
307
  *
290
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-unnecessary-await.md
308
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-await.md
291
309
  */
292
310
  "unicorn/no-unnecessary-await": "error",
293
311
  /*
294
312
  * Enforce the use of built-in methods instead of unnecessary polyfills
295
313
  *
296
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-unnecessary-polyfills.md
314
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-polyfills.md
297
315
  */
298
316
  "unicorn/no-unnecessary-polyfills": "error",
299
317
  /*
300
318
  * Disallow unreadable array destructuring.
301
319
  *
302
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-unreadable-array-destructuring.md
320
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-array-destructuring.md
303
321
  */
304
322
  "unicorn/no-unreadable-array-destructuring": "error",
305
323
  /*
306
324
  * Disallow unreadable IIFEs
307
325
  *
308
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-unreadable-iife.md
326
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-iife.md
309
327
  */
310
328
  "unicorn/no-unreadable-iife": "error",
311
329
  /*
312
330
  * Disallow unused object properties.
313
331
  *
314
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-unused-properties.md
332
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unused-properties.md
315
333
  */
316
334
  "unicorn/no-unused-properties": "error",
317
335
  /*
318
336
  * Forbid useless fallback when spreading in object literals
319
337
  *
320
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-useless-fallback-in-spread.md
338
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-fallback-in-spread.md
321
339
  */
322
340
  "unicorn/no-useless-fallback-in-spread": "error",
323
341
  /*
324
342
  * Disallow useless array length check
325
343
  *
326
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-useless-length-check.md
344
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-length-check.md
327
345
  */
328
346
  "unicorn/no-useless-length-check": "error",
329
347
  /*
330
348
  * Disallow returning/yielding Promise.resolve/reject() in async functions or promise callbacks
331
349
  *
332
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-useless-promise-resolve-reject.md
350
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-promise-resolve-reject.md
333
351
  */
334
352
  "unicorn/no-useless-promise-resolve-reject": "error",
335
353
  /*
336
354
  * Disallow useless spread
337
355
  *
338
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-useless-spread.md
356
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-spread.md
339
357
  */
340
358
  "unicorn/no-useless-spread": "error",
341
359
  /*
342
360
  * Disallow useless case in switch statements
343
361
  *
344
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-useless-switch-case.md
362
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-switch-case.md
345
363
  */
346
364
  "unicorn/no-useless-switch-case": "error",
347
365
  /*
@@ -349,61 +367,61 @@ var rules = {
349
367
  *
350
368
  * This conflicts with @typescript-eslint/init-declarations
351
369
  *
352
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-useless-undefined.md
370
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-undefined.md
353
371
  */
354
372
  "unicorn/no-useless-undefined": "off",
355
373
  /*
356
374
  * Disallow number literals with zero fractions or dangling dots
357
375
  *
358
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-zero-fractions.md
376
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-zero-fractions.md
359
377
  */
360
378
  "unicorn/no-zero-fractions": "error",
361
379
  /*
362
380
  * Enforce lowercase identifier and uppercase value for number literals. (fixable)
363
381
  *
364
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/number-literal-case.md
382
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/number-literal-case.md
365
383
  */
366
384
  "unicorn/number-literal-case": "error",
367
385
  /*
368
386
  * Enforce the style of numeric separators by correctly grouping digits
369
387
  *
370
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/numeric-separators-style.md
388
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/numeric-separators-style.md
371
389
  */
372
390
  "unicorn/numeric-separators-style": "error",
373
391
  /*
374
392
  * Prefer addEventListener over on-functions. (fixable)
375
393
  *
376
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-add-event-listener.md
394
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-add-event-listener.md
377
395
  */
378
396
  "unicorn/prefer-add-event-listener": "error",
379
397
  /*
380
398
  * Prefer .find(...) over the first element from .filter(...)
381
399
  *
382
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-array-find.md
400
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-find.md
383
401
  */
384
402
  "unicorn/prefer-array-find": "error",
385
403
  /*
386
404
  * Prefer Array#flat() over legacy techniques to flatten arrays
387
405
  *
388
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-array-flat.md
406
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat.md
389
407
  */
390
408
  "unicorn/prefer-array-flat": "error",
391
409
  /*
392
410
  * Prefer .flatMap(...) over .map(...).flat()
393
411
  *
394
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-array-flat-map.md
412
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat-map.md
395
413
  */
396
414
  "unicorn/prefer-array-flat-map": "error",
397
415
  /*
398
416
  * Prefer Array#indexOf() over Array#findIndex() when looking for the index of an item
399
417
  *
400
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-array-index-of.md
418
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-index-of.md
401
419
  */
402
420
  "unicorn/prefer-array-index-of": "error",
403
421
  /*
404
422
  * Prefer .some(...) over .find(...).
405
423
  *
406
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-array-some.md
424
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-some.md
407
425
  */
408
426
  "unicorn/prefer-array-some": "error",
409
427
  /*
@@ -411,55 +429,55 @@ var rules = {
411
429
  *
412
430
  * This breaks typescript array typings at the moment
413
431
  *
414
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-at.md
432
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-at.md
415
433
  */
416
434
  "unicorn/prefer-at": "off",
417
435
  /*
418
436
  * Prefer .at() method for index access and String#charAt()
419
437
  *
420
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-blob-reading-methods.md
438
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-blob-reading-methods.md
421
439
  */
422
440
  "unicorn/prefer-blob-reading-methods": "error",
423
441
  /*
424
442
  * Prefer String#codePointAt(...) over String#charCodeAt(...) and String.fromCodePoint(...) over String.fromCharCode(...)
425
443
  *
426
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-code-point.md
444
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-code-point.md
427
445
  */
428
446
  "unicorn/prefer-code-point": "error",
429
447
  /*
430
448
  * Prefer Date.now() to get the number of milliseconds since the Unix Epoch
431
449
  *
432
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-date-now.md
450
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-date-now.md
433
451
  */
434
452
  "unicorn/prefer-date-now": "error",
435
453
  /*
436
454
  * Prefer default parameters over reassignment
437
455
  *
438
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-default-parameters.md
456
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-default-parameters.md
439
457
  */
440
458
  "unicorn/prefer-default-parameters": "error",
441
459
  /*
442
460
  * Prefer Node#append() over Node#appendChild()
443
461
  *
444
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-dom-node-append.md
462
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-append.md
445
463
  */
446
464
  "unicorn/prefer-dom-node-append": "error",
447
465
  /*
448
466
  * Prefer using .dataset on DOM elements over .setAttribute(...)
449
467
  *
450
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-dom-node-dataset.md
468
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-dataset.md
451
469
  */
452
470
  "unicorn/prefer-dom-node-dataset": "error",
453
471
  /*
454
472
  * Prefer childNode.remove() over parentNode.removeChild(childNode)
455
473
  *
456
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-dom-node-remove.md
474
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-remove.md
457
475
  */
458
476
  "unicorn/prefer-dom-node-remove": "error",
459
477
  /*
460
478
  * Prefer .textContent over .innerText
461
479
  *
462
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-dom-node-text-content.md
480
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-text-content.md
463
481
  */
464
482
  "unicorn/prefer-dom-node-text-content": "error",
465
483
  /*
@@ -467,55 +485,55 @@ var rules = {
467
485
  *
468
486
  * EventTarget is stupid.
469
487
  *
470
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-event-target.md
488
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-event-target.md
471
489
  */
472
490
  "unicorn/prefer-event-target": "off",
473
491
  /*
474
492
  * Prefer export... from when re-exporting
475
493
  *
476
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-export-from.md
494
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-export-from.md
477
495
  */
478
496
  "unicorn/prefer-export-from": "error",
479
497
  /*
480
498
  * Prefer .includes() over .indexOf() when checking for existence or non-existence
481
499
  *
482
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-includes.md
500
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-includes.md
483
501
  */
484
502
  "unicorn/prefer-includes": "error",
485
503
  /*
486
504
  * Prefer reading a JSON file as a buffer
487
505
  *
488
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-json-parse-buffer.md
506
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-json-parse-buffer.md
489
507
  */
490
508
  "unicorn/prefer-json-parse-buffer": "error",
491
509
  /*
492
510
  * Prefer KeyboardEvent#key over KeyboardEvent#keyCode
493
511
  *
494
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-keyboard-event-key.md
512
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-keyboard-event-key.md
495
513
  */
496
514
  "unicorn/prefer-keyboard-event-key": "error",
497
515
  /*
498
516
  * Prefer using a logical operator over a ternary
499
517
  *
500
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-logical-operator-over-ternary.md
518
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-logical-operator-over-ternary.md
501
519
  */
502
520
  "unicorn/prefer-logical-operator-over-ternary": "error",
503
521
  /*
504
522
  * Enforce the use of Math.trunc instead of bitwise operators. (partly fixable)
505
523
  *
506
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-math-trunc.md
524
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-trunc.md
507
525
  */
508
526
  "unicorn/prefer-math-trunc": "error",
509
527
  /*
510
528
  * Prefer modern DOM APIs
511
529
  *
512
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-modern-dom-apis.md
530
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-dom-apis.md
513
531
  */
514
532
  "unicorn/prefer-modern-dom-apis": "error",
515
533
  /*
516
534
  * Prefer modern Math APIs over legacy patterns
517
535
  *
518
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-modern-math-apis.md
536
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-math-apis.md
519
537
  */
520
538
  "unicorn/prefer-modern-math-apis": "error",
521
539
  /*
@@ -523,19 +541,19 @@ var rules = {
523
541
  *
524
542
  * This is only a problem in node 16 - so it's off for now
525
543
  *
526
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-module.md
544
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-module.md
527
545
  */
528
546
  "unicorn/prefer-module": "off",
529
547
  /*
530
548
  * Prefer using String, Number, BigInt, Boolean, and Symbol directly
531
549
  *
532
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-native-coercion-functions.md
550
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-native-coercion-functions.md
533
551
  */
534
552
  "unicorn/prefer-native-coercion-functions": "error",
535
553
  /*
536
554
  * Prefer negative index over .length - index for {String,Array,TypedArray}#slice() and Array#splice()
537
555
  *
538
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-negative-index.md
556
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-negative-index.md
539
557
  */
540
558
  "unicorn/prefer-negative-index": "error",
541
559
  /*
@@ -543,49 +561,49 @@ var rules = {
543
561
  *
544
562
  * Off for now since this isn't supported in node < 16 in require() and we compile down to require()
545
563
  *
546
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-node-protocol.md
564
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md
547
565
  */
548
566
  "unicorn/prefer-node-protocol": "off",
549
567
  /*
550
568
  * Prefer Number static properties over global ones.
551
569
  *
552
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-number-properties.md
570
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-number-properties.md
553
571
  */
554
572
  "unicorn/prefer-number-properties": "error",
555
573
  /*
556
574
  * Prefer using Object.fromEntries(...) to transform a list of key-value pairs into an object
557
575
  *
558
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-object-from-entries.md
576
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-object-from-entries.md
559
577
  */
560
578
  "unicorn/prefer-object-from-entries": "error",
561
579
  /*
562
580
  * Prefer omitting the catch binding parameter
563
581
  *
564
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-optional-catch-binding.md
582
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-optional-catch-binding.md
565
583
  */
566
584
  "unicorn/prefer-optional-catch-binding": "error",
567
585
  /*
568
586
  * Prefer borrowing methods from the prototype instead of methods from an instance
569
587
  *
570
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-prototype-methods.md
588
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-prototype-methods.md
571
589
  */
572
590
  "unicorn/prefer-prototype-methods": "error",
573
591
  /*
574
592
  * Prefer String#replaceAll() over regex searches with the global flag
575
593
  *
576
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-replace-all.md
594
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-replace-all.md
577
595
  */
578
596
  "unicorn/prefer-query-selector": "error",
579
597
  /*
580
598
  * Prefer querySelector over getElementById, querySelectorAll over getElementsByClassName and getElementsByTagName. (partly fixable)
581
599
  *
582
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-query-selector.md
600
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-query-selector.md
583
601
  */
584
602
  "unicorn/prefer-reflect-apply": "error",
585
603
  /*
586
604
  * Prefer RegExp#test() over String#match() and RegExp#exec()
587
605
  *
588
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-regexp-test.md
606
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-regexp-test.md
589
607
  */
590
608
  "unicorn/prefer-regexp-test": "error",
591
609
  /*
@@ -593,49 +611,69 @@ var rules = {
593
611
  *
594
612
  * It's a bit heavy handed to use this right now.
595
613
  *
596
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-set-has.md
614
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-has.md
597
615
  */
598
616
  "unicorn/prefer-set-has": "off",
599
617
  /*
600
618
  * Prefer using Set#size instead of Array#length
601
619
  *
602
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-set-size.md
620
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-size.md
603
621
  */
604
622
  "unicorn/prefer-set-size": "error",
605
623
  /*
606
624
  * Prefer the spread operator over Array.from(). (fixable)
607
625
  *
608
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-spread.md
626
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-spread.md
609
627
  */
610
628
  "unicorn/prefer-spread": "error",
629
+ /*
630
+ * Prefer using the String.raw tag to avoid escaping \
631
+ *
632
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-raw.md
633
+ */
634
+ "unicorn/prefer-string-raw": "error",
611
635
  /*
612
636
  * Prefer String#replaceAll() over regex searches with the global flag
613
637
  *
614
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-string-replace-all.md
638
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-replace-all.md
615
639
  */
616
640
  "unicorn/prefer-string-replace-all": "error",
617
641
  /*
618
642
  * Prefer String#slice() over String#substr() and String#substring()
619
643
  *
620
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-string-slice.md
644
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-slice.md
621
645
  */
622
646
  "unicorn/prefer-string-slice": "error",
623
647
  /*
624
648
  * Prefer String#startsWith() & String#endsWith() over more complex alternatives
625
649
  *
626
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-string-starts-ends-with.md
650
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-starts-ends-with.md
627
651
  */
628
652
  "unicorn/prefer-string-starts-ends-with": "error",
629
653
  /*
630
654
  * Prefer String#trimStart() / String#trimEnd() over String#trimLeft() / String#trimRight()
631
655
  *
632
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-string-trim-start-end.md
656
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-trim-start-end.md
633
657
  */
634
658
  "unicorn/prefer-string-trim-start-end": "error",
659
+ /*
660
+ * Prefer using structuredClone to create a deep clone
661
+ *
662
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-structured-clone.md
663
+ */
664
+ "unicorn/prefer-structured-clone": [
665
+ "error",
666
+ {
667
+ functions: [
668
+ "cloneDeep",
669
+ "utils.clone"
670
+ ],
671
+ }
672
+ ],
635
673
  /*
636
674
  * Prefer switch over multiple else-if
637
675
  *
638
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-switch.md
676
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-switch.md
639
677
  */
640
678
  "unicorn/prefer-switch": [
641
679
  "error",
@@ -649,7 +687,7 @@ var rules = {
649
687
  *
650
688
  * This often makes very complicated ternaries and it turns out thats annoying
651
689
  *
652
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-ternary.md
690
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-ternary.md
653
691
  */
654
692
  "unicorn/prefer-ternary": "off",
655
693
  /*
@@ -657,22 +695,22 @@ var rules = {
657
695
  *
658
696
  * Off for now because we don't have ESM yet
659
697
  *
660
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-top-level-await.md
698
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-top-level-await.md
661
699
  */
662
700
  "unicorn/prefer-top-level-await": "off",
663
701
  /*
664
702
  * Enforce throwing TypeError in type checking conditions. (fixable)
665
703
  *
666
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-type-error.md
704
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-error.md
667
705
  */
668
706
  "unicorn/prefer-type-error": "error",
669
707
  /*
670
708
  * Prevent abbreviations
671
709
  *
672
710
  * Heres a list of the defaults:
673
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/rules/prevent-abbreviations.js#L13
711
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/rules/prevent-abbreviations.js#L13
674
712
  *
675
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prevent-abbreviations.md
713
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prevent-abbreviations.md
676
714
  */
677
715
  "unicorn/prevent-abbreviations": [
678
716
  "error",
@@ -728,7 +766,7 @@ var rules = {
728
766
  /*
729
767
  * Enforce consistent relative URL style
730
768
  *
731
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/relative-url-style.md
769
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/relative-url-style.md
732
770
  */
733
771
  "unicorn/relative-url-style": [
734
772
  "error",
@@ -737,19 +775,19 @@ var rules = {
737
775
  /*
738
776
  * Enforce using the separator argument with Array#join()
739
777
  *
740
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/require-array-join-separator.md
778
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-array-join-separator.md
741
779
  */
742
780
  "unicorn/require-array-join-separator": "error",
743
781
  /*
744
782
  * Enforce using the digits argument with Number#toFixed()
745
783
  *
746
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/require-number-to-fixed-digits-argument.md
784
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-number-to-fixed-digits-argument.md
747
785
  */
748
786
  "unicorn/require-number-to-fixed-digits-argument": "error",
749
787
  /*
750
788
  * Enforce using the targetOrigin argument with window.postMessage()
751
789
  *
752
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/require-post-message-target-origin.md
790
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-post-message-target-origin.md
753
791
  */
754
792
  "unicorn/require-post-message-target-origin": "error",
755
793
  /*
@@ -759,13 +797,13 @@ var rules = {
759
797
  *
760
798
  * Not using this for now because I can't think of a good use case.
761
799
  *
762
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/string-content.md
800
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/string-content.md
763
801
  */
764
802
  "unicorn/string-content": "off",
765
803
  /*
766
804
  * Enforce consistent brace style for case clauses
767
805
  *
768
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/switch-case-braces.md
806
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md
769
807
  */
770
808
  "unicorn/switch-case-braces": [
771
809
  "error",
@@ -776,19 +814,19 @@ var rules = {
776
814
  *
777
815
  * Leaving this off for now because it might cause chaos.
778
816
  *
779
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/template-indent.md
817
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/template-indent.md
780
818
  */
781
819
  "unicorn/template-indent": "off",
782
820
  /*
783
821
  * Enforce consistent case for text encoding identifiers
784
822
  *
785
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/text-encoding-identifier-case.md
823
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/text-encoding-identifier-case.md
786
824
  */
787
825
  "unicorn/text-encoding-identifier-case": "error",
788
826
  /*
789
827
  * Require new when throwing an error. (fixable)
790
828
  *
791
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/throw-new-error.md
829
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/throw-new-error.md
792
830
  */
793
831
  "unicorn/throw-new-error": "error",
794
832
  };
package/dist/cjs/rules.js CHANGED
@@ -226,9 +226,16 @@ module.exports = {
226
226
  /*
227
227
  * Enforce position of line comments
228
228
  *
229
+ * Handled by @stylistic
230
+ *
229
231
  * https://eslint.org/docs/rules/line-comment-position
230
232
  */
231
- "line-comment-position": "error",
233
+ "line-comment-position": "off",
234
+ /*
235
+ * Require or disallow logical assignment operator shorthand
236
+ *
237
+ * https://eslint.org/docs/rules/logical-assignment-operators
238
+ */
232
239
  "logical-assignment-operators": [
233
240
  "error",
234
241
  "always"
@@ -303,7 +310,7 @@ module.exports = {
303
310
  /*
304
311
  * Enforce a particular style for multiline comments
305
312
  *
306
- * This became very annoying
313
+ * Handled by @stylistic
307
314
  *
308
315
  * https://eslint.org/docs/rules/multiline-comment-style
309
316
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newsteam/eslint-config",
3
- "version": "0.0.242",
3
+ "version": "0.0.243",
4
4
  "description": "Shared config for eslint",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "types": "./dist/cjs/index.d.ts",
@@ -54,7 +54,7 @@
54
54
  "eslint-plugin-you-dont-need-lodash-underscore": "6.14.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@stylistic/eslint-plugin": "2.0.0",
57
+ "@stylistic/eslint-plugin": "2.1.0",
58
58
  "@types/eslint": "8.56.10",
59
59
  "@types/jasmine": "5.1.4",
60
60
  "@types/node": "20.12.11",
@@ -83,17 +83,17 @@
83
83
  "eslint-plugin-react-hooks": "4.6.2",
84
84
  "eslint-plugin-react-native": "4.1.0",
85
85
  "eslint-plugin-react-perf": "3.3.2",
86
- "eslint-plugin-react-refresh": "0.4.6",
86
+ "eslint-plugin-react-refresh": "0.4.7",
87
87
  "eslint-plugin-security": "3.0.0",
88
88
  "eslint-plugin-sort-keys-fix": "1.1.2",
89
89
  "eslint-plugin-typescript-sort-keys": "3.2.0",
90
- "eslint-plugin-unicorn": "52.0.0",
90
+ "eslint-plugin-unicorn": "53.0.0",
91
91
  "jasmine": "5.1.0",
92
92
  "json-schema": "0.4.0",
93
93
  "typescript": "5.4.5"
94
94
  },
95
95
  "peerDependencies": {
96
- "@stylistic/eslint-plugin": "2.0.0",
96
+ "@stylistic/eslint-plugin": "2.1.0",
97
97
  "@typescript-eslint/eslint-plugin": "7.8.0",
98
98
  "@typescript-eslint/parser": "7.8.0",
99
99
  "eslint": "8.57.0",
@@ -117,11 +117,11 @@
117
117
  "eslint-plugin-react-hooks": "4.6.2",
118
118
  "eslint-plugin-react-native": "4.1.0",
119
119
  "eslint-plugin-react-perf": "3.3.2",
120
- "eslint-plugin-react-refresh": "0.4.6",
120
+ "eslint-plugin-react-refresh": "0.4.7",
121
121
  "eslint-plugin-security": "3.0.0",
122
122
  "eslint-plugin-sort-keys-fix": "1.1.2",
123
123
  "eslint-plugin-typescript-sort-keys": "3.2.0",
124
- "eslint-plugin-unicorn": "52.0.0",
124
+ "eslint-plugin-unicorn": "53.0.0",
125
125
  "eslint-plugin-you-dont-need-lodash-underscore": "6.14.0",
126
126
  "json-schema": "0.4.0",
127
127
  "typescript": "5.4.5"