@newsteam/eslint-config 1.2.15 → 1.2.17

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