@html-validate/eslint-config 9.5.0 → 9.6.1
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 +3 -3
- package/dist/cli.mjs.map +1 -1
- package/index.mjs +20 -0
- package/package.json +4 -4
- package/template/eslint.config.mjs.njk +0 -12
package/index.mjs
CHANGED
|
@@ -34,6 +34,20 @@ function filterRules(rules, predicate) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export default [
|
|
37
|
+
defineConfig({
|
|
38
|
+
name: "@html-validate/eslint-config/global-ignore",
|
|
39
|
+
ignores: [
|
|
40
|
+
"**/.vscode-test/**", // @vscode/test-electron
|
|
41
|
+
"**/coverage/**",
|
|
42
|
+
"**/dist/**",
|
|
43
|
+
"**/node_modules/**",
|
|
44
|
+
"**/out/**", // vscode-html-validate
|
|
45
|
+
"**/public/assets/**",
|
|
46
|
+
"**/temp/**",
|
|
47
|
+
"**/public/*.hot-update.js", // webpack
|
|
48
|
+
],
|
|
49
|
+
}),
|
|
50
|
+
|
|
37
51
|
defineConfig({
|
|
38
52
|
name: "@html-validate/eslint-config/language-options",
|
|
39
53
|
languageOptions: {
|
|
@@ -97,7 +111,9 @@ export default [
|
|
|
97
111
|
/* enable eslint-plugin-unicorn */
|
|
98
112
|
...eslintPluginUnicorn.configs.recommended.rules,
|
|
99
113
|
"unicorn/catch-error-name": "off",
|
|
114
|
+
"unicorn/comment-content": "error",
|
|
100
115
|
"unicorn/consistent-assert": "off",
|
|
116
|
+
"unicorn/consistent-boolean-name": "off", // while i would like this for variables I prefer not to force it on parameters, etc
|
|
101
117
|
"unicorn/consistent-class-member-order": "off",
|
|
102
118
|
"unicorn/consistent-compound-words": [
|
|
103
119
|
"error",
|
|
@@ -123,6 +139,7 @@ export default [
|
|
|
123
139
|
ignore: ["^__(fixtures|mocks|snapshots|tests)__$", "^Gruntfile.js$"],
|
|
124
140
|
},
|
|
125
141
|
],
|
|
142
|
+
"unicorn/prefer-minimal-ternary": "off", // situational, i dont think `foo[expr ? "x": "y"].bar` is more readable than `expr ? foo.x.bar : foo.y.bar`.
|
|
126
143
|
"unicorn/import-style": "off", // off for now
|
|
127
144
|
"unicorn/no-abusive-eslint-disable": "off", // covered by eslint-plugin-eslint-comments
|
|
128
145
|
"unicorn/no-array-callback-reference": "off", // opinionated, prefer to allow passing function references to array methods (and for most part TypeScript will handle this)
|
|
@@ -270,16 +287,19 @@ export default [
|
|
|
270
287
|
|
|
271
288
|
"sonarjs/argument-type": "off", // handled by TypeScript (and this rule is sometimes wrong)
|
|
272
289
|
"sonarjs/arguments-order": "off", // another slow rule, would be nice to have enabled thought
|
|
290
|
+
"sonarjs/assertions-in-tests": "off", // could be useful but yields lots of false positives (e.g. node:test isn't recognized)
|
|
273
291
|
"sonarjs/cognitive-complexity": "off", // already covered by native complexity rule
|
|
274
292
|
"sonarjs/concise-regex": "off", // already covered by unicorn/better-regex
|
|
275
293
|
"sonarjs/deprecation": "off", // already covered by @typescript-eslint/no-deprecated
|
|
276
294
|
"sonarjs/function-return-type": "off", // overly broad and opinionated, let TypeScript deal with this
|
|
295
|
+
"sonarjs/no-alphabetical-sort": "off", // covered by unicorn/require-array-sort-compare
|
|
277
296
|
"sonarjs/no-commented-code": "off", // neat rule but is very very slow (over 50% of the total linting time)
|
|
278
297
|
"sonarjs/no-control-regex": "off", // already covered by no-control-regexp
|
|
279
298
|
"sonarjs/no-empty-test-file": "off", // could be useful but it does not handle it.each or similar constructs thus yields more false positives than its worth */
|
|
280
299
|
"sonarjs/no-redundant-optional": "off", // flags "foo?: string | undefined" as redundant even if `exactOptionalPropertyTypes` tsconfig is enabled */
|
|
281
300
|
"sonarjs/no-skipped-tests": "off", // covered by jest/no-disabled-tests and mocha/no-pending-tests
|
|
282
301
|
"sonarjs/no-small-switch": "off", // prefer to use small switches when the intention is to all more cases later
|
|
302
|
+
"sonarjs/no-trivial-assertions": "off", // produces a bit too much noise
|
|
283
303
|
"sonarjs/no-unused-vars": "off", // already coveredby @typescript-eslint/no-unused-vars
|
|
284
304
|
"sonarjs/prefer-nullish-coalescing": "off", // requires TypeScript and strictNullChecks, which is sane, but we also use @typescript-eslint/prefer-nullish-coalescing so this becomes redundant
|
|
285
305
|
"sonarjs/prefer-regexp-exec": "off", // prefer @typescript-eslint/prefer-regexp-exec
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@html-validate/eslint-config",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.6.1",
|
|
4
4
|
"description": "Eslint sharable config used by the various HTML-validate packages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint"
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"eslint-plugin-prettier": "5.5.6",
|
|
50
50
|
"eslint-plugin-regexp": "3.1.0",
|
|
51
51
|
"eslint-plugin-security": "4.0.1",
|
|
52
|
-
"eslint-plugin-sonarjs": "4.0
|
|
53
|
-
"eslint-plugin-unicorn": "
|
|
52
|
+
"eslint-plugin-sonarjs": "4.1.0",
|
|
53
|
+
"eslint-plugin-unicorn": "67.0.0",
|
|
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": "0f8579658bc6e5ee272ab44850614a81fd690300"
|
|
69
69
|
}
|
|
@@ -25,18 +25,6 @@ import vueConfig from "@html-validate/eslint-config-vue";
|
|
|
25
25
|
{% endif %}
|
|
26
26
|
|
|
27
27
|
export default [
|
|
28
|
-
{
|
|
29
|
-
name: "Ignored files",
|
|
30
|
-
ignores: [
|
|
31
|
-
"**/coverage/**",
|
|
32
|
-
"**/dist/**",
|
|
33
|
-
"**/node_modules/**",
|
|
34
|
-
"**/out/**",
|
|
35
|
-
"**/public/assets/**",
|
|
36
|
-
"**/temp/**"
|
|
37
|
-
],
|
|
38
|
-
},
|
|
39
|
-
|
|
40
28
|
...defaultConfig,
|
|
41
29
|
{% if typescript %}
|
|
42
30
|
|