@html-validate/eslint-config-vue 5.28.0 → 6.0.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 +32 -15
- package/package.json +5 -4
- package/legacy.cjs +0 -9
package/index.mjs
CHANGED
|
@@ -1,20 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { FlatCompat } from "@eslint/eslintrc";
|
|
4
|
-
import legacyConfig from "./legacy.cjs";
|
|
1
|
+
import eslintConfigPrettier from "eslint-config-prettier";
|
|
2
|
+
import eslintPluginVue from "eslint-plugin-vue";
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const compat = new FlatCompat({
|
|
10
|
-
baseDirectory: __dirname,
|
|
11
|
-
resolvePluginsRelativeTo: __dirname,
|
|
12
|
-
});
|
|
4
|
+
function filterRules(rules, predicate) {
|
|
5
|
+
return Object.fromEntries(Object.entries(rules).filter(([key]) => predicate(key)));
|
|
6
|
+
}
|
|
13
7
|
|
|
14
|
-
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {import("eslint").Linter.Config} Config
|
|
10
|
+
*/
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
/**
|
|
13
|
+
* @param {Config} config
|
|
14
|
+
* @returns {Config}
|
|
15
|
+
*/
|
|
16
|
+
function defineConfig(config) {
|
|
17
|
+
return config;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
const recommended = eslintPluginVue.configs["flat/recommended"][1];
|
|
21
|
+
|
|
22
|
+
export default defineConfig({
|
|
23
|
+
languageOptions: {
|
|
24
|
+
parser: recommended.languageOptions.parser,
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
processor: eslintPluginVue.processors.vue,
|
|
28
|
+
|
|
29
|
+
plugins: {
|
|
30
|
+
vue: eslintPluginVue,
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
rules: {
|
|
34
|
+
...recommended.rules,
|
|
35
|
+
...filterRules(eslintConfigPrettier.rules, (rule) => rule.startsWith("vue/")),
|
|
36
|
+
},
|
|
37
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@html-validate/eslint-config-vue",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Eslint sharable config used by the various HTML-validate packages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"author": "David Sveningsson <ext@sidvind.com>",
|
|
20
|
+
"type": "module",
|
|
20
21
|
"main": "index.mjs",
|
|
21
22
|
"files": [
|
|
22
23
|
"*.cjs",
|
|
@@ -28,11 +29,11 @@
|
|
|
28
29
|
"prepublishOnly": "release-prepublish --retain-scripts"
|
|
29
30
|
},
|
|
30
31
|
"dependencies": {
|
|
31
|
-
"
|
|
32
|
+
"eslint-config-prettier": "10.1.1",
|
|
32
33
|
"eslint-plugin-vue": "10.0.0"
|
|
33
34
|
},
|
|
34
35
|
"peerDependencies": {
|
|
35
|
-
"eslint": "^
|
|
36
|
+
"eslint": "^9.0.0"
|
|
36
37
|
},
|
|
37
38
|
"engines": {
|
|
38
39
|
"node": ">= 20.9.0",
|
|
@@ -41,5 +42,5 @@
|
|
|
41
42
|
"publishConfig": {
|
|
42
43
|
"access": "public"
|
|
43
44
|
},
|
|
44
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "f54dcbae0ccae318895e34d32fbfa02b05cd38d1"
|
|
45
46
|
}
|
package/legacy.cjs
DELETED