@html-validate/eslint-config 9.3.0 → 9.4.2
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.
- package/dist/cli.mjs +2 -2
- package/dist/cli.mjs.map +1 -1
- package/index.mjs +44 -2
- package/package.json +3 -3
package/index.mjs
CHANGED
|
@@ -96,15 +96,26 @@ export default [
|
|
|
96
96
|
|
|
97
97
|
/* enable eslint-plugin-unicorn */
|
|
98
98
|
...eslintPluginUnicorn.configs.recommended.rules,
|
|
99
|
-
"unicorn/better-
|
|
99
|
+
"unicorn/better-dom-traversing": "error",
|
|
100
100
|
"unicorn/catch-error-name": "off",
|
|
101
101
|
"unicorn/consistent-assert": "off",
|
|
102
|
+
"unicorn/consistent-compound-words": [
|
|
103
|
+
"error",
|
|
104
|
+
{
|
|
105
|
+
allowList: {
|
|
106
|
+
/* widely used in the html-validate projects */
|
|
107
|
+
MetaData: true,
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
],
|
|
102
111
|
"unicorn/consistent-date-clone": "error",
|
|
103
112
|
"unicorn/consistent-empty-array-spread": "off",
|
|
104
113
|
"unicorn/consistent-existence-index-check": "error",
|
|
105
114
|
"unicorn/consistent-function-scoping": "error",
|
|
115
|
+
"unicorn/consistent-json-file-read": "error",
|
|
106
116
|
"unicorn/consistent-template-literal-escape": "error",
|
|
107
117
|
"unicorn/custom-error-definition": "error",
|
|
118
|
+
"unicorn/dom-node-dataset": "off",
|
|
108
119
|
"unicorn/error-message": "error",
|
|
109
120
|
"unicorn/escape-case": "off", // typically not useful for this organisation
|
|
110
121
|
"unicorn/expiring-todo-comments": "off", // could be useful later
|
|
@@ -117,23 +128,34 @@ export default [
|
|
|
117
128
|
"unicorn/no-accessor-recursion": "error",
|
|
118
129
|
"unicorn/no-anonymous-default-export": "error",
|
|
119
130
|
"unicorn/no-array-callback-reference": "off", // opinionated, prefer to allow passing function references to array methods (and for most part typescript will handle this)
|
|
131
|
+
"unicorn/no-array-fill-with-reference-type": "error",
|
|
120
132
|
"unicorn/no-array-for-each": "error",
|
|
133
|
+
"unicorn/no-array-from-fill": "error",
|
|
121
134
|
"unicorn/no-array-method-this-argument": "error",
|
|
122
135
|
"unicorn/no-array-reduce": "off", // allow usage of reduce()
|
|
123
136
|
"unicorn/no-array-reverse": "error", // prefer immutable .toReversed() (available in Node.js 20+)
|
|
124
137
|
"unicorn/no-array-sort": "error", // prefer immutable .toSorted() (available in Node.js 20+)
|
|
125
138
|
"unicorn/no-await-expression-member": "error",
|
|
126
139
|
"unicorn/no-await-in-promise-methods": "error",
|
|
140
|
+
"unicorn/no-blob-to-file": "error",
|
|
141
|
+
"unicorn/no-canvas-to-image": "off", // not really relevant for the html-validate projects
|
|
142
|
+
"unicorn/no-confusing-array-splice": "error",
|
|
127
143
|
"unicorn/no-console-spaces": "error",
|
|
128
144
|
"unicorn/no-document-cookie": "off", // typically not useful for this organisation
|
|
145
|
+
"unicorn/no-duplicate-set-values": "error",
|
|
129
146
|
"unicorn/no-empty-file": "off",
|
|
147
|
+
"unicorn/no-exports-in-scripts": "error",
|
|
130
148
|
"unicorn/no-for-loop": "error",
|
|
131
149
|
"unicorn/no-hex-escape": "error",
|
|
132
150
|
"unicorn/no-immediate-mutation": "off",
|
|
151
|
+
"unicorn/no-incorrect-query-selector": "error",
|
|
133
152
|
"unicorn/no-instanceof-builtins": "error",
|
|
134
153
|
"unicorn/no-invalid-fetch-options": "off", // let typescript and tests handle this
|
|
154
|
+
"unicorn/no-invalid-file-input-accept": "off",
|
|
135
155
|
"unicorn/no-invalid-remove-event-listener": "error",
|
|
156
|
+
"unicorn/no-late-current-target-access": "error",
|
|
136
157
|
"unicorn/no-magic-array-flat-depth": "error",
|
|
158
|
+
"unicorn/no-manually-wrapped-comments": "off",
|
|
137
159
|
"unicorn/no-named-default": "off", // named default is useful for vue
|
|
138
160
|
"unicorn/no-negated-condition": "off", // mostly agree with the rule but sometimes its useful to have the common case first even if negated
|
|
139
161
|
"unicorn/no-negation-in-equality-check": "off",
|
|
@@ -146,14 +168,17 @@ export default [
|
|
|
146
168
|
"unicorn/no-static-only-class": "off",
|
|
147
169
|
"unicorn/no-thenable": "off",
|
|
148
170
|
"unicorn/no-this-assignment": "error",
|
|
171
|
+
"unicorn/no-this-outside-of-class": "error",
|
|
149
172
|
"unicorn/no-typeof-undefined": "error",
|
|
150
173
|
"unicorn/no-unnecessary-array-flat-depth": "error",
|
|
151
174
|
"unicorn/no-unnecessary-array-splice-count": "error",
|
|
152
175
|
"unicorn/no-unnecessary-await": "error",
|
|
176
|
+
"unicorn/no-unnecessary-nested-ternary": "error",
|
|
153
177
|
"unicorn/no-unnecessary-polyfills": "off",
|
|
154
178
|
"unicorn/no-unnecessary-slice-end": "error",
|
|
155
179
|
"unicorn/no-unreadable-array-destructuring": "off",
|
|
156
180
|
"unicorn/no-unreadable-iife": "off",
|
|
181
|
+
"unicorn/no-unused-array-method-return": "error",
|
|
157
182
|
"unicorn/no-useless-collection-argument": "error",
|
|
158
183
|
"unicorn/no-useless-error-capture-stack-trace": "error",
|
|
159
184
|
"unicorn/no-useless-fallback-in-spread": "error",
|
|
@@ -171,6 +196,7 @@ export default [
|
|
|
171
196
|
"unicorn/prefer-array-flat": "error",
|
|
172
197
|
"unicorn/prefer-array-flat-map": "error",
|
|
173
198
|
"unicorn/prefer-array-index-of": "error",
|
|
199
|
+
"unicorn/prefer-array-last-methods": "error",
|
|
174
200
|
"unicorn/prefer-array-some": "error",
|
|
175
201
|
"unicorn/prefer-at": "error",
|
|
176
202
|
"unicorn/prefer-bigint-literals": "off",
|
|
@@ -181,16 +207,21 @@ export default [
|
|
|
181
207
|
"unicorn/prefer-date-now": "error",
|
|
182
208
|
"unicorn/prefer-default-parameters": "error",
|
|
183
209
|
"unicorn/prefer-dom-node-append": "off",
|
|
184
|
-
"unicorn/prefer-dom-node-dataset": "off",
|
|
185
210
|
"unicorn/prefer-dom-node-remove": "off",
|
|
186
211
|
"unicorn/prefer-dom-node-text-content": "off",
|
|
187
212
|
"unicorn/prefer-event-target": "off",
|
|
188
213
|
"unicorn/prefer-export-from": "error",
|
|
214
|
+
"unicorn/prefer-get-or-insert-computed": "error",
|
|
189
215
|
"unicorn/prefer-global-this": "off",
|
|
216
|
+
"unicorn/prefer-https": "error",
|
|
190
217
|
"unicorn/prefer-import-meta-properties": "error",
|
|
191
218
|
"unicorn/prefer-includes": "error",
|
|
219
|
+
"unicorn/prefer-includes-over-repeated-comparisons": "error",
|
|
220
|
+
"unicorn/prefer-iterator-concat": "off",
|
|
221
|
+
"unicorn/prefer-iterator-to-array-at-end": "error",
|
|
192
222
|
"unicorn/prefer-keyboard-event-key": "error",
|
|
193
223
|
"unicorn/prefer-logical-operator-over-ternary": "off",
|
|
224
|
+
"unicorn/prefer-math-abs": "error",
|
|
194
225
|
"unicorn/prefer-math-min-max": "error",
|
|
195
226
|
"unicorn/prefer-math-trunc": "error",
|
|
196
227
|
"unicorn/prefer-modern-dom-apis": "off",
|
|
@@ -203,6 +234,10 @@ export default [
|
|
|
203
234
|
"unicorn/prefer-optional-catch-binding": "off", // covered by sonarjs/no-ignored-exceptions
|
|
204
235
|
"unicorn/prefer-prototype-methods": "error",
|
|
205
236
|
"unicorn/prefer-query-selector": "error",
|
|
237
|
+
"unicorn/prefer-queue-microtask": [
|
|
238
|
+
"error",
|
|
239
|
+
{ checkSetImmediate: true, checkSetTimeout: true },
|
|
240
|
+
],
|
|
206
241
|
"unicorn/prefer-reflect-apply": "error",
|
|
207
242
|
"unicorn/prefer-regexp-test": "error",
|
|
208
243
|
"unicorn/prefer-response-static-json": "off",
|
|
@@ -210,8 +245,12 @@ export default [
|
|
|
210
245
|
"unicorn/prefer-set-size": "error",
|
|
211
246
|
"unicorn/prefer-simple-condition-first": "error",
|
|
212
247
|
"unicorn/prefer-single-call": "off",
|
|
248
|
+
"unicorn/prefer-split-limit": "error",
|
|
213
249
|
"unicorn/prefer-spread": "off", // for now
|
|
250
|
+
"unicorn/prefer-string-match-all": "error",
|
|
251
|
+
"unicorn/prefer-string-pad-start-end": "error",
|
|
214
252
|
"unicorn/prefer-string-raw": "off", // for now
|
|
253
|
+
"unicorn/prefer-string-repeat": "error",
|
|
215
254
|
"unicorn/prefer-string-replace-all": "error",
|
|
216
255
|
"unicorn/prefer-string-slice": "error",
|
|
217
256
|
"unicorn/prefer-string-starts-ends-with": "error",
|
|
@@ -224,13 +263,16 @@ export default [
|
|
|
224
263
|
"unicorn/prevent-abbreviations": "off",
|
|
225
264
|
"unicorn/relative-url-style": "warn",
|
|
226
265
|
"unicorn/require-array-join-separator": "error",
|
|
266
|
+
"unicorn/require-css-escape": "off", // would be useful but we dont have CSS.escape()
|
|
227
267
|
"unicorn/require-module-attributes": "off",
|
|
228
268
|
"unicorn/require-module-specifiers": "off",
|
|
229
269
|
"unicorn/require-number-to-fixed-digits-argument": "error",
|
|
270
|
+
"unicorn/require-passive-events": "error",
|
|
230
271
|
"unicorn/switch-case-braces": "off",
|
|
231
272
|
"unicorn/switch-case-break-position": "error",
|
|
232
273
|
"unicorn/text-encoding-identifier-case": "off",
|
|
233
274
|
"unicorn/throw-new-error": "error",
|
|
275
|
+
"unicorn/try-complexity": "off",
|
|
234
276
|
...filterRules(eslintConfigPrettier.rules, (rule) => {
|
|
235
277
|
return rule.startsWith("unicorn/");
|
|
236
278
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@html-validate/eslint-config",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.2",
|
|
4
4
|
"description": "Eslint sharable config used by the various HTML-validate packages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"eslint-plugin-regexp": "3.1.0",
|
|
51
51
|
"eslint-plugin-security": "4.0.1",
|
|
52
52
|
"eslint-plugin-sonarjs": "4.0.3",
|
|
53
|
-
"eslint-plugin-unicorn": "
|
|
53
|
+
"eslint-plugin-unicorn": "65.0.1",
|
|
54
54
|
"find-up": "8.0.0",
|
|
55
55
|
"globals": "17.3.0",
|
|
56
56
|
"nunjucks": "3.2.4"
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"publishConfig": {
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "d19dfd10c18521d9af217061a8b3610d57c6cf0b"
|
|
69
69
|
}
|