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