@pob/eslint-config 67.14.0 → 68.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/lib/_base.js +21 -31
  2. package/lib/eslint-rules.test.js +1 -3
  3. package/lib/index.js +77 -343
  4. package/lib/index.test.js +76 -40
  5. package/lib/node.js +60 -0
  6. package/lib/overrides/dev-only.js +10 -0
  7. package/lib/overrides/scripts.js +1 -1
  8. package/lib/overrides/test.js +7 -45
  9. package/lib/overrides/tools-project.js +4 -10
  10. package/lib/oxlint-js-plugins-rules.test.js +62 -0
  11. package/lib/oxlint-rules.test.js +2 -4
  12. package/lib/oxlint.test.js +58 -46
  13. package/lib/plugins/import.js +69 -0
  14. package/lib/typescript.js +27 -0
  15. package/oxlint/base.json +4 -0
  16. package/oxlint/commonjs.json +17 -0
  17. package/oxlint/module.json +5 -1
  18. package/oxlint/node.json +5 -1
  19. package/package.json +10 -15
  20. package/lib/base/commonjs.js +0 -12
  21. package/lib/base/module.js +0 -29
  22. package/lib/node/_base.js +0 -35
  23. package/lib/node/commonjs.js +0 -25
  24. package/lib/node/module.js +0 -35
  25. package/lib/node/typescript.js +0 -15
  26. package/lib/overrides/allow-implicit-return-type.js +0 -7
  27. package/lib/overrides/allow-unsafe-as-warn.js +0 -10
  28. package/lib/overrides/allow-unsafe.js +0 -10
  29. package/lib/overrides/app.js +0 -8
  30. package/lib/plugins/import/import-base.js +0 -136
  31. package/lib/plugins/import/import-commonjs.js +0 -7
  32. package/lib/plugins/import/import-module.js +0 -7
  33. package/lib/plugins/node.js +0 -17
  34. package/lib/plugins/regexp.js +0 -12
  35. package/lib/plugins/typescript-eslint/typescript-eslint-replace-eslint.js +0 -126
  36. package/lib/plugins/typescript-eslint/typescript-eslint-replace-unicorn.js +0 -13
  37. package/lib/plugins/typescript-eslint/typescript-eslint-rules.js +0 -213
  38. package/lib/plugins/unicorn.js +0 -392
  39. package/lib/rules/best-practices.js +0 -470
  40. package/lib/rules/code-quality.js +0 -10
  41. package/lib/rules/dev-only.js +0 -15
  42. package/lib/rules/errors.js +0 -128
  43. package/lib/rules/node.js +0 -26
  44. package/lib/rules/style.js +0 -26
  45. package/lib/rules/typescript.js +0 -61
  46. package/lib/utils/oxlint.js +0 -136
  47. package/lib/utils/oxlint.test.js +0 -197
@@ -1,213 +0,0 @@
1
- import { enableIfVSCode } from "@pob/eslint-config/utils";
2
-
3
- export default {
4
- name: "@pob/eslint-config/typescript-eslint/rules",
5
-
6
- rules: {
7
- // https://typescript-eslint.io/rules/adjacent-overload-signatures/
8
- "@typescript-eslint/adjacent-overload-signatures": "error",
9
-
10
- // https://typescript-eslint.io/rules/array-type/
11
- "@typescript-eslint/array-type": "error",
12
-
13
- // https://typescript-eslint.io/rules/ban-tslint-comment/
14
- "@typescript-eslint/ban-tslint-comment": "error",
15
-
16
- // https://typescript-eslint.io/rules/class-literal-property-style/
17
- "@typescript-eslint/class-literal-property-style": "error",
18
-
19
- // https://typescript-eslint.io/rules/consistent-generic-constructors/
20
- "@typescript-eslint/consistent-generic-constructors": "error",
21
-
22
- // https://typescript-eslint.io/rules/consistent-indexed-object-style/
23
- "@typescript-eslint/consistent-indexed-object-style": "error",
24
-
25
- // https://typescript-eslint.io/rules/consistent-type-assertions/
26
- "@typescript-eslint/consistent-type-assertions": [
27
- "error",
28
- {
29
- assertionStyle: "as",
30
- objectLiteralTypeAssertions: "allow-as-parameter",
31
- },
32
- ],
33
-
34
- // https://typescript-eslint.io/rules/consistent-type-definitions/
35
- "@typescript-eslint/consistent-type-definitions": "error",
36
-
37
- // https://typescript-eslint.io/rules/consistent-type-exports/
38
- "@typescript-eslint/consistent-type-exports": "error",
39
-
40
- // https://typescript-eslint.io/rules/consistent-type-imports/
41
- "@typescript-eslint/consistent-type-imports": "error",
42
-
43
- // https://typescript-eslint.io/rules/explicit-function-return-type/
44
- "@typescript-eslint/explicit-function-return-type": [
45
- "error",
46
- {
47
- allowExpressions: true,
48
- allowTypedFunctionExpressions: true,
49
- allowHigherOrderFunctions: true,
50
- allowDirectConstAssertionInArrowFunctions: true,
51
- allowConciseArrowFunctionExpressionsStartingWithVoid: false,
52
- allowFunctionsWithoutTypeParameters: false,
53
- allowedNames: [],
54
- allowIIFEs: false,
55
- },
56
- ],
57
-
58
- // https://typescript-eslint.io/rules/explicit-member-accessibility/
59
- "@typescript-eslint/explicit-member-accessibility": "off",
60
-
61
- // https://typescript-eslint.io/rules/explicit-module-boundary-types/
62
- "@typescript-eslint/explicit-module-boundary-types": "error",
63
-
64
- // https://typescript-eslint.io/rules/method-signature-style/
65
- "@typescript-eslint/method-signature-style": "error",
66
-
67
- // https://typescript-eslint.io/rules/naming-convention/
68
- "@typescript-eslint/naming-convention": [
69
- enableIfVSCode("warn"),
70
- // Enforce that interface names do not begin with an I
71
- {
72
- selector: "interface",
73
- format: ["PascalCase"],
74
- custom: {
75
- regex: "^I[A-Z]",
76
- match: false,
77
- },
78
- },
79
- // Enforce that type is in PascalCase
80
- {
81
- selector: "typeLike",
82
- format: ["PascalCase"],
83
- },
84
- ],
85
-
86
- // https://typescript-eslint.io/rules/no-confusing-non-null-assertion/
87
- "@typescript-eslint/no-confusing-non-null-assertion": "error",
88
-
89
- // https://typescript-eslint.io/rules/no-floating-promises/
90
- "@typescript-eslint/no-floating-promises": ["error", { ignoreVoid: false }],
91
-
92
- // https://typescript-eslint.io/rules/no-import-type-side-effects/
93
- "@typescript-eslint/no-import-type-side-effects": "error",
94
-
95
- // https://typescript-eslint.io/rules/no-inferrable-types/
96
- "@typescript-eslint/no-inferrable-types": "error",
97
-
98
- // https://typescript-eslint.io/rules/no-require-imports/
99
- "@typescript-eslint/no-require-imports": "off",
100
-
101
- // https://typescript-eslint.io/rules/no-unnecessary-qualifier/
102
- "@typescript-eslint/no-unnecessary-qualifier": "error",
103
-
104
- // https://typescript-eslint.io/rules/no-unsafe-unary-minus/
105
- "@typescript-eslint/no-unsafe-unary-minus": "error",
106
-
107
- // https://typescript-eslint.io/rules/no-useless-empty-export/
108
- "@typescript-eslint/no-useless-empty-export": "error",
109
-
110
- // https://typescript-eslint.io/rules/non-nullable-type-assertion-style/
111
- "@typescript-eslint/non-nullable-type-assertion-style": "error",
112
-
113
- // https://typescript-eslint.io/rules/parameter-properties/
114
- "@typescript-eslint/parameter-properties": "error",
115
-
116
- // https://typescript-eslint.io/rules/prefer-enum-initializers/
117
- "@typescript-eslint/prefer-enum-initializers": "error",
118
-
119
- // https://typescript-eslint.io/rules/prefer-find/
120
- "@typescript-eslint/prefer-find": "error",
121
-
122
- // https://typescript-eslint.io/rules/prefer-for-of/
123
- "@typescript-eslint/prefer-for-of": "off",
124
-
125
- // https://typescript-eslint.io/rules/prefer-function-type/
126
- "@typescript-eslint/prefer-function-type": "error",
127
-
128
- // https://typescript-eslint.io/rules/prefer-namespace-keyword/
129
- "@typescript-eslint/prefer-namespace-keyword": "error",
130
-
131
- // https://typescript-eslint.io/rules/prefer-nullish-coalescing/
132
- "@typescript-eslint/prefer-nullish-coalescing": "off",
133
-
134
- // https://typescript-eslint.io/rules/prefer-optional-chain/
135
- "@typescript-eslint/prefer-optional-chain": "error",
136
-
137
- // https://typescript-eslint.io/rules/prefer-readonly/
138
- "@typescript-eslint/prefer-readonly": "off",
139
-
140
- // https://typescript-eslint.io/rules/prefer-readonly-parameter-types/
141
- // too verbose and eslint already makes sure we don't modify parameters
142
- "@typescript-eslint/prefer-readonly-parameter-types": "off",
143
-
144
- // https://typescript-eslint.io/rules/prefer-regexp-exec/
145
- "@typescript-eslint/prefer-regexp-exec": "error",
146
-
147
- // https://typescript-eslint.io/rules/prefer-string-starts-ends-with/
148
- "@typescript-eslint/prefer-string-starts-ends-with": "error",
149
-
150
- // https://typescript-eslint.io/rules/promise-function-async/
151
- "@typescript-eslint/promise-function-async": "off",
152
-
153
- // https://typescript-eslint.io/rules/require-array-sort-compare/
154
- "@typescript-eslint/require-array-sort-compare": "off",
155
-
156
- // https://typescript-eslint.io/rules/restrict-template-expressions/
157
- "@typescript-eslint/restrict-template-expressions": [
158
- "error",
159
- {
160
- allowAny: false,
161
- allowBoolean: true,
162
- allowNullish: false,
163
- allowNumber: true,
164
- allowRegExp: false,
165
- allowNever: false,
166
- },
167
- ],
168
-
169
- // https://typescript-eslint.io/rules/strict-boolean-expressions/
170
- "@typescript-eslint/strict-boolean-expressions": "off",
171
-
172
- // https://typescript-eslint.io/rules/switch-exhaustiveness-check/
173
- "@typescript-eslint/switch-exhaustiveness-check": "error",
174
-
175
- // https://typescript-eslint.io/rules/ban-ts-comment/
176
- "@typescript-eslint/ban-ts-comment": [
177
- "error",
178
- {
179
- minimumDescriptionLength: 3,
180
- "ts-check": true, // default is false. We don't want to use ts-check like ts-nocheck and prefer instead ts-expect-error
181
- "ts-expect-error": "allow-with-description",
182
- "ts-ignore": true,
183
- "ts-nocheck": true,
184
- },
185
- ],
186
-
187
- // https://typescript-eslint.io/rules/typedef/
188
- "@typescript-eslint/typedef": "off",
189
-
190
- /* warnings: not required to be fixed, but should require attention */
191
- "@typescript-eslint/no-explicit-any": "warn",
192
- "@typescript-eslint/no-non-null-assertion": "warn",
193
- "@typescript-eslint/no-redundant-type-constituents": "warn",
194
-
195
- /* Disabled */
196
-
197
- // too much errors on existing code
198
- "@typescript-eslint/unbound-method": "off",
199
-
200
- // most of the time it's sorted by the developer as it is easier to read
201
- "@typescript-eslint/sort-type-union-intersection-members": "off",
202
-
203
- "@typescript-eslint/member-ordering": "off",
204
- "@typescript-eslint/no-extraneous-class": "off",
205
- "@typescript-eslint/no-unnecessary-type-arguments": "off",
206
-
207
- // Testing rules as warn
208
- "@typescript-eslint/unified-signatures": "warn",
209
- "@typescript-eslint/no-unnecessary-condition": "warn",
210
- "@typescript-eslint/no-confusing-void-expression": "warn",
211
- "@typescript-eslint/no-unnecessary-type-parameters": "warn",
212
- },
213
- };
@@ -1,392 +0,0 @@
1
- import eslintPluginUnicorn from "eslint-plugin-unicorn";
2
-
3
- export default [
4
- {
5
- name: "@pob/eslint-config/unicorn",
6
- plugins: { unicorn: eslintPluginUnicorn },
7
- rules: {
8
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/catch-error-name.md
9
- "unicorn/catch-error-name": "error",
10
-
11
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/explicit-length-check.md
12
- "unicorn/explicit-length-check": "error",
13
-
14
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md
15
- "unicorn/filename-case": "off",
16
-
17
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-abusive-eslint-disable.md
18
- // kept in eslint: oxlint's version reports rule names with more than one
19
- // slash, like n/no-unsupported-features/node-builtins, as not specifying
20
- // any rule (1.85, https://github.com/oxc-project/oxc/issues/27364)
21
- "unicorn/no-abusive-eslint-disable": "error",
22
-
23
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-process-exit.md
24
- "unicorn/no-process-exit": "error",
25
-
26
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/throw-new-error.md
27
- "unicorn/throw-new-error": "error",
28
-
29
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/number-literal-case.md
30
- "unicorn/number-literal-case": "error",
31
-
32
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/escape-case.md
33
- "unicorn/escape-case": "error",
34
-
35
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-buffer.md
36
- "unicorn/no-new-buffer": "error",
37
-
38
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-hex-escape.md
39
- "unicorn/no-hex-escape": "error",
40
-
41
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/custom-error-definition.md
42
- "unicorn/custom-error-definition": "error",
43
-
44
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-starts-ends-with.md
45
- "unicorn/prefer-string-starts-ends-with": "error",
46
-
47
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-error.md
48
- "unicorn/prefer-type-error": "error",
49
-
50
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-callback-reference.md
51
- "unicorn/no-array-callback-reference": "off",
52
-
53
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/new-for-builtins.md
54
- "unicorn/new-for-builtins": "error",
55
-
56
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-spread.md
57
- "unicorn/prefer-spread": "error",
58
-
59
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/error-message.md
60
- "unicorn/error-message": "error",
61
-
62
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-add-event-listener.md
63
- "unicorn/prefer-add-event-listener": "error",
64
-
65
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-query-selector.md
66
- "unicorn/prefer-query-selector": "off",
67
-
68
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-append.md
69
- "unicorn/prefer-dom-node-append": "error",
70
-
71
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-remove.md
72
- "unicorn/prefer-dom-node-remove": "error",
73
-
74
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unused-properties.md
75
- "unicorn/no-unused-properties": "off",
76
-
77
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-array-destructuring.md
78
- "unicorn/no-unreadable-array-destructuring": "off",
79
-
80
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-console-spaces.md
81
- "unicorn/no-console-spaces": "off",
82
-
83
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prevent-abbreviations.md
84
- "unicorn/prevent-abbreviations": "off",
85
-
86
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-for-loop.md
87
- "unicorn/no-for-loop": "off",
88
-
89
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-zero-fractions.md
90
- "unicorn/no-zero-fractions": "off",
91
-
92
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-includes.md
93
- "unicorn/prefer-includes": "error",
94
-
95
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-text-content.md
96
- "unicorn/prefer-dom-node-text-content": "error",
97
-
98
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-keyboard-event-key.md
99
- "unicorn/prefer-keyboard-event-key": "off",
100
-
101
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat-map.md
102
- "unicorn/prefer-array-flat-map": "error",
103
-
104
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-keyword-prefix.md
105
- "unicorn/no-keyword-prefix": "off",
106
-
107
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/expiring-todo-comments.md
108
- "unicorn/expiring-todo-comments": [
109
- "error",
110
- {
111
- allowWarningComments: true,
112
- },
113
- ],
114
-
115
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-nested-ternary.md
116
- "no-nested-ternary": "off",
117
- "unicorn/no-nested-ternary": "error",
118
-
119
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-function-scoping.md
120
- "unicorn/consistent-function-scoping": "off",
121
-
122
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-reflect-apply.md
123
- "unicorn/prefer-reflect-apply": "off",
124
-
125
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-dataset.md
126
- "unicorn/prefer-dom-node-dataset": "error",
127
-
128
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-slice.md
129
- "unicorn/prefer-string-slice": "error",
130
-
131
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-trim-start-end.md
132
- "unicorn/prefer-string-trim-start-end": "error",
133
-
134
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-negative-index.md
135
- "unicorn/prefer-negative-index": "error",
136
-
137
- // https://github.com/sindr esorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-dom-apis.md
138
- "unicorn/prefer-modern-dom-apis": "error",
139
-
140
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-replace-all.md
141
- "unicorn/prefer-string-replace-all": "off",
142
-
143
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/string-content.md
144
- "unicorn/string-content": "off",
145
-
146
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-number-properties.md
147
- "unicorn/prefer-number-properties": "off",
148
-
149
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-has.md
150
- "unicorn/prefer-set-has": "off",
151
-
152
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-optional-catch-binding.md
153
- "unicorn/prefer-optional-catch-binding": "error",
154
-
155
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-undefined.md
156
- "unicorn/no-useless-undefined": "off",
157
-
158
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-find.md
159
- "unicorn/prefer-array-find": "error",
160
-
161
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-reduce.md
162
- "unicorn/no-array-reduce": "error",
163
-
164
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/import-style.md
165
- "unicorn/import-style": "off",
166
-
167
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-trunc.md
168
- "unicorn/prefer-math-trunc": "error",
169
-
170
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/numeric-separators-style.md
171
- "unicorn/numeric-separators-style": "error",
172
-
173
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-ternary.md
174
- "unicorn/prefer-ternary": "off",
175
-
176
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-lonely-if.md
177
- "unicorn/no-lonely-if": "off",
178
-
179
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/empty-brace-spaces.md
180
- "unicorn/empty-brace-spaces": "off",
181
-
182
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-date-now.md
183
- "unicorn/prefer-date-now": "error",
184
-
185
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-some.md
186
- "unicorn/prefer-array-some": "error",
187
-
188
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-default-parameters.md
189
- "unicorn/prefer-default-parameters": "error",
190
-
191
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-array.md
192
- "unicorn/no-new-array": "error",
193
-
194
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-index-of.md
195
- "unicorn/prefer-array-index-of": "error",
196
-
197
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-regexp-test.md
198
- "unicorn/prefer-regexp-test": "error",
199
-
200
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-destructuring.md
201
- "unicorn/consistent-destructuring": "off",
202
-
203
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-for-each.md
204
- "unicorn/no-array-for-each": "off",
205
-
206
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-single-call.md
207
- "unicorn/prefer-single-call": "error",
208
-
209
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-this-assignment.md
210
- "unicorn/no-this-assignment": "error",
211
-
212
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-static-only-class.md
213
- "unicorn/no-static-only-class": "error",
214
-
215
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat.md
216
- "unicorn/prefer-array-flat": "error",
217
-
218
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-switch.md
219
- "unicorn/prefer-switch": "error",
220
-
221
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md
222
- "unicorn/prefer-node-protocol": "error",
223
-
224
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-module.md
225
- // unicorn/prefer-module is enabled in node configs.
226
- "unicorn/prefer-module": "off",
227
-
228
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-document-cookie.md
229
- "unicorn/no-document-cookie": "error",
230
-
231
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-array-join-separator.md
232
- "unicorn/require-array-join-separator": "error",
233
-
234
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-number-to-fixed-digits-argument.md
235
- "unicorn/require-number-to-fixed-digits-argument": "error",
236
-
237
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-prototype-methods.md
238
- "unicorn/prefer-prototype-methods": "error",
239
-
240
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-method-this-argument.md
241
- "unicorn/no-array-method-this-argument": "error",
242
-
243
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-post-message-target-origin.md
244
- "unicorn/require-post-message-target-origin": "error",
245
-
246
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-top-level-await.md
247
- "unicorn/prefer-top-level-await": "error",
248
-
249
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-at.md
250
- "unicorn/prefer-at": "error",
251
-
252
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-object-from-entries.md
253
- "unicorn/prefer-object-from-entries": "error",
254
-
255
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-length-check.md
256
- "unicorn/no-useless-length-check": "error",
257
-
258
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-spread.md
259
- "unicorn/no-useless-spread": "error",
260
-
261
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-fallback-in-spread.md
262
- "unicorn/no-useless-fallback-in-spread": "error",
263
-
264
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-remove-event-listener.md
265
- "unicorn/no-invalid-remove-event-listener": "error",
266
-
267
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/template-indent.md
268
- // prettier does that
269
- "unicorn/template-indent": "off",
270
-
271
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-empty-file.md
272
- "unicorn/no-empty-file": "off",
273
-
274
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-export-from.md
275
- "unicorn/prefer-export-from": "error",
276
-
277
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-code-point.md
278
- "unicorn/prefer-code-point": "error",
279
-
280
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-expression-member.md
281
- "unicorn/no-await-expression-member": "error",
282
-
283
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-thenable.md
284
- "unicorn/no-thenable": "off",
285
-
286
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-promise-resolve-reject.md
287
- "unicorn/no-useless-promise-resolve-reject": "error",
288
-
289
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/relative-url-style.md
290
- "unicorn/relative-url-style": ["error", "always"],
291
-
292
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-json-parse-buffer.md
293
- "unicorn/prefer-json-parse-buffer": "error",
294
-
295
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/text-encoding-identifier-case.md
296
- "unicorn/text-encoding-identifier-case": "error",
297
-
298
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-native-coercion-functions.md
299
- "unicorn/prefer-native-coercion-functions": "error",
300
-
301
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-iife.md
302
- "unicorn/no-unreadable-iife": "error",
303
-
304
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-math-apis.md
305
- "unicorn/prefer-modern-math-apis": "warn",
306
-
307
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-switch-case.md
308
- "unicorn/no-useless-switch-case": "off",
309
-
310
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-logical-operator-over-ternary.md
311
- "unicorn/prefer-logical-operator-over-ternary": "error",
312
-
313
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-event-target.md
314
- "unicorn/prefer-event-target": "error",
315
-
316
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-await.md
317
- "unicorn/no-unnecessary-await": "error",
318
-
319
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md
320
- "unicorn/switch-case-braces": "off",
321
-
322
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-typeof-undefined.md
323
- "unicorn/no-typeof-undefined": "error",
324
-
325
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negated-condition.md
326
- "unicorn/no-negated-condition": "off",
327
-
328
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-size.md
329
- "unicorn/prefer-set-size": "error",
330
-
331
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-blob-reading-methods.md
332
- "unicorn/prefer-blob-reading-methods": "error",
333
-
334
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-global-this.md
335
- "unicorn/prefer-global-this": "warn",
336
-
337
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-min-max.md
338
- "unicorn/prefer-math-min-max": "error",
339
-
340
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-existence-index-check.md
341
- "unicorn/consistent-existence-index-check": "error",
342
-
343
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-date-clone.md
344
- "unicorn/consistent-date-clone": "error",
345
-
346
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-assert.md
347
- "unicorn/consistent-assert": "error",
348
-
349
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-instanceof-builtins.md
350
- "unicorn/no-instanceof-builtins": "error",
351
-
352
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-accessor-recursion.md
353
- "unicorn/no-accessor-recursion": "error",
354
-
355
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-polyfills.md
356
- "unicorn/no-unnecessary-polyfills": "error",
357
-
358
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-slice-end.md
359
- "unicorn/no-unnecessary-slice-end": "error",
360
-
361
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-class-fields.md
362
- "unicorn/prefer-class-fields": "error",
363
-
364
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-reverse.md
365
- "unicorn/no-array-reverse": "error",
366
-
367
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-sort.md
368
- "unicorn/no-array-sort": "error",
369
-
370
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-immediate-mutation.md
371
- "unicorn/no-immediate-mutation": "error",
372
-
373
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-collection-argument.md
374
- "unicorn/no-useless-collection-argument": "error",
375
-
376
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-response-static-json.md
377
- "unicorn/prefer-response-static-json": "error",
378
-
379
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-template-literal-escape.md
380
- "unicorn/consistent-template-literal-escape": "error",
381
-
382
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-iterator-to-array.md
383
- "unicorn/no-useless-iterator-to-array": "error",
384
-
385
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-simple-condition-first.md
386
- "unicorn/prefer-simple-condition-first": "off",
387
-
388
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-break-position.md
389
- "unicorn/switch-case-break-position": "error",
390
- },
391
- },
392
- ];