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