@html-validate/eslint-config 6.8.2 → 6.9.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
@@ -22,6 +22,15 @@ function defineConfig(config) {
22
22
  return config;
23
23
  }
24
24
 
25
+ /**
26
+ * @param {RulesRecord} rules
27
+ * @param {(rule: string) => boolean} predicate
28
+ * @returns {RulesRecord}
29
+ */
30
+ function filterRules(rules, predicate) {
31
+ return Object.fromEntries(Object.entries(rules).filter(([key]) => predicate(key)));
32
+ }
33
+
25
34
  export default [
26
35
  defineConfig({
27
36
  name: "@html-validate/eslint-config/language-options",
@@ -60,7 +69,27 @@ export default [
60
69
  rules: {
61
70
  ...js.configs.recommended.rules,
62
71
  ...eslintPluginEslintComments.configs.recommended.rules,
63
- ...eslintConfigPrettier.rules,
72
+ ...filterRules(eslintConfigPrettier.rules, (rule) => {
73
+ if (rule.startsWith("@stylistic/")) {
74
+ return false;
75
+ }
76
+ if (rule.startsWith("@babel/") || rule.startsWith("babel/")) {
77
+ return false;
78
+ }
79
+ if (rule.startsWith("flowtype/")) {
80
+ return false;
81
+ }
82
+ if (rule.startsWith("react/")) {
83
+ return false;
84
+ }
85
+ if (rule.startsWith("standard/")) {
86
+ return false;
87
+ }
88
+ if (rule.startsWith("unicorn/")) {
89
+ return false;
90
+ }
91
+ return true;
92
+ }),
64
93
  ...eslintPluginPrettier.configs.recommended.rules,
65
94
  ...eslintPluginImport.configs.errors.rules,
66
95
  ...eslintPluginN.configs["recommended-module"].rules,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@html-validate/eslint-config",
3
- "version": "6.8.2",
3
+ "version": "6.9.0",
4
4
  "description": "Eslint sharable config used by the various HTML-validate packages",
5
5
  "keywords": [
6
6
  "eslint"
@@ -64,5 +64,5 @@
64
64
  "publishConfig": {
65
65
  "access": "public"
66
66
  },
67
- "gitHead": "b69afeeca8b352197fa28261583b5d585e850b9a"
67
+ "gitHead": "4fc881316fa62d28f2943ec4750a23564a8e1adb"
68
68
  }
@@ -21,6 +21,9 @@ import vueConfig from "@html-validate/eslint-config-vue";
21
21
  {% if jest %}
22
22
  import jestConfig from "@html-validate/eslint-config-jest";
23
23
  {% endif %}
24
+ {% if vitest %}
25
+ import vitestConfig from "@html-validate/eslint-config-vitest";
26
+ {% endif %}
24
27
  {% if cypress %}
25
28
  import cypressConfig from "@html-validate/eslint-config-cypress";
26
29
  {% endif %}
@@ -94,6 +97,15 @@ export default [
94
97
  ...jestConfig,
95
98
  },
96
99
  {% endif %}
100
+ {% if vitest %}
101
+
102
+ {
103
+ name: "@html-validate/eslint-config-vitest",
104
+ files: ["**/*.spec.[jt]s"],
105
+ ignores: ["cypress/**", "tests/e2e/**"],
106
+ ...vitestConfig,
107
+ },
108
+ {% endif %}
97
109
  {% if cypress %}
98
110
 
99
111
  {