@newsteam/eslint-config 1.2.16 → 1.2.18

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 (150) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +2 -49
  4. package/dist/plugins/sort-react-dependency-arrays.d.ts +3 -2
  5. package/dist/plugins/sort-react-dependency-arrays.d.ts.map +1 -1
  6. package/dist/plugins/sort-react-dependency-arrays.js +95 -18
  7. package/dist/rules/array-function.d.ts +3 -0
  8. package/dist/rules/array-function.d.ts.map +1 -0
  9. package/dist/rules/array-function.js +56 -0
  10. package/dist/rules/css-modules.d.ts +3 -0
  11. package/dist/rules/css-modules.d.ts.map +1 -0
  12. package/dist/rules/css-modules.js +27 -0
  13. package/dist/rules/destructuring.d.ts +3 -0
  14. package/dist/rules/destructuring.d.ts.map +1 -0
  15. package/dist/rules/destructuring.js +39 -0
  16. package/dist/rules/eslint-comments.d.ts +3 -0
  17. package/dist/rules/eslint-comments.d.ts.map +1 -0
  18. package/dist/rules/eslint-comments.js +77 -0
  19. package/dist/rules/import-newlines.d.ts +3 -0
  20. package/dist/rules/import-newlines.d.ts.map +1 -0
  21. package/dist/rules/import-newlines.js +26 -0
  22. package/dist/rules/import-x.d.ts +3 -0
  23. package/dist/rules/import-x.d.ts.map +1 -0
  24. package/dist/rules/import-x.js +420 -0
  25. package/dist/{rules.d.ts → rules/index.d.ts} +1 -1
  26. package/dist/rules/index.d.ts.map +1 -0
  27. package/dist/{rules.js → rules/index.js} +51 -1
  28. package/dist/rules/next.d.ts +3 -0
  29. package/dist/rules/next.d.ts.map +1 -0
  30. package/dist/rules/next.js +140 -0
  31. package/dist/rules/no-unsanitized.d.ts +3 -0
  32. package/dist/rules/no-unsanitized.d.ts.map +1 -0
  33. package/dist/rules/no-unsanitized.js +38 -0
  34. package/dist/rules/no-useless-assign.d.ts +3 -0
  35. package/dist/rules/no-useless-assign.d.ts.map +1 -0
  36. package/dist/rules/no-useless-assign.js +20 -0
  37. package/dist/rules/node.d.ts +3 -0
  38. package/dist/rules/node.d.ts.map +1 -0
  39. package/dist/rules/node.js +305 -0
  40. package/dist/rules/perfectionist.d.ts +3 -0
  41. package/dist/rules/perfectionist.d.ts.map +1 -0
  42. package/dist/rules/perfectionist.js +94 -0
  43. package/dist/rules/promise.d.ts +3 -0
  44. package/dist/rules/promise.d.ts.map +1 -0
  45. package/dist/rules/promise.js +123 -0
  46. package/dist/rules/react-19-upgrade.d.ts +3 -0
  47. package/dist/rules/react-19-upgrade.d.ts.map +1 -0
  48. package/dist/rules/react-19-upgrade.js +20 -0
  49. package/dist/rules/react-compiler.d.ts +3 -0
  50. package/dist/rules/react-compiler.d.ts.map +1 -0
  51. package/dist/{plugins → rules}/react-compiler.js +7 -9
  52. package/dist/rules/react-hooks.d.ts +3 -0
  53. package/dist/rules/react-hooks.d.ts.map +1 -0
  54. package/dist/rules/react-hooks.js +163 -0
  55. package/dist/rules/react-perf.d.ts +3 -0
  56. package/dist/rules/react-perf.d.ts.map +1 -0
  57. package/dist/rules/react-perf.js +47 -0
  58. package/dist/rules/react-refresh.d.ts +3 -0
  59. package/dist/rules/react-refresh.d.ts.map +1 -0
  60. package/dist/rules/react-refresh.js +19 -0
  61. package/dist/rules/react.d.ts +3 -0
  62. package/dist/rules/react.d.ts.map +1 -0
  63. package/dist/rules/react.js +740 -0
  64. package/dist/rules/security.d.ts +3 -0
  65. package/dist/rules/security.d.ts.map +1 -0
  66. package/dist/rules/security.js +112 -0
  67. package/dist/rules/sort-react-dependency-arrays.d.ts +3 -0
  68. package/dist/rules/sort-react-dependency-arrays.d.ts.map +1 -0
  69. package/dist/rules/sort-react-dependency-arrays.js +12 -0
  70. package/dist/rules/stylistic.d.ts +3 -0
  71. package/dist/rules/stylistic.d.ts.map +1 -0
  72. package/dist/rules/stylistic.js +916 -0
  73. package/dist/rules/typescript.d.ts +3 -0
  74. package/dist/rules/typescript.d.ts.map +1 -0
  75. package/dist/{plugins → rules}/typescript.js +1 -1
  76. package/dist/rules/unicorn.d.ts +3 -0
  77. package/dist/rules/unicorn.d.ts.map +1 -0
  78. package/dist/rules/unicorn.js +998 -0
  79. package/dist/test/index.d.ts +2 -0
  80. package/dist/test/index.d.ts.map +1 -0
  81. package/dist/test/index.js +15 -0
  82. package/package.json +11 -13
  83. package/dist/plugins/array-function.d.ts +0 -3
  84. package/dist/plugins/array-function.d.ts.map +0 -1
  85. package/dist/plugins/array-function.js +0 -58
  86. package/dist/plugins/css-modules.d.ts +0 -3
  87. package/dist/plugins/css-modules.d.ts.map +0 -1
  88. package/dist/plugins/css-modules.js +0 -19
  89. package/dist/plugins/destructuring.d.ts +0 -3
  90. package/dist/plugins/destructuring.d.ts.map +0 -1
  91. package/dist/plugins/destructuring.js +0 -41
  92. package/dist/plugins/eslint-comments.d.ts +0 -3
  93. package/dist/plugins/eslint-comments.d.ts.map +0 -1
  94. package/dist/plugins/eslint-comments.js +0 -79
  95. package/dist/plugins/import-newlines.d.ts +0 -3
  96. package/dist/plugins/import-newlines.d.ts.map +0 -1
  97. package/dist/plugins/import-newlines.js +0 -28
  98. package/dist/plugins/import-x.d.ts +0 -3
  99. package/dist/plugins/import-x.d.ts.map +0 -1
  100. package/dist/plugins/import-x.js +0 -418
  101. package/dist/plugins/newline-destructuring.d.ts +0 -3
  102. package/dist/plugins/newline-destructuring.d.ts.map +0 -1
  103. package/dist/plugins/newline-destructuring.js +0 -26
  104. package/dist/plugins/next.d.ts +0 -3
  105. package/dist/plugins/next.d.ts.map +0 -1
  106. package/dist/plugins/next.js +0 -142
  107. package/dist/plugins/no-unsanitized.d.ts +0 -3
  108. package/dist/plugins/no-unsanitized.d.ts.map +0 -1
  109. package/dist/plugins/no-unsanitized.js +0 -40
  110. package/dist/plugins/no-useless-assign.d.ts +0 -3
  111. package/dist/plugins/no-useless-assign.d.ts.map +0 -1
  112. package/dist/plugins/no-useless-assign.js +0 -22
  113. package/dist/plugins/node.d.ts +0 -3
  114. package/dist/plugins/node.d.ts.map +0 -1
  115. package/dist/plugins/node.js +0 -307
  116. package/dist/plugins/perfectionist.d.ts +0 -3
  117. package/dist/plugins/perfectionist.d.ts.map +0 -1
  118. package/dist/plugins/perfectionist.js +0 -96
  119. package/dist/plugins/promise.d.ts +0 -3
  120. package/dist/plugins/promise.d.ts.map +0 -1
  121. package/dist/plugins/promise.js +0 -125
  122. package/dist/plugins/react-19-upgrade.d.ts +0 -3
  123. package/dist/plugins/react-19-upgrade.d.ts.map +0 -1
  124. package/dist/plugins/react-19-upgrade.js +0 -22
  125. package/dist/plugins/react-compiler.d.ts +0 -3
  126. package/dist/plugins/react-compiler.d.ts.map +0 -1
  127. package/dist/plugins/react-hooks.d.ts +0 -3
  128. package/dist/plugins/react-hooks.d.ts.map +0 -1
  129. package/dist/plugins/react-hooks.js +0 -165
  130. package/dist/plugins/react-perf.d.ts +0 -3
  131. package/dist/plugins/react-perf.d.ts.map +0 -1
  132. package/dist/plugins/react-perf.js +0 -49
  133. package/dist/plugins/react-refresh.d.ts +0 -3
  134. package/dist/plugins/react-refresh.d.ts.map +0 -1
  135. package/dist/plugins/react-refresh.js +0 -21
  136. package/dist/plugins/react.d.ts +0 -3
  137. package/dist/plugins/react.d.ts.map +0 -1
  138. package/dist/plugins/react.js +0 -738
  139. package/dist/plugins/security.d.ts +0 -3
  140. package/dist/plugins/security.d.ts.map +0 -1
  141. package/dist/plugins/security.js +0 -114
  142. package/dist/plugins/stylistic.d.ts +0 -3
  143. package/dist/plugins/stylistic.d.ts.map +0 -1
  144. package/dist/plugins/stylistic.js +0 -918
  145. package/dist/plugins/typescript.d.ts +0 -3
  146. package/dist/plugins/typescript.d.ts.map +0 -1
  147. package/dist/plugins/unicorn.d.ts +0 -3
  148. package/dist/plugins/unicorn.d.ts.map +0 -1
  149. package/dist/plugins/unicorn.js +0 -1000
  150. package/dist/rules.d.ts.map +0 -1
@@ -1,1000 +0,0 @@
1
- /*
2
-
3
- eslint
4
-
5
- max-lines: "off",
6
-
7
- --
8
-
9
- not really an issue in a file like this, it's just a big list
10
-
11
- */
12
- import eslintPluginUnicorn from "eslint-plugin-unicorn";
13
- /*
14
- * Various awesome ESLint rules
15
- *
16
- * https://github.com/sindresorhus/eslint-plugin-unicorn
17
- */
18
- export const unicornPlugin = [
19
- {
20
- plugins: {
21
- unicorn: eslintPluginUnicorn,
22
- },
23
- rules: {
24
- /*
25
- * Enforce the use of regex shorthands to improve readability. (fixable)
26
- *
27
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/better-regex.md
28
- */
29
- "unicorn/better-regex": "warn",
30
- /*
31
- * Enforce a specific parameter name in catch clauses.
32
- *
33
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/catch-error-name.md
34
- */
35
- "unicorn/catch-error-name": [
36
- "warn",
37
- {
38
- name: "warn",
39
- },
40
- ],
41
- /*
42
- * Enforce consistent assertion style with node:assert
43
- *
44
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-assert.md
45
- */
46
- "unicorn/consistent-assert": "warn",
47
- /*
48
- * Prefer passing Date directly to the constructor when cloning
49
- *
50
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-date-clone.md
51
- */
52
- "unicorn/consistent-date-clone": "warn",
53
- /*
54
- * Use destructured variables over properties
55
- *
56
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-destructuring.md
57
- */
58
- "unicorn/consistent-destructuring": "warn",
59
- /*
60
- * Prefer consistent types when spreading a ternary in an array literal
61
- *
62
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-empty-array-spread.md
63
- */
64
- "unicorn/consistent-empty-array-spread": "warn",
65
- /*
66
- * Enforce consistent style for element existence checks with indexOf(), lastIndexOf(), findIndex(), and findLastIndex()
67
- *
68
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-existence-index-check.md
69
- */
70
- "unicorn/consistent-existence-index-check": "warn",
71
- /*
72
- * Move function definitions to the highest possible scope.
73
- *
74
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-function-scoping.md
75
- */
76
- "unicorn/consistent-function-scoping": "warn",
77
- /*
78
- * Enforce correct Error subclassing. (fixable)
79
- *
80
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/custom-error-definition.md
81
- */
82
- "unicorn/custom-error-definition": "warn",
83
- /*
84
- * Enforce no spaces between braces. (fixable)
85
- *
86
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/empty-brace-spaces.md
87
- */
88
- "unicorn/empty-brace-spaces": "warn",
89
- /*
90
- * Enforce passing a message value when throwing a built-in error.
91
- *
92
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/error-message.md
93
- */
94
- "unicorn/error-message": "warn",
95
- /*
96
- * Require escape sequences to use uppercase values. (fixable)
97
- *
98
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/escape-case.md
99
- */
100
- "unicorn/escape-case": "warn",
101
- /*
102
- * Add expiration conditions to TODO comments
103
- *
104
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/expiring-todo-comments.md
105
- */
106
- "unicorn/expiring-todo-comments": "off",
107
- /*
108
- * Enforce explicitly comparing the length property of a value. (partly fixable)
109
- *
110
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/explicit-length-check.md
111
- */
112
- "unicorn/explicit-length-check": "warn",
113
- /*
114
- * Enforce a case style for filenames.
115
- *
116
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md
117
- */
118
- "unicorn/filename-case": [
119
- "warn",
120
- {
121
- case: "kebabCase",
122
- },
123
- ],
124
- /*
125
- * Enforce specific import styles per module
126
- *
127
- * Off for now...
128
- *
129
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/import-style.md
130
- */
131
- "unicorn/import-style": "off",
132
- /*
133
- * Prevent usage of variables from outside the scope of isolated functions
134
- *
135
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/isolated-functions.md
136
- */
137
- "unicorn/isolated-functions": "warn",
138
- /*
139
- * Enforce the use of new for all builtins, except String, Number and Boolean. (fixable)
140
- *
141
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/new-for-builtins.md
142
- */
143
- "unicorn/new-for-builtins": "warn",
144
- /*
145
- * Enforce specifying rules to disable in eslint-disable comments.
146
- *
147
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-abusive-eslint-disable.md
148
- */
149
- "unicorn/no-abusive-eslint-disable": "warn",
150
- /*
151
- * Disallow recursive access to this within getters and setters
152
- *
153
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-accessor-recursion.md
154
- */
155
- "unicorn/no-accessor-recursion": "warn",
156
- /*
157
- * Disallow anonymous functions and classes as the default export
158
- *
159
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-anonymous-default-export.md
160
- */
161
- "unicorn/no-anonymous-default-export": "warn",
162
- /*
163
- * Prevent passing a function reference directly to iterator methods
164
- *
165
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-callback-reference.md
166
- */
167
- "unicorn/no-array-callback-reference": "warn",
168
- /*
169
- * Prefer for...of over Array#forEach(...)
170
- *
171
- * We're turning this off because forEach is really convienient to use
172
- * with nodeLists, which can't be processed as arrays
173
- *
174
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-for-each.md
175
- */
176
- "unicorn/no-array-for-each": "off",
177
- /*
178
- * Disallow using the this argument in array methods
179
- *
180
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-method-this-argument.md
181
- */
182
- "unicorn/no-array-method-this-argument": "warn",
183
- /*
184
- * Disallow Array#reduce() and Array#reduceRight()
185
- *
186
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-reduce.md
187
- */
188
- "unicorn/no-array-reduce": "warn",
189
- /*
190
- * Prefer Array#toReversed() over Array#reverse()
191
- *
192
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-reverse.md
193
- */
194
- "unicorn/no-array-reverse": "warn",
195
- /*
196
- * Prefer using Array#toSorted() over Array#sort().
197
- *
198
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-sort.md
199
- */
200
- "unicorn/no-array-sort": "warn",
201
- /*
202
- * Forbid member access from await expression
203
- *
204
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-expression-member.md
205
- */
206
- "unicorn/no-await-expression-member": "warn",
207
- /*
208
- * Disallow member access from await expression
209
- *
210
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-in-promise-methods.md
211
- */
212
- "unicorn/no-await-in-promise-methods": "warn",
213
- /*
214
- * Do not use leading/trailing space between console.log parameters. (fixable)
215
- *
216
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-console-spaces.md
217
- */
218
- "unicorn/no-console-spaces": "warn",
219
- /*
220
- * Do not use document.cookie directly
221
- *
222
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-document-cookie.md
223
- */
224
- "unicorn/no-document-cookie": "warn",
225
- /*
226
- * Disallow empty files
227
- *
228
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-empty-file.md
229
- */
230
- "unicorn/no-empty-file": "warn",
231
- /*
232
- * Do not use a for loop that can be replaced with a for-of loop
233
- *
234
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-for-loop.md
235
- */
236
- "unicorn/no-for-loop": "warn",
237
- /*
238
- * Enforce the use of unicode escapes instead of hexadecimal escapes. (fixable)
239
- *
240
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-hex-escape.md
241
- */
242
- "unicorn/no-hex-escape": "warn",
243
- /*
244
- * Disallow immediate mutation after variable assignment
245
- *
246
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-immediate-mutation.md
247
- */
248
- "unicorn/no-immediate-mutation": "warn",
249
- /*
250
- * Require Array.isArray() instead of instanceof Array
251
- *
252
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-instanceof-array.md
253
- */
254
- "unicorn/no-instanceof-builtins": [
255
- "warn",
256
- {
257
- strategy: "loose",
258
- },
259
- ],
260
- /*
261
- * Disallow invalid options in fetch() and new Request()
262
- *
263
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-fetch-options.md
264
- */
265
- "unicorn/no-invalid-fetch-options": "warn",
266
- /*
267
- * Prevent calling EventTarget#removeEventListener() with the result of an expression
268
- *
269
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-remove-event-listener.md
270
- */
271
- "unicorn/no-invalid-remove-event-listener": "warn",
272
- /*
273
- * Disallow identifiers starting with new or class
274
- *
275
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-keyword-prefix.md
276
- */
277
- "unicorn/no-keyword-prefix": "off",
278
- /*
279
- * Disallow if statements as the only statement in if blocks without else
280
- *
281
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-lonely-if.md
282
- */
283
- "unicorn/no-lonely-if": "warn",
284
- /*
285
- * Disallow a magic number as the depth argument in Array#flat(…).
286
- *
287
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-magic-array-flat-depth.md
288
- */
289
- "unicorn/no-magic-array-flat-depth": "warn",
290
- /*
291
- * Disallow named usage of default import and export
292
- *
293
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-named-default.md
294
- */
295
- "unicorn/no-named-default": "warn",
296
- /*
297
- * Disallow negated conditions
298
- *
299
- * This is an improved version of the no-negated-condition ESLint rule that makes it automatically fixable.
300
- *
301
- * Turning off no-negated-condition because this overrides it
302
- *
303
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negated-condition.md
304
- */
305
- "unicorn/no-negated-condition": "warn",
306
- /*
307
- * Disallow negated expression in equality check
308
- *
309
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negation-in-equality-check.md
310
- */
311
- "unicorn/no-negation-in-equality-check": "warn",
312
- /*
313
- * Disallow nested ternary expressions. (partly fixable)
314
- *
315
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-nested-ternary.md
316
- */
317
- "unicorn/no-nested-ternary": "warn",
318
- /*
319
- * Disallow new Array()
320
- *
321
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-array.md
322
- */
323
- "unicorn/no-new-array": "warn",
324
- /*
325
- * Enforce the use of Buffer.from() and Buffer.alloc() instead of the deprecated new Buffer(). (fixable)
326
- *
327
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-buffer.md
328
- */
329
- "unicorn/no-new-buffer": "warn",
330
- /*
331
- * Disallow the use of the null literal, to encourage using undefined instead.
332
- *
333
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-null.md
334
- */
335
- "unicorn/no-null": "warn",
336
- /*
337
- * Disallow the use of objects as default parameters
338
- *
339
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-object-as-default-parameter.md
340
- */
341
- "unicorn/no-object-as-default-parameter": "warn",
342
- /*
343
- * Disallow process.exit().
344
- *
345
- * Handled by 'node/no-process-exit'
346
- *
347
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-process-exit.md
348
- */
349
- "unicorn/no-process-exit": "off",
350
- /*
351
- * Disallow passing single-element arrays to Promise methods
352
- *
353
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-single-promise-in-promise-methods.md
354
- */
355
- "unicorn/no-single-promise-in-promise-methods": "warn",
356
- /*
357
- * Forbid classes that only have static members
358
- *
359
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-static-only-class.md
360
- */
361
- "unicorn/no-static-only-class": "warn",
362
- /*
363
- * Disallow then property
364
- *
365
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-thenable.md
366
- */
367
- "unicorn/no-thenable": "warn",
368
- /*
369
- * Disallow assigning this to a variable
370
- *
371
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-this-assignment.md
372
- */
373
- "unicorn/no-this-assignment": "warn",
374
- /*
375
- * Disallow comparing undefined using typeof
376
- *
377
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-typeof-undefined.md
378
- */
379
- "unicorn/no-typeof-undefined": "warn",
380
- /*
381
- * Disallow using 1 as the depth argument of Array#flat()
382
- *
383
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-array-flat-depth.md
384
- */
385
- "unicorn/no-unnecessary-array-flat-depth": "warn",
386
- /*
387
- * Disallow using .length or Infinity as the deleteCount or skipCount argument of Array#{splice,toSpliced}()
388
- *
389
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-array-splice-count.md
390
- */
391
- "unicorn/no-unnecessary-array-splice-count": "warn",
392
- /*
393
- * Disallow awaiting non-promise values
394
- *
395
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-await.md
396
- */
397
- "unicorn/no-unnecessary-await": "warn",
398
- /*
399
- * Enforce the use of built-in methods instead of unnecessary polyfills
400
- *
401
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-polyfills.md
402
- */
403
- "unicorn/no-unnecessary-polyfills": "warn",
404
- /*
405
- * Disallow using .length or Infinity as the end argument of {Array,String,TypedArray}#slice()
406
- *
407
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-slice-end.md
408
- */
409
- "unicorn/no-unnecessary-slice-end": "warn",
410
- /*
411
- * Disallow unreadable array destructuring.
412
- *
413
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-array-destructuring.md
414
- */
415
- "unicorn/no-unreadable-array-destructuring": "warn",
416
- /*
417
- * Disallow unreadable IIFEs
418
- *
419
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-iife.md
420
- */
421
- "unicorn/no-unreadable-iife": "warn",
422
- /*
423
- * Disallow unused object properties.
424
- *
425
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unused-properties.md
426
- */
427
- "unicorn/no-unused-properties": "warn",
428
- /*
429
- * Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
430
- *
431
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-collection-argument.md
432
- */
433
- "unicorn/no-useless-collection-argument": "warn",
434
- /*
435
- * Disallow unnecessary Error.captureStackTrace(…)
436
- *
437
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-error-capture-stack-trace.md
438
- */
439
- "unicorn/no-useless-error-capture-stack-trace": "warn",
440
- /*
441
- * Forbid useless fallback when spreading in object literals
442
- *
443
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-fallback-in-spread.md
444
- */
445
- "unicorn/no-useless-fallback-in-spread": "warn",
446
- /*
447
- * Disallow useless array length check
448
- *
449
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-length-check.md
450
- */
451
- "unicorn/no-useless-length-check": "warn",
452
- /*
453
- * Disallow returning/yielding Promise.resolve/reject() in async functions or promise callbacks
454
- *
455
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-promise-resolve-reject.md
456
- */
457
- "unicorn/no-useless-promise-resolve-reject": "warn",
458
- /*
459
- * Disallow useless spread
460
- *
461
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-spread.md
462
- */
463
- "unicorn/no-useless-spread": "warn",
464
- /*
465
- * Disallow useless case in switch statements
466
- *
467
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-switch-case.md
468
- */
469
- "unicorn/no-useless-switch-case": "warn",
470
- /*
471
- * Disallow useless undefined
472
- *
473
- * This conflicts with @typescript-eslint/init-declarations
474
- *
475
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-undefined.md
476
- */
477
- "unicorn/no-useless-undefined": "off",
478
- /*
479
- * Disallow number literals with zero fractions or dangling dots
480
- *
481
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-zero-fractions.md
482
- */
483
- "unicorn/no-zero-fractions": "warn",
484
- /*
485
- * Enforce lowercase identifier and uppercase value for number literals. (fixable)
486
- *
487
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/number-literal-case.md
488
- */
489
- "unicorn/number-literal-case": "warn",
490
- /*
491
- * Enforce the style of numeric separators by correctly grouping digits
492
- *
493
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/numeric-separators-style.md
494
- */
495
- "unicorn/numeric-separators-style": "warn",
496
- /*
497
- * Prefer addEventListener over on-functions. (fixable)
498
- *
499
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-add-event-listener.md
500
- */
501
- "unicorn/prefer-add-event-listener": "warn",
502
- /*
503
- * Prefer .find(...) over the first element from .filter(...)
504
- *
505
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-find.md
506
- */
507
- "unicorn/prefer-array-find": "warn",
508
- /*
509
- * Prefer Array#flat() over legacy techniques to flatten arrays
510
- *
511
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat.md
512
- */
513
- "unicorn/prefer-array-flat": "warn",
514
- /*
515
- * Prefer .flatMap(...) over .map(...).flat()
516
- *
517
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat-map.md
518
- */
519
- "unicorn/prefer-array-flat-map": "warn",
520
- /*
521
- * Prefer Array#indexOf() over Array#findIndex() when looking for the index of an item
522
- *
523
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-index-of.md
524
- */
525
- "unicorn/prefer-array-index-of": "warn",
526
- /*
527
- * Prefer .some(...) over .find(...).
528
- *
529
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-some.md
530
- */
531
- "unicorn/prefer-array-some": "warn",
532
- /*
533
- * Prefer .at() method for index access and String#charAt()
534
- *
535
- * This breaks typescript array typings at the moment
536
- *
537
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-at.md
538
- */
539
- "unicorn/prefer-at": "off",
540
- /*
541
- * Prefer BigInt literals over the constructor
542
- *
543
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-bigint-literals.md
544
- */
545
- "unicorn/prefer-bigint-literals": "warn",
546
- /*
547
- * Prefer .at() method for index access and String#charAt()
548
- *
549
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-blob-reading-methods.md
550
- */
551
- "unicorn/prefer-blob-reading-methods": "warn",
552
- /*
553
- * Prefer class field declarations over this assignments in constructors
554
- *
555
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-class-fields.md
556
- */
557
- "unicorn/prefer-class-fields": "warn",
558
- /*
559
- * Prefer using Element#classList.toggle() to toggle class names
560
- *
561
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-classlist-toggle.md
562
- */
563
- "unicorn/prefer-classlist-toggle": "warn",
564
- /*
565
- * Prefer String#codePointAt(...) over String#charCodeAt(...) and String.fromCodePoint(...) over String.fromCharCode(...)
566
- *
567
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-code-point.md
568
- */
569
- "unicorn/prefer-code-point": "warn",
570
- /*
571
- * Prefer Date.now() to get the number of milliseconds since the Unix Epoch
572
- *
573
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-date-now.md
574
- */
575
- "unicorn/prefer-date-now": "warn",
576
- /*
577
- * Prefer default parameters over reassignment
578
- *
579
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-default-parameters.md
580
- */
581
- "unicorn/prefer-default-parameters": "warn",
582
- /*
583
- * Prefer Node#append() over Node#appendChild()
584
- *
585
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-append.md
586
- */
587
- "unicorn/prefer-dom-node-append": "warn",
588
- /*
589
- * Prefer using .dataset on DOM elements over .setAttribute(...)
590
- *
591
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-dataset.md
592
- */
593
- "unicorn/prefer-dom-node-dataset": "warn",
594
- /*
595
- * Prefer childNode.remove() over parentNode.removeChild(childNode)
596
- *
597
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-remove.md
598
- */
599
- "unicorn/prefer-dom-node-remove": "warn",
600
- /*
601
- * Prefer .textContent over .innerText
602
- *
603
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-text-content.md
604
- */
605
- "unicorn/prefer-dom-node-text-content": "warn",
606
- /*
607
- * While EventEmitter is only available in Node.js, EventTarget is also available in Deno and browsers.
608
- *
609
- * EventTarget is stupid.
610
- *
611
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-event-target.md
612
- */
613
- "unicorn/prefer-event-target": "off",
614
- /*
615
- * Prefer export... from when re-exporting
616
- *
617
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-export-from.md
618
- */
619
- "unicorn/prefer-export-from": "warn",
620
- /*
621
- * Prefer `globalThis` over `window`, `self`, and `global`.
622
- *
623
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-global-this.md
624
- */
625
- "unicorn/prefer-global-this": "warn",
626
- /*
627
- * Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths
628
- *
629
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-import-meta-properties.md
630
- */
631
- "unicorn/prefer-import-meta-properties": "warn",
632
- /*
633
- * Prefer .includes() over .indexOf() when checking for existence or non-existence
634
- *
635
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-includes.md
636
- */
637
- "unicorn/prefer-includes": "warn",
638
- /*
639
- * Prefer reading a JSON file as a buffer
640
- *
641
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-json-parse-buffer.md
642
- */
643
- "unicorn/prefer-json-parse-buffer": "warn",
644
- /*
645
- * Prefer KeyboardEvent#key over KeyboardEvent#keyCode
646
- *
647
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-keyboard-event-key.md
648
- */
649
- "unicorn/prefer-keyboard-event-key": "warn",
650
- /*
651
- * Prefer using a logical operator over a ternary
652
- *
653
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-logical-operator-over-ternary.md
654
- */
655
- "unicorn/prefer-logical-operator-over-ternary": "warn",
656
- /*
657
- * Prefer Math.min() and Math.max() over ternaries for simple comparisons
658
- *
659
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-min-max.md
660
- */
661
- "unicorn/prefer-math-min-max": "warn",
662
- /*
663
- * Enforce the use of Math.trunc instead of bitwise operators. (partly fixable)
664
- *
665
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-trunc.md
666
- */
667
- "unicorn/prefer-math-trunc": "warn",
668
- /*
669
- * Prefer modern DOM APIs
670
- *
671
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-dom-apis.md
672
- */
673
- "unicorn/prefer-modern-dom-apis": "warn",
674
- /*
675
- * Prefer modern Math APIs over legacy patterns
676
- *
677
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-math-apis.md
678
- */
679
- "unicorn/prefer-modern-math-apis": "warn",
680
- /*
681
- * Prefer JavaScript modules (ESM) over CommonJS
682
- *
683
- * This is only a problem in node 16 - so it's off for now
684
- *
685
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-module.md
686
- */
687
- "unicorn/prefer-module": "off",
688
- /*
689
- * Prefer using String, Number, BigInt, Boolean, and Symbol directly
690
- *
691
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-native-coercion-functions.md
692
- */
693
- "unicorn/prefer-native-coercion-functions": "warn",
694
- /*
695
- * Prefer negative index over .length - index for {String,Array,TypedArray}#slice() and Array#splice()
696
- *
697
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-negative-index.md
698
- */
699
- "unicorn/prefer-negative-index": "warn",
700
- /*
701
- * Prefer using the node: protocol when importing Node.js builtin modules
702
- *
703
- * Off for now since this isn't supported in node < 16 in require() and we compile down to require()
704
- *
705
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md
706
- */
707
- "unicorn/prefer-node-protocol": "off",
708
- /*
709
- * Prefer Number static properties over global ones.
710
- *
711
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-number-properties.md
712
- */
713
- "unicorn/prefer-number-properties": "warn",
714
- /*
715
- * Prefer using Object.fromEntries(...) to transform a list of key-value pairs into an object
716
- *
717
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-object-from-entries.md
718
- */
719
- "unicorn/prefer-object-from-entries": "warn",
720
- /*
721
- * Prefer omitting the catch binding parameter
722
- *
723
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-optional-catch-binding.md
724
- */
725
- "unicorn/prefer-optional-catch-binding": "warn",
726
- /*
727
- * Prefer borrowing methods from the prototype instead of methods from an instance
728
- *
729
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-prototype-methods.md
730
- */
731
- "unicorn/prefer-prototype-methods": "warn",
732
- /*
733
- * Prefer String#replaceAll() over regex searches with the global flag
734
- *
735
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-replace-all.md
736
- */
737
- "unicorn/prefer-query-selector": "warn",
738
- /*
739
- * Prefer querySelector over getElementById, querySelectorAll over getElementsByClassName and getElementsByTagName. (partly fixable)
740
- *
741
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-query-selector.md
742
- */
743
- "unicorn/prefer-reflect-apply": "warn",
744
- /*
745
- * Prefer RegExp#test() over String#match() and RegExp#exec()
746
- *
747
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-regexp-test.md
748
- */
749
- "unicorn/prefer-regexp-test": "warn",
750
- /*
751
- * Prefer Response.json() over new Response(JSON.stringify())
752
- *
753
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-response-static-json.md
754
- */
755
- "unicorn/prefer-response-static-json": "warn",
756
- /*
757
- * Prefer Set#has() over Array#includes() when checking for existence or non-existenc (fixable)
758
- *
759
- * It's a bit heavy handed to use this right now.
760
- *
761
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-has.md
762
- */
763
- "unicorn/prefer-set-has": "off",
764
- /*
765
- * Prefer using Set#size instead of Array#length
766
- *
767
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-size.md
768
- */
769
- "unicorn/prefer-set-size": "warn",
770
- /*
771
- * Prefer using Set#size instead of Array#length
772
- *
773
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-single-call.md
774
- */
775
- "unicorn/prefer-single-call": "warn",
776
- /*
777
- * Prefer the spread operator over Array.from(). (fixable)
778
- *
779
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-spread.md
780
- */
781
- "unicorn/prefer-spread": "warn",
782
- /*
783
- * Prefer using the String.raw tag to avoid escaping \
784
- *
785
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-raw.md
786
- */
787
- "unicorn/prefer-string-raw": "warn",
788
- /*
789
- * Prefer String#replaceAll() over regex searches with the global flag
790
- *
791
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-replace-all.md
792
- */
793
- "unicorn/prefer-string-replace-all": "warn",
794
- /*
795
- * Prefer String#slice() over String#substr() and String#substring()
796
- *
797
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-slice.md
798
- */
799
- "unicorn/prefer-string-slice": "warn",
800
- /*
801
- * Prefer String#startsWith() & String#endsWith() over more complex alternatives
802
- *
803
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-starts-ends-with.md
804
- */
805
- "unicorn/prefer-string-starts-ends-with": "warn",
806
- /*
807
- * Prefer String#trimStart() / String#trimEnd() over String#trimLeft() / String#trimRight()
808
- *
809
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-trim-start-end.md
810
- */
811
- "unicorn/prefer-string-trim-start-end": "warn",
812
- /*
813
- * Prefer using structuredClone to create a deep clone
814
- *
815
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-structured-clone.md
816
- */
817
- "unicorn/prefer-structured-clone": [
818
- "warn",
819
- {
820
- functions: [
821
- "cloneDeep",
822
- "utils.clone",
823
- ],
824
- },
825
- ],
826
- /*
827
- * Prefer switch over multiple else-if
828
- *
829
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-switch.md
830
- */
831
- "unicorn/prefer-switch": [
832
- "warn",
833
- {
834
- emptyDefaultCase: "do-nothing-comment",
835
- minimumCases: 3,
836
- },
837
- ],
838
- /*
839
- * Prefer ternary expressions over simple if-else statements
840
- *
841
- * This often makes very complicated ternaries and it turns out thats annoying
842
- *
843
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-ternary.md
844
- */
845
- "unicorn/prefer-ternary": "off",
846
- /*
847
- * Prefer top-level await over top-level promises and async function calls
848
- *
849
- * Off for now because we don't have ESM yet
850
- *
851
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-top-level-await.md
852
- */
853
- "unicorn/prefer-top-level-await": "off",
854
- /*
855
- * Enforce throwing TypeError in type checking conditions. (fixable)
856
- *
857
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-error.md
858
- */
859
- "unicorn/prefer-type-error": "warn",
860
- /*
861
- * Prevent abbreviations
862
- *
863
- * Heres a list of the defaults:
864
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/rules/prevent-abbreviations.js#L13
865
- *
866
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prevent-abbreviations.md
867
- */
868
- "unicorn/prevent-abbreviations": [
869
- "warn",
870
- {
871
- /*
872
- * We disable this because of how often Objects are used to interface
873
- * with third party code, and we don't want to eslint-ignore all of that.
874
- */
875
- checkProperties: false,
876
- ignore: [
877
- /^arg*/ui,
878
- /^utils*/ui,
879
- ],
880
- replacements: {
881
- args: {
882
- // This is a reserved keyword in some cases - don't replace into this
883
- arguments: false,
884
- },
885
- dev: {
886
- // Term isn't overloaded - allow abbreviation
887
- development: false,
888
- },
889
- doc: {
890
- // Term isn't overloaded - allow abbreviation
891
- document: false,
892
- },
893
- docs: {
894
- // Term isn't overloaded - allow abbreviation
895
- documents: false,
896
- },
897
- env: {
898
- // Term isn't overloaded - allow abbreviation
899
- environment: false,
900
- },
901
- envs: {
902
- // Term isn't overloaded - allow abbreviation
903
- environments: false,
904
- },
905
- param: {
906
- // This is used extremely frequently in react-router-dom and we don't want to change it
907
- parameter: false,
908
- },
909
- params: {
910
- // This is used extremely frequently in react-router-dom and we don't want to change it
911
- parameters: false,
912
- },
913
- props: {
914
- // This is used extremely frequently in react and we don't want to change it
915
- properties: false,
916
- },
917
- },
918
- },
919
- ],
920
- /*
921
- * Enforce consistent relative URL style
922
- *
923
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/relative-url-style.md
924
- */
925
- "unicorn/relative-url-style": [
926
- "warn",
927
- "always",
928
- ],
929
- /*
930
- * Enforce using the separator argument with Array#join()
931
- *
932
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-array-join-separator.md
933
- */
934
- "unicorn/require-array-join-separator": "warn",
935
- /*
936
- * Require non-empty module attributes for imports and exports
937
- *
938
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-module-attributes.md
939
- */
940
- "unicorn/require-module-attributes": "warn",
941
- /*
942
- * Require non-empty specifier list in import and export statements
943
- *
944
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-module-specifiers.md
945
- */
946
- "unicorn/require-module-specifiers": "warn",
947
- /*
948
- * Enforce using the digits argument with Number#toFixed()
949
- *
950
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-number-to-fixed-digits-argument.md
951
- */
952
- "unicorn/require-number-to-fixed-digits-argument": "warn",
953
- /*
954
- * Enforce using the targetOrigin argument with window.postMessage()
955
- *
956
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-post-message-target-origin.md
957
- */
958
- "unicorn/require-post-message-target-origin": "warn",
959
- /*
960
- * Enforce certain things about the contents of strings. For example, you
961
- * can enforce using ’ instead of ' to avoid escaping. Or you could block
962
- * some words. The possibilities are endless.
963
- *
964
- * Not using this for now because I can't think of a good use case.
965
- *
966
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/string-content.md
967
- */
968
- "unicorn/string-content": "off",
969
- /*
970
- * Enforce consistent brace style for case clauses
971
- *
972
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md
973
- */
974
- "unicorn/switch-case-braces": [
975
- "warn",
976
- "always",
977
- ],
978
- /*
979
- * Fix whitespace-insensitive template indentation
980
- *
981
- * Leaving this off for now because it might cause chaos.
982
- *
983
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/template-indent.md
984
- */
985
- "unicorn/template-indent": "off",
986
- /*
987
- * Enforce consistent case for text encoding identifiers
988
- *
989
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/text-encoding-identifier-case.md
990
- */
991
- "unicorn/text-encoding-identifier-case": "warn",
992
- /*
993
- * Require new when throwing an error. (fixable)
994
- *
995
- * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/throw-new-error.md
996
- */
997
- "unicorn/throw-new-error": "warn",
998
- },
999
- },
1000
- ];