@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.
@@ -1,10 +1,17 @@
1
1
  const rules = require("../rules");
2
+ const ruleKeys = Object.keys(rules);
2
3
 
3
- const allRules = Object.keys(rules).reduce((acc, ruleName) => {
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: allRules,
55
+ rules: allRulesLegacy,
53
56
  },
54
57
  },
55
58
  };
@@ -95,7 +95,7 @@ const elements = new Map([
95
95
  ["col.align", "0:"],
96
96
  ["col.char", "0:"],
97
97
  ["col.charoff", "0:"],
98
- ["col.span", "0:"],
98
+ ["col.span", "10:2015"],
99
99
  ["col.valign", "0:"],
100
100
  ["col.width", "0:"],
101
101
  ["colgroup", "10:2015"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@html-eslint/eslint-plugin",
3
- "version": "0.53.0-alpha.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.53.0-alpha.0",
44
- "@html-eslint/template-parser": "^0.53.0-alpha.0",
45
- "@html-eslint/template-syntax-parser": "^0.53.0-alpha.0",
46
- "@html-eslint/types": "^0.53.0-alpha.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": "0739c592dbc3129713e89cd92bc16be62c12164d"
62
+ "gitHead": "b7f3d1d94a5583a1540fdb6e8a1a982cd6445dca"
63
63
  }
@@ -1,2 +1,3 @@
1
+ export const allRulesLegacy: Record<string, "error">;
1
2
  export const allRules: Record<string, "error">;
2
3
  //# sourceMappingURL=all.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"all.d.ts","sourceRoot":"","sources":["../../lib/configs/all.js"],"names":[],"mappings":"AAEA,+CAGgD"}
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
- export = plugin;
2
- /** @import {ESLint} from "eslint" */
3
- /** @type {ESLint.Plugin} */
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.js"],"names":[],"mappings":";AASA,qCAAqC;AAErC,4BAA4B;AAC5B,sBADW,aAAa,CA2CtB;4BA7CwB,QAAQ"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.js"],"names":[],"mappings":";;;4BAS0B,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAyB1B,4BAA4B;qCAAjB,aAAa;;;;;;;;;;;YAYxB,4BAA4B;qCAAjB,aAAa"}