@html-eslint/eslint-plugin 0.31.1 → 0.33.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/rules/attrs-newline.js +3 -5
- package/lib/rules/element-newline.js +11 -9
- package/lib/rules/id-naming-convention.js +5 -5
- package/lib/rules/indent/indent.js +121 -69
- package/lib/rules/index.js +20 -0
- package/lib/rules/lowercase.js +7 -8
- package/lib/rules/max-element-depth.js +96 -0
- package/lib/rules/no-abstract-roles.js +4 -4
- package/lib/rules/no-accesskey-attrs.js +4 -4
- package/lib/rules/no-duplicate-attrs.js +4 -4
- package/lib/rules/no-duplicate-id.js +7 -7
- package/lib/rules/no-extra-spacing-attrs.js +14 -14
- package/lib/rules/no-extra-spacing-text.js +9 -10
- package/lib/rules/no-heading-inside-button.js +54 -0
- package/lib/rules/no-inline-styles.js +0 -1
- package/lib/rules/no-invalid-role.js +287 -0
- package/lib/rules/no-multiple-empty-lines.js +5 -5
- package/lib/rules/no-multiple-h1.js +2 -2
- package/lib/rules/no-nested-interactive.js +120 -0
- package/lib/rules/no-positive-tabindex.js +4 -4
- package/lib/rules/no-restricted-attr-values.js +6 -6
- package/lib/rules/no-restricted-attrs.js +6 -6
- package/lib/rules/no-script-style-type.js +4 -4
- package/lib/rules/no-skip-heading-levels.js +2 -2
- package/lib/rules/no-trailing-spaces.js +3 -3
- package/lib/rules/prefer-https.js +106 -0
- package/lib/rules/quotes.js +8 -8
- package/lib/rules/require-attrs.js +14 -6
- package/lib/rules/require-closing-tags.js +4 -4
- package/lib/rules/require-explicit-size.js +122 -0
- package/lib/rules/require-form-method.js +81 -0
- package/lib/rules/require-img-alt.js +2 -3
- package/lib/rules/require-input-label.js +77 -0
- package/lib/rules/require-meta-charset.js +3 -3
- package/lib/rules/require-meta-description.js +3 -3
- package/lib/rules/require-meta-viewport.js +3 -3
- package/lib/rules/require-open-graph-protocol.js +3 -3
- package/lib/rules/require-title.js +5 -5
- package/lib/rules/sort-attrs.js +12 -12
- package/lib/rules/utils/node.js +72 -32
- package/lib/rules/utils/settings.js +2 -2
- package/lib/rules/utils/visitors.js +1 -1
- package/lib/types/ast.d.ts +204 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/rule.d.ts +83 -0
- package/lib/types/settings.ts +13 -0
- package/package.json +4 -4
- package/types/rules/attrs-newline.d.ts +2 -3
- package/types/rules/attrs-newline.d.ts.map +1 -1
- package/types/rules/element-newline.d.ts +8 -9
- package/types/rules/element-newline.d.ts.map +1 -1
- package/types/rules/id-naming-convention.d.ts +4 -4
- package/types/rules/id-naming-convention.d.ts.map +1 -1
- package/types/rules/indent/indent.d.ts +12 -5
- package/types/rules/indent/indent.d.ts.map +1 -1
- package/types/rules/index.d.ts +8 -0
- package/types/rules/lowercase.d.ts +4 -5
- package/types/rules/lowercase.d.ts.map +1 -1
- package/types/rules/max-element-depth.d.ts +10 -0
- package/types/rules/max-element-depth.d.ts.map +1 -0
- package/types/rules/no-abstract-roles.d.ts +4 -4
- package/types/rules/no-abstract-roles.d.ts.map +1 -1
- package/types/rules/no-accesskey-attrs.d.ts +4 -4
- package/types/rules/no-accesskey-attrs.d.ts.map +1 -1
- package/types/rules/no-duplicate-attrs.d.ts +4 -4
- package/types/rules/no-duplicate-attrs.d.ts.map +1 -1
- package/types/rules/no-duplicate-id.d.ts +5 -5
- package/types/rules/no-duplicate-id.d.ts.map +1 -1
- package/types/rules/no-extra-spacing-attrs.d.ts +11 -11
- package/types/rules/no-extra-spacing-attrs.d.ts.map +1 -1
- package/types/rules/no-extra-spacing-text.d.ts +7 -8
- package/types/rules/no-extra-spacing-text.d.ts.map +1 -1
- package/types/rules/no-heading-inside-button.d.ts +7 -0
- package/types/rules/no-heading-inside-button.d.ts.map +1 -0
- package/types/rules/no-inline-styles.d.ts +1 -2
- package/types/rules/no-inline-styles.d.ts.map +1 -1
- package/types/rules/no-invalid-role.d.ts +7 -0
- package/types/rules/no-invalid-role.d.ts.map +1 -0
- package/types/rules/no-multiple-empty-lines.d.ts +5 -5
- package/types/rules/no-multiple-empty-lines.d.ts.map +1 -1
- package/types/rules/no-multiple-h1.d.ts +2 -2
- package/types/rules/no-multiple-h1.d.ts.map +1 -1
- package/types/rules/no-nested-interactive.d.ts +8 -0
- package/types/rules/no-nested-interactive.d.ts.map +1 -0
- package/types/rules/no-positive-tabindex.d.ts +4 -4
- package/types/rules/no-positive-tabindex.d.ts.map +1 -1
- package/types/rules/no-restricted-attr-values.d.ts +5 -5
- package/types/rules/no-restricted-attr-values.d.ts.map +1 -1
- package/types/rules/no-restricted-attrs.d.ts +5 -5
- package/types/rules/no-restricted-attrs.d.ts.map +1 -1
- package/types/rules/no-script-style-type.d.ts +4 -4
- package/types/rules/no-script-style-type.d.ts.map +1 -1
- package/types/rules/no-skip-heading-levels.d.ts +2 -2
- package/types/rules/no-skip-heading-levels.d.ts.map +1 -1
- package/types/rules/no-trailing-spaces.d.ts +3 -3
- package/types/rules/no-trailing-spaces.d.ts.map +1 -1
- package/types/rules/prefer-https.d.ts +11 -0
- package/types/rules/prefer-https.d.ts.map +1 -0
- package/types/rules/quotes.d.ts +6 -6
- package/types/rules/quotes.d.ts.map +1 -1
- package/types/rules/require-attrs.d.ts +9 -4
- package/types/rules/require-attrs.d.ts.map +1 -1
- package/types/rules/require-closing-tags.d.ts +2 -2
- package/types/rules/require-closing-tags.d.ts.map +1 -1
- package/types/rules/require-explicit-size.d.ts +9 -0
- package/types/rules/require-explicit-size.d.ts.map +1 -0
- package/types/rules/require-form-method.d.ts +7 -0
- package/types/rules/require-form-method.d.ts.map +1 -0
- package/types/rules/require-img-alt.d.ts +2 -2
- package/types/rules/require-img-alt.d.ts.map +1 -1
- package/types/rules/require-input-label.d.ts +8 -0
- package/types/rules/require-input-label.d.ts.map +1 -0
- package/types/rules/require-meta-charset.d.ts +3 -3
- package/types/rules/require-meta-charset.d.ts.map +1 -1
- package/types/rules/require-meta-description.d.ts +3 -3
- package/types/rules/require-meta-description.d.ts.map +1 -1
- package/types/rules/require-meta-viewport.d.ts +3 -3
- package/types/rules/require-meta-viewport.d.ts.map +1 -1
- package/types/rules/require-open-graph-protocol.d.ts +3 -3
- package/types/rules/require-open-graph-protocol.d.ts.map +1 -1
- package/types/rules/require-title.d.ts +4 -4
- package/types/rules/require-title.d.ts.map +1 -1
- package/types/rules/sort-attrs.d.ts +4 -4
- package/types/rules/sort-attrs.d.ts.map +1 -1
- package/types/rules/utils/node.d.ts +56 -37
- package/types/rules/utils/node.d.ts.map +1 -1
- package/types/rules/utils/settings.d.ts +2 -2
- package/types/rules/utils/settings.d.ts.map +1 -1
- package/types/rules/utils/source-code.d.ts +1 -1
- package/types/rules/utils/source-code.d.ts.map +1 -1
- package/types/rules/utils/visitors.d.ts +1 -1
- package/types/rules/utils/visitors.d.ts.map +1 -1
- package/types/types/settings.d.ts +13 -0
- package/types/types/settings.d.ts.map +1 -0
- package/lib/types.d.ts +0 -289
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
declare namespace _exports {
|
|
2
|
-
export { RuleModule,
|
|
2
|
+
export { RuleModule, Tag, ScriptTag, StyleTag, Option };
|
|
3
3
|
}
|
|
4
4
|
declare const _exports: RuleModule;
|
|
5
5
|
export = _exports;
|
|
6
6
|
type RuleModule = import("../types").RuleModule;
|
|
7
|
-
type
|
|
8
|
-
type
|
|
9
|
-
type
|
|
7
|
+
type Tag = import("../types").Tag;
|
|
8
|
+
type ScriptTag = import("../types").ScriptTag;
|
|
9
|
+
type StyleTag = import("../types").StyleTag;
|
|
10
|
+
type Option = {
|
|
11
|
+
tag: string;
|
|
12
|
+
attr: string;
|
|
13
|
+
value: string | undefined;
|
|
14
|
+
};
|
|
10
15
|
//# sourceMappingURL=require-attrs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-attrs.d.ts","sourceRoot":"","sources":["../../lib/rules/require-attrs.js"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"require-attrs.d.ts","sourceRoot":"","sources":["../../lib/rules/require-attrs.js"],"names":[],"mappings":";;;wBAsBU,UAAU;;kBArBN,OAAO,UAAU,EAAE,UAAU;WAC7B,OAAO,UAAU,EAAE,GAAG;iBACtB,OAAO,UAAU,EAAE,SAAS;gBAC5B,OAAO,UAAU,EAAE,QAAQ;;SAG3B,MAAM;UACN,MAAM;WACN,MAAM,GAAG,SAAS"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
declare namespace _exports {
|
|
2
|
-
export { RuleModule,
|
|
2
|
+
export { RuleModule, Tag };
|
|
3
3
|
}
|
|
4
4
|
declare const _exports: RuleModule;
|
|
5
5
|
export = _exports;
|
|
6
6
|
type RuleModule = import("../types").RuleModule;
|
|
7
|
-
type
|
|
7
|
+
type Tag = import("../types").Tag;
|
|
8
8
|
//# sourceMappingURL=require-closing-tags.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-closing-tags.d.ts","sourceRoot":"","sources":["../../lib/rules/require-closing-tags.js"],"names":[],"mappings":";;;wBAiBU,UAAU;;kBAhBN,OAAO,UAAU,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"require-closing-tags.d.ts","sourceRoot":"","sources":["../../lib/rules/require-closing-tags.js"],"names":[],"mappings":";;;wBAiBU,UAAU;;kBAhBN,OAAO,UAAU,EAAE,UAAU;WAC7B,OAAO,UAAU,EAAE,GAAG"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare namespace _exports {
|
|
2
|
+
export { RuleModule, Tag, AnyNode };
|
|
3
|
+
}
|
|
4
|
+
declare const _exports: RuleModule;
|
|
5
|
+
export = _exports;
|
|
6
|
+
type RuleModule = import("../types").RuleModule;
|
|
7
|
+
type Tag = import("../types").Tag;
|
|
8
|
+
type AnyNode = import("../types").AnyNode;
|
|
9
|
+
//# sourceMappingURL=require-explicit-size.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-explicit-size.d.ts","sourceRoot":"","sources":["../../lib/rules/require-explicit-size.js"],"names":[],"mappings":";;;wBAkBU,UAAU;;kBAjBN,OAAO,UAAU,EAAE,UAAU;WAC7B,OAAO,UAAU,EAAE,GAAG;eACtB,OAAO,UAAU,EAAE,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-form-method.d.ts","sourceRoot":"","sources":["../../lib/rules/require-form-method.js"],"names":[],"mappings":";;;wBAiBU,UAAU;;kBAhBN,OAAO,UAAU,EAAE,UAAU"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
declare namespace _exports {
|
|
2
|
-
export { RuleModule,
|
|
2
|
+
export { RuleModule, Tag };
|
|
3
3
|
}
|
|
4
4
|
declare const _exports: RuleModule;
|
|
5
5
|
export = _exports;
|
|
6
6
|
type RuleModule = import("../types").RuleModule;
|
|
7
|
-
type
|
|
7
|
+
type Tag = import("../types").Tag;
|
|
8
8
|
//# sourceMappingURL=require-img-alt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-img-alt.d.ts","sourceRoot":"","sources":["../../lib/rules/require-img-alt.js"],"names":[],"mappings":";;;wBAaU,UAAU;;kBAZN,OAAO,UAAU,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"require-img-alt.d.ts","sourceRoot":"","sources":["../../lib/rules/require-img-alt.js"],"names":[],"mappings":";;;wBAaU,UAAU;;kBAZN,OAAO,UAAU,EAAE,UAAU;WAC7B,OAAO,UAAU,EAAE,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-input-label.d.ts","sourceRoot":"","sources":["../../lib/rules/require-input-label.js"],"names":[],"mappings":";;;wBAkBU,UAAU;;kBAjBN,OAAO,UAAU,EAAE,UAAU;WAC7B,OAAO,UAAU,EAAE,GAAG"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare namespace _exports {
|
|
2
|
-
export { RuleModule,
|
|
2
|
+
export { RuleModule, Tag, AnyNode };
|
|
3
3
|
}
|
|
4
4
|
declare const _exports: RuleModule;
|
|
5
5
|
export = _exports;
|
|
6
6
|
type RuleModule = import("../types").RuleModule;
|
|
7
|
-
type
|
|
8
|
-
type AnyNode = import("
|
|
7
|
+
type Tag = import("../types").Tag;
|
|
8
|
+
type AnyNode = import("../types").AnyNode;
|
|
9
9
|
//# sourceMappingURL=require-meta-charset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-meta-charset.d.ts","sourceRoot":"","sources":["../../lib/rules/require-meta-charset.js"],"names":[],"mappings":";;;wBAwBU,UAAU;;kBAvBN,OAAO,UAAU,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"require-meta-charset.d.ts","sourceRoot":"","sources":["../../lib/rules/require-meta-charset.js"],"names":[],"mappings":";;;wBAwBU,UAAU;;kBAvBN,OAAO,UAAU,EAAE,UAAU;WAC7B,OAAO,UAAU,EAAE,GAAG;eACtB,OAAO,UAAU,EAAE,OAAO"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare namespace _exports {
|
|
2
|
-
export { RuleModule,
|
|
2
|
+
export { RuleModule, Tag, AnyNode };
|
|
3
3
|
}
|
|
4
4
|
declare const _exports: RuleModule;
|
|
5
5
|
export = _exports;
|
|
6
6
|
type RuleModule = import("../types").RuleModule;
|
|
7
|
-
type
|
|
8
|
-
type AnyNode = import("
|
|
7
|
+
type Tag = import("../types").Tag;
|
|
8
|
+
type AnyNode = import("../types").AnyNode;
|
|
9
9
|
//# sourceMappingURL=require-meta-description.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-meta-description.d.ts","sourceRoot":"","sources":["../../lib/rules/require-meta-description.js"],"names":[],"mappings":";;;wBAuBU,UAAU;;kBAtBN,OAAO,UAAU,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"require-meta-description.d.ts","sourceRoot":"","sources":["../../lib/rules/require-meta-description.js"],"names":[],"mappings":";;;wBAuBU,UAAU;;kBAtBN,OAAO,UAAU,EAAE,UAAU;WAC7B,OAAO,UAAU,EAAE,GAAG;eACtB,OAAO,UAAU,EAAE,OAAO"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare namespace _exports {
|
|
2
|
-
export { RuleModule,
|
|
2
|
+
export { RuleModule, Tag, AnyNode };
|
|
3
3
|
}
|
|
4
4
|
declare const _exports: RuleModule;
|
|
5
5
|
export = _exports;
|
|
6
6
|
type RuleModule = import("../types").RuleModule;
|
|
7
|
-
type
|
|
8
|
-
type AnyNode = import("
|
|
7
|
+
type Tag = import("../types").Tag;
|
|
8
|
+
type AnyNode = import("../types").AnyNode;
|
|
9
9
|
//# sourceMappingURL=require-meta-viewport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-meta-viewport.d.ts","sourceRoot":"","sources":["../../lib/rules/require-meta-viewport.js"],"names":[],"mappings":";;;wBAgCU,UAAU;;kBA/BN,OAAO,UAAU,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"require-meta-viewport.d.ts","sourceRoot":"","sources":["../../lib/rules/require-meta-viewport.js"],"names":[],"mappings":";;;wBAgCU,UAAU;;kBA/BN,OAAO,UAAU,EAAE,UAAU;WAC7B,OAAO,UAAU,EAAE,GAAG;eACtB,OAAO,UAAU,EAAE,OAAO"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare namespace _exports {
|
|
2
|
-
export { RuleModule,
|
|
2
|
+
export { RuleModule, Tag, AnyNode };
|
|
3
3
|
}
|
|
4
4
|
declare const _exports: RuleModule;
|
|
5
5
|
export = _exports;
|
|
6
6
|
type RuleModule = import("../types").RuleModule;
|
|
7
|
-
type
|
|
8
|
-
type AnyNode = import("
|
|
7
|
+
type Tag = import("../types").Tag;
|
|
8
|
+
type AnyNode = import("../types").AnyNode;
|
|
9
9
|
//# sourceMappingURL=require-open-graph-protocol.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-open-graph-protocol.d.ts","sourceRoot":"","sources":["../../lib/rules/require-open-graph-protocol.js"],"names":[],"mappings":";;;wBAkCU,UAAU;;kBAjCN,OAAO,UAAU,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"require-open-graph-protocol.d.ts","sourceRoot":"","sources":["../../lib/rules/require-open-graph-protocol.js"],"names":[],"mappings":";;;wBAkCU,UAAU;;kBAjCN,OAAO,UAAU,EAAE,UAAU;WAC7B,OAAO,UAAU,EAAE,GAAG;eACrB,OAAO,UAAU,EAAE,OAAO"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare namespace _exports {
|
|
2
|
-
export { RuleModule,
|
|
2
|
+
export { RuleModule, Tag, Text, AnyNode };
|
|
3
3
|
}
|
|
4
4
|
declare const _exports: RuleModule;
|
|
5
5
|
export = _exports;
|
|
6
6
|
type RuleModule = import("../types").RuleModule;
|
|
7
|
-
type
|
|
8
|
-
type
|
|
9
|
-
type AnyNode = import("
|
|
7
|
+
type Tag = import("../types").Tag;
|
|
8
|
+
type Text = import("../types").Text;
|
|
9
|
+
type AnyNode = import("../types").AnyNode;
|
|
10
10
|
//# sourceMappingURL=require-title.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-title.d.ts","sourceRoot":"","sources":["../../lib/rules/require-title.js"],"names":[],"mappings":";;;wBAiCU,UAAU;;kBAhCN,OAAO,UAAU,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"require-title.d.ts","sourceRoot":"","sources":["../../lib/rules/require-title.js"],"names":[],"mappings":";;;wBAiCU,UAAU;;kBAhCN,OAAO,UAAU,EAAE,UAAU;WAC7B,OAAO,UAAU,EAAE,GAAG;YACtB,OAAO,UAAU,EAAE,IAAI;eACvB,OAAO,UAAU,EAAE,OAAO"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare namespace _exports {
|
|
2
|
-
export {
|
|
2
|
+
export { RuleFixer, RuleModule, Attribute, Text };
|
|
3
3
|
}
|
|
4
4
|
declare const _exports: RuleModule;
|
|
5
5
|
export = _exports;
|
|
6
|
+
type RuleFixer = import("eslint").Rule.RuleFixer;
|
|
6
7
|
type RuleModule = import("../types").RuleModule;
|
|
7
|
-
type
|
|
8
|
-
type
|
|
9
|
-
type RuleFixer = import("../types").RuleFixer;
|
|
8
|
+
type Attribute = import("../types").Attribute;
|
|
9
|
+
type Text = import("../types").Text;
|
|
10
10
|
//# sourceMappingURL=sort-attrs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort-attrs.d.ts","sourceRoot":"","sources":["../../lib/rules/sort-attrs.js"],"names":[],"mappings":";;;wBAgBU,UAAU;;
|
|
1
|
+
{"version":3,"file":"sort-attrs.d.ts","sourceRoot":"","sources":["../../lib/rules/sort-attrs.js"],"names":[],"mappings":";;;wBAgBU,UAAU;;iBAfN,OAAO,QAAQ,EAAE,IAAI,CAAC,SAAS;kBAC/B,OAAO,UAAU,EAAE,UAAU;iBAC7B,OAAO,UAAU,EAAE,SAAS;YAC5B,OAAO,UAAU,EAAE,IAAI"}
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
1
|
+
export type Attribute = import("../../types").Attribute;
|
|
2
|
+
export type Tag = import("../../types").Tag;
|
|
3
|
+
export type ScriptTag = import("../../types").ScriptTag;
|
|
4
|
+
export type StyleTag = import("../../types").StyleTag;
|
|
5
|
+
export type Line = import("../../types").Line;
|
|
6
|
+
export type Text = import("../../types").Text;
|
|
7
|
+
export type CommentContent = import("../../types").CommentContent;
|
|
8
|
+
export type Comment = import("../../types").Comment;
|
|
9
|
+
export type AnyNode = import("../../types").AnyNode;
|
|
10
|
+
export type AttributeValue = import("../../types").AttributeValue;
|
|
11
|
+
export type Range = import("eslint").AST.Range;
|
|
12
|
+
export type SourceLocation = import("eslint").AST.SourceLocation;
|
|
10
13
|
export type AnyToken = import("es-html-parser").AnyToken;
|
|
11
|
-
export type LineNode = import("../../types").LineNode;
|
|
12
|
-
export type BaseNode = import("../../types").BaseNode;
|
|
13
|
-
export type Location = import("../../types").Location;
|
|
14
|
-
export type Range = import("../../types").Range;
|
|
15
14
|
/**
|
|
16
|
-
* @param {
|
|
15
|
+
* @param {Tag | ScriptTag | StyleTag} node
|
|
17
16
|
* @param {string} key
|
|
18
|
-
* @returns {
|
|
17
|
+
* @returns {Attribute | undefined}
|
|
19
18
|
*/
|
|
20
|
-
export function findAttr(node:
|
|
19
|
+
export function findAttr(node: Tag | ScriptTag | StyleTag, key: string): Attribute | undefined;
|
|
21
20
|
/**
|
|
22
21
|
* Checks whether a node's attributes is empty or not.
|
|
23
|
-
* @param {
|
|
22
|
+
* @param {Tag | ScriptTag | StyleTag} node
|
|
24
23
|
* @returns {boolean}
|
|
25
24
|
*/
|
|
26
|
-
export function isAttributesEmpty(node:
|
|
25
|
+
export function isAttributesEmpty(node: Tag | ScriptTag | StyleTag): boolean;
|
|
27
26
|
/**
|
|
28
27
|
* Checks whether a node's all tokens are on the same line or not.
|
|
29
28
|
* @param {AnyNode} node A node to check
|
|
@@ -32,43 +31,63 @@ export function isAttributesEmpty(node: TagNode | ScriptTagNode | StyleTagNode):
|
|
|
32
31
|
export function isNodeTokensOnSameLine(node: AnyNode): boolean;
|
|
33
32
|
/**
|
|
34
33
|
*
|
|
35
|
-
* @param {
|
|
36
|
-
* @returns {
|
|
34
|
+
* @param {Text | CommentContent} node
|
|
35
|
+
* @returns {Line[]}
|
|
37
36
|
*/
|
|
38
|
-
export function splitToLineNodes(node:
|
|
37
|
+
export function splitToLineNodes(node: Text | CommentContent): Line[];
|
|
39
38
|
/**
|
|
40
39
|
* Get location between two nodes.
|
|
41
|
-
* @param {
|
|
42
|
-
* @param {
|
|
43
|
-
* @returns {
|
|
40
|
+
* @param {{loc: SourceLocation}} before A node placed in before
|
|
41
|
+
* @param {{loc: SourceLocation}} after A node placed in after
|
|
42
|
+
* @returns {SourceLocation} location between two nodes.
|
|
44
43
|
*/
|
|
45
|
-
export function getLocBetween(before:
|
|
44
|
+
export function getLocBetween(before: {
|
|
45
|
+
loc: SourceLocation;
|
|
46
|
+
}, after: {
|
|
47
|
+
loc: SourceLocation;
|
|
48
|
+
}): SourceLocation;
|
|
46
49
|
/**
|
|
47
|
-
* @param {
|
|
50
|
+
* @param {Exclude<AnyNode, Line>} node
|
|
51
|
+
* @param {(node: AnyNode) => boolean} predicate
|
|
52
|
+
* @returns {null | AnyNode}
|
|
53
|
+
*/
|
|
54
|
+
export function findParent(node: Exclude<AnyNode, Line>, predicate: (node: AnyNode) => boolean): null | AnyNode;
|
|
55
|
+
/**
|
|
56
|
+
* @param {AttributeValue} node
|
|
48
57
|
* @return {boolean}
|
|
49
58
|
*/
|
|
50
|
-
export function isExpressionInTemplate(node:
|
|
59
|
+
export function isExpressionInTemplate(node: AttributeValue): boolean;
|
|
51
60
|
/**
|
|
52
61
|
* @param {AnyNode} node
|
|
53
|
-
* @returns {node is
|
|
62
|
+
* @returns {node is Tag}
|
|
54
63
|
*/
|
|
55
|
-
export function isTag(node: AnyNode): node is
|
|
64
|
+
export function isTag(node: AnyNode): node is Tag;
|
|
56
65
|
/**
|
|
57
66
|
* @param {AnyNode} node
|
|
58
|
-
* @returns {node is
|
|
67
|
+
* @returns {node is Comment}
|
|
68
|
+
*/
|
|
69
|
+
export function isComment(node: AnyNode): node is Comment;
|
|
70
|
+
/**
|
|
71
|
+
* @param {AnyNode} node
|
|
72
|
+
* @returns {node is Text}
|
|
73
|
+
*/
|
|
74
|
+
export function isText(node: AnyNode): node is Text;
|
|
75
|
+
/**
|
|
76
|
+
* @param {AnyNode | Line} node
|
|
77
|
+
* @returns {node is Line}
|
|
59
78
|
*/
|
|
60
|
-
export function
|
|
79
|
+
export function isLine(node: AnyNode | Line): node is Line;
|
|
61
80
|
/**
|
|
62
81
|
* @param {AnyNode} node
|
|
63
|
-
* @returns {node is
|
|
82
|
+
* @returns {node is ScriptTag}
|
|
64
83
|
*/
|
|
65
|
-
export function
|
|
84
|
+
export function isScript(node: AnyNode): node is ScriptTag;
|
|
66
85
|
/**
|
|
67
|
-
* @param {(
|
|
86
|
+
* @param {(Text | CommentContent)['templates']} templates
|
|
68
87
|
* @param {Range} range
|
|
69
88
|
* @returns {boolean}
|
|
70
89
|
*/
|
|
71
|
-
export function isOverlapWithTemplates(templates: (
|
|
90
|
+
export function isOverlapWithTemplates(templates: (Text | CommentContent)["templates"], range: Range): boolean;
|
|
72
91
|
/**
|
|
73
92
|
* @param {string} source
|
|
74
93
|
* @returns {string[]}
|
|
@@ -84,7 +103,7 @@ export function isRangesOverlap(rangeA: Range, rangeB: Range): boolean;
|
|
|
84
103
|
/**
|
|
85
104
|
*
|
|
86
105
|
* @param {AnyToken[]} tokens
|
|
87
|
-
* @returns {((
|
|
106
|
+
* @returns {((CommentContent | Text)['templates'][number])[]}
|
|
88
107
|
*/
|
|
89
|
-
export function getTemplateTokens(tokens: AnyToken[]): ((
|
|
108
|
+
export function getTemplateTokens(tokens: AnyToken[]): ((CommentContent | Text)["templates"][number])[];
|
|
90
109
|
//# sourceMappingURL=node.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/node.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/node.js"],"names":[],"mappings":"wBACc,OAAO,aAAa,EAAE,SAAS;kBAC/B,OAAO,aAAa,EAAE,GAAG;wBACzB,OAAO,aAAa,EAAE,SAAS;uBAC/B,OAAO,aAAa,EAAE,QAAQ;mBAC9B,OAAO,aAAa,EAAE,IAAI;mBAC1B,OAAO,aAAa,EAAE,IAAI;6BAC1B,OAAO,aAAa,EAAE,cAAc;sBACpC,OAAO,aAAa,EAAE,OAAO;sBAC7B,OAAO,aAAa,EAAE,OAAO;6BAC7B,OAAO,aAAa,EAAE,cAAc;oBACpC,OAAO,QAAQ,EAAE,GAAG,CAAC,KAAK;6BAC1B,OAAO,QAAQ,EAAE,GAAG,CAAC,cAAc;uBACnC,OAAO,gBAAgB,EAAE,QAAQ;AAM/C;;;;GAIG;AACH,+BAJW,GAAG,GAAG,SAAS,GAAG,QAAQ,OAC1B,MAAM,GACJ,SAAS,GAAG,SAAS,CAMjC;AAED;;;;GAIG;AACH,wCAHW,GAAG,GAAG,SAAS,GAAG,QAAQ,GACxB,OAAO,CAInB;AAED;;;;GAIG;AACH,6CAHW,OAAO,GACL,OAAO,CAInB;AAuBD;;;;GAIG;AACH,uCAHW,IAAI,GAAG,cAAc,GACnB,IAAI,EAAE,CAwDlB;AAED;;;;;GAKG;AACH,sCAJW;IAAC,GAAG,EAAE,cAAc,CAAA;CAAC,SACrB;IAAC,GAAG,EAAE,cAAc,CAAA;CAAC,GACnB,cAAc,CAO1B;AA+DD;;;;GAIG;AACH,iCAJW,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,aACtB,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,GACxB,IAAI,GAAG,OAAO,CAgB1B;AAhFD;;;GAGG;AACH,6CAHW,cAAc,GACb,OAAO,CAOlB;AAED;;;GAGG;AACH,4BAHW,OAAO,GACL,IAAI,IAAI,GAAG,CAIvB;AAUD;;;GAGG;AACH,gCAHW,OAAO,GACL,IAAI,IAAI,OAAO,CAI3B;AAED;;;GAGG;AACH,6BAHW,OAAO,GACL,IAAI,IAAI,IAAI,CAIxB;AAED;;;GAGG;AACH,6BAHW,OAAO,GAAG,IAAI,GACZ,IAAI,IAAI,IAAI,CAIxB;AA9BD;;;GAGG;AACH,+BAHW,OAAO,GACL,IAAI,IAAI,SAAS,CAI7B;AA9GD;;;;GAIG;AACH,kDAJW,CAAC,IAAI,GAAG,cAAc,CAAC,CAAC,WAAW,CAAC,SACpC,KAAK,GACH,OAAO,CAMnB;AAiID;;;GAGG;AACH,oCAHW,MAAM,GACJ,MAAM,EAAE,CAIpB;AA1JD;;;;;GAKG;AACH,wCAJW,KAAK,UACL,KAAK,GACH,OAAO,CAInB;AAyKD;;;;GAIG;AACH,0CAHW,QAAQ,EAAE,GACR,CAAC,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAa5D"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type MaybeHTMLSettings = import("../../types").MaybeHTMLSettings;
|
|
2
2
|
export type HTMLSettings = import("../../types").HTMLSettings;
|
|
3
3
|
export type Context = import("../../types").Context;
|
|
4
|
-
export type TaggedTemplateExpression = import("
|
|
5
|
-
export type TemplateLiteral = import("
|
|
4
|
+
export type TaggedTemplateExpression = import("../../types").TaggedTemplateExpression;
|
|
5
|
+
export type TemplateLiteral = import("../../types").TemplateLiteral;
|
|
6
6
|
/**
|
|
7
7
|
*
|
|
8
8
|
* @param {TemplateLiteral} node
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/settings.js"],"names":[],"mappings":"gCACa,OAAO,aAAa,EAAE,iBAAiB;2BACvC,OAAO,aAAa,EAAE,YAAY;sBAClC,OAAO,aAAa,EAAE,OAAO;uCAC7B,OAAO,
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/settings.js"],"names":[],"mappings":"gCACa,OAAO,aAAa,EAAE,iBAAiB;2BACvC,OAAO,aAAa,EAAE,YAAY;sBAClC,OAAO,aAAa,EAAE,OAAO;uCAC7B,OAAO,aAAa,EAAE,wBAAwB;8BAC9C,OAAO,aAAa,EAAE,eAAe;AA8DlD;;;;;GAKG;AACH,iDAJW,eAAe,WACf,OAAO,GACL,OAAO,CAWnB;AA7BD;;;;GAIG;AACH,0DAJW,wBAAwB,WACxB,OAAO,GACL,OAAO,CASnB"}
|
|
@@ -5,5 +5,5 @@ export type Context = import("../../types").Context;
|
|
|
5
5
|
/**
|
|
6
6
|
* @param {Context} context
|
|
7
7
|
*/
|
|
8
|
-
export function getSourceCode(context: Context):
|
|
8
|
+
export function getSourceCode(context: Context): any;
|
|
9
9
|
//# sourceMappingURL=source-code.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-code.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/source-code.js"],"names":[],"mappings":"sBACa,OAAO,aAAa,EAAE,OAAO;AAD1C;;GAEG;AAEH;;GAEG;AACH,uCAFW,OAAO
|
|
1
|
+
{"version":3,"file":"source-code.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/source-code.js"],"names":[],"mappings":"sBACa,OAAO,aAAa,EAAE,OAAO;AAD1C;;GAEG;AAEH;;GAEG;AACH,uCAFW,OAAO,OAIjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitors.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/visitors.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"visitors.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/visitors.js"],"names":[],"mappings":"sBACc,OAAO,aAAa,EAAE,OAAO;2BAC7B,OAAO,aAAa,EAAE,YAAY;AA8BhD;;;;;GAKG;AACH,wCALW,OAAO,YACP,YAAY,qBACZ,GAAG,GACD,YAAY,CAWxB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type MaybeHTMLSettings = {
|
|
2
|
+
templateLiterals?: {
|
|
3
|
+
tags?: string[];
|
|
4
|
+
comments?: string[];
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export type HTMLSettings = {
|
|
8
|
+
templateLiterals: {
|
|
9
|
+
tags: RegExp[];
|
|
10
|
+
comments: RegExp[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../lib/types/settings.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,gBAAgB,CAAC,EAAE;QACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,gBAAgB,EAAE;QAChB,IAAI,EAAE,MAAM,EAAE,CAAC;QACf,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;CACH,CAAC"}
|