@html-eslint/eslint-plugin 0.53.0-alpha.0 → 0.54.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/lib/configs/all.js +8 -1
- package/lib/index.js +6 -3
- package/lib/rules/utils/baseline.js +1 -1
- package/package.json +6 -6
- package/types/configs/all.d.ts +1 -0
- package/types/configs/all.d.ts.map +1 -1
- package/types/index.d.ts +70 -4
- package/types/index.d.ts.map +1 -1
package/lib/configs/all.js
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
const rules = require("../rules");
|
|
2
|
+
const ruleKeys = Object.keys(rules);
|
|
2
3
|
|
|
3
|
-
const
|
|
4
|
+
const allRulesLegacy = ruleKeys.reduce((acc, ruleName) => {
|
|
4
5
|
acc[`@html-eslint/${ruleName}`] = "error";
|
|
5
6
|
return acc;
|
|
6
7
|
}, /** @type {Record<string, "error">} */ ({}));
|
|
7
8
|
|
|
9
|
+
const allRules = ruleKeys.reduce((acc, ruleName) => {
|
|
10
|
+
acc[`html/${ruleName}`] = "error";
|
|
11
|
+
return acc;
|
|
12
|
+
}, /** @type {Record<string, "error">} */ ({}));
|
|
13
|
+
|
|
8
14
|
module.exports = {
|
|
15
|
+
allRulesLegacy,
|
|
9
16
|
allRules,
|
|
10
17
|
};
|
package/lib/index.js
CHANGED
|
@@ -3,13 +3,12 @@ const {
|
|
|
3
3
|
recommendedRules,
|
|
4
4
|
recommendedLegacyRules,
|
|
5
5
|
} = require("./configs/recommended");
|
|
6
|
-
const { allRules } = require("./configs/all");
|
|
6
|
+
const { allRules, allRulesLegacy } = require("./configs/all");
|
|
7
7
|
const { HTMLLanguage } = require("./languages/html-language");
|
|
8
8
|
const { name, version } = require("../package.json");
|
|
9
9
|
const parser = require("@html-eslint/parser");
|
|
10
10
|
/** @import {ESLint} from "eslint" */
|
|
11
11
|
|
|
12
|
-
/** @type {ESLint.Plugin} */
|
|
13
12
|
const plugin = {
|
|
14
13
|
meta: {
|
|
15
14
|
name,
|
|
@@ -24,6 +23,10 @@ const plugin = {
|
|
|
24
23
|
rules: recommendedRules,
|
|
25
24
|
plugins: {},
|
|
26
25
|
},
|
|
26
|
+
all: {
|
|
27
|
+
rules: allRules,
|
|
28
|
+
plugins: {},
|
|
29
|
+
},
|
|
27
30
|
["recommended-legacy"]: {
|
|
28
31
|
rules: recommendedLegacyRules,
|
|
29
32
|
},
|
|
@@ -49,7 +52,7 @@ const plugin = {
|
|
|
49
52
|
languageOptions: {
|
|
50
53
|
parser,
|
|
51
54
|
},
|
|
52
|
-
rules:
|
|
55
|
+
rules: allRulesLegacy,
|
|
53
56
|
},
|
|
54
57
|
},
|
|
55
58
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@html-eslint/eslint-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "ESLint plugin for HTML",
|
|
6
6
|
"author": "yeonjuan",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@eslint/plugin-kit": "^0.4.1",
|
|
43
|
-
"@html-eslint/parser": "^0.
|
|
44
|
-
"@html-eslint/template-parser": "^0.
|
|
45
|
-
"@html-eslint/template-syntax-parser": "^0.
|
|
46
|
-
"@html-eslint/types": "^0.
|
|
43
|
+
"@html-eslint/parser": "^0.54.0",
|
|
44
|
+
"@html-eslint/template-parser": "^0.54.0",
|
|
45
|
+
"@html-eslint/template-syntax-parser": "^0.54.0",
|
|
46
|
+
"@html-eslint/types": "^0.54.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"eslint": "^8.0.0 || ^9.0.0"
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "b7f3d1d94a5583a1540fdb6e8a1a982cd6445dca"
|
|
63
63
|
}
|
package/types/configs/all.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all.d.ts","sourceRoot":"","sources":["../../lib/configs/all.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"all.d.ts","sourceRoot":"","sources":["../../lib/configs/all.js"],"names":[],"mappings":"AAGA,qDAGgD;AAEhD,+CAGgD"}
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare const plugin: ESLint.Plugin;
|
|
1
|
+
import { name } from "../package.json";
|
|
2
|
+
import { version } from "../package.json";
|
|
3
|
+
import rules = require("./rules");
|
|
5
4
|
import type { ESLint } from "eslint";
|
|
5
|
+
import parser = require("@html-eslint/parser");
|
|
6
|
+
export declare namespace meta {
|
|
7
|
+
export { name };
|
|
8
|
+
export { version };
|
|
9
|
+
}
|
|
10
|
+
export declare namespace languages {
|
|
11
|
+
let html: import("./languages/html-language").HTMLLanguageType;
|
|
12
|
+
}
|
|
13
|
+
export { rules };
|
|
14
|
+
export declare let configs: {
|
|
15
|
+
recommended: {
|
|
16
|
+
rules: {
|
|
17
|
+
"html/require-lang": "error";
|
|
18
|
+
"html/require-img-alt": "error";
|
|
19
|
+
"html/require-doctype": "error";
|
|
20
|
+
"html/require-title": "error";
|
|
21
|
+
"html/no-multiple-h1": "error";
|
|
22
|
+
"html/no-extra-spacing-attrs": "error";
|
|
23
|
+
"html/attrs-newline": "error";
|
|
24
|
+
"html/element-newline": ["error", {
|
|
25
|
+
inline: string[];
|
|
26
|
+
}];
|
|
27
|
+
"html/no-duplicate-id": "error";
|
|
28
|
+
"html/indent": "error";
|
|
29
|
+
"html/require-li-container": "error";
|
|
30
|
+
"html/quotes": "error";
|
|
31
|
+
"html/no-obsolete-tags": "error";
|
|
32
|
+
"html/no-obsolete-attrs": "error";
|
|
33
|
+
"html/require-closing-tags": "error";
|
|
34
|
+
"html/no-duplicate-attrs": "error";
|
|
35
|
+
"html/use-baseline": "error";
|
|
36
|
+
"html/no-duplicate-in-head": "error";
|
|
37
|
+
};
|
|
38
|
+
plugins: {};
|
|
39
|
+
};
|
|
40
|
+
all: {
|
|
41
|
+
rules: Record<string, "error">;
|
|
42
|
+
plugins: {};
|
|
43
|
+
};
|
|
44
|
+
"recommended-legacy": {
|
|
45
|
+
rules: Record<string, "error" | ["error", {
|
|
46
|
+
inline: string[];
|
|
47
|
+
}]>;
|
|
48
|
+
};
|
|
49
|
+
"flat/recommended": {
|
|
50
|
+
plugins: {
|
|
51
|
+
/** @type {ESLint.Plugin} */
|
|
52
|
+
readonly "@html-eslint": ESLint.Plugin;
|
|
53
|
+
};
|
|
54
|
+
languageOptions: {
|
|
55
|
+
parser: typeof parser;
|
|
56
|
+
};
|
|
57
|
+
rules: Record<string, "error" | ["error", {
|
|
58
|
+
inline: string[];
|
|
59
|
+
}]>;
|
|
60
|
+
};
|
|
61
|
+
"flat/all": {
|
|
62
|
+
plugins: {
|
|
63
|
+
/** @type {ESLint.Plugin} */
|
|
64
|
+
readonly "@html-eslint": ESLint.Plugin;
|
|
65
|
+
};
|
|
66
|
+
languageOptions: {
|
|
67
|
+
parser: typeof parser;
|
|
68
|
+
};
|
|
69
|
+
rules: Record<string, "error">;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
6
72
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.js"],"names":[],"mappings":";;;4BAS0B,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAyB1B,4BAA4B;qCAAjB,aAAa;;;;;;;;;;;YAYxB,4BAA4B;qCAAjB,aAAa"}
|