@html-eslint/eslint-plugin 0.42.0 → 0.43.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/languages/html-language.js +3 -3
- package/lib/languages/html-source-code.js +9 -11
- package/lib/languages/html-traversal-step.js +4 -3
- package/lib/rules/attrs-newline.js +3 -4
- package/lib/rules/element-newline.js +4 -14
- package/lib/rules/id-naming-convention.js +3 -6
- package/lib/rules/indent/indent-level.js +1 -1
- package/lib/rules/indent/indent.js +18 -23
- package/lib/rules/lowercase.js +3 -5
- package/lib/rules/max-element-depth.js +3 -5
- package/lib/rules/no-abstract-roles.js +3 -5
- package/lib/rules/no-accesskey-attrs.js +3 -5
- package/lib/rules/no-aria-hidden-body.js +2 -2
- package/lib/rules/no-aria-hidden-on-focusable.js +3 -3
- package/lib/rules/no-duplicate-attrs.js +3 -7
- package/lib/rules/no-duplicate-class.js +3 -6
- package/lib/rules/no-duplicate-id.js +6 -9
- package/lib/rules/no-duplicate-in-head.js +6 -9
- package/lib/rules/no-empty-headings.js +3 -4
- package/lib/rules/no-extra-spacing-attrs.js +4 -14
- package/lib/rules/no-extra-spacing-text.js +3 -9
- package/lib/rules/no-heading-inside-button.js +2 -2
- package/lib/rules/no-inline-styles.js +2 -2
- package/lib/rules/no-invalid-entity.js +3 -4
- package/lib/rules/no-invalid-role.js +2 -2
- package/lib/rules/no-multiple-empty-lines.js +10 -11
- package/lib/rules/no-multiple-h1.js +3 -3
- package/lib/rules/no-nested-interactive.js +3 -3
- package/lib/rules/no-non-scalable-viewport.js +2 -2
- package/lib/rules/no-obsolete-tags.js +2 -2
- package/lib/rules/no-positive-tabindex.js +3 -5
- package/lib/rules/no-restricted-attr-values.js +4 -6
- package/lib/rules/no-restricted-attrs.js +4 -6
- package/lib/rules/no-script-style-type.js +3 -5
- package/lib/rules/no-skip-heading-levels.js +3 -3
- package/lib/rules/no-target-blank.js +2 -2
- package/lib/rules/no-trailing-spaces.js +10 -9
- package/lib/rules/prefer-https.js +3 -6
- package/lib/rules/quotes.js +25 -10
- package/lib/rules/require-attrs.js +3 -8
- package/lib/rules/require-button-type.js +3 -4
- package/lib/rules/require-closing-tags.js +3 -3
- package/lib/rules/require-doctype.js +2 -2
- package/lib/rules/require-explicit-size.js +2 -5
- package/lib/rules/require-form-method.js +2 -2
- package/lib/rules/require-frame-title.js +2 -2
- package/lib/rules/require-img-alt.js +4 -4
- package/lib/rules/require-input-label.js +3 -3
- package/lib/rules/require-lang.js +2 -2
- package/lib/rules/require-li-container.js +2 -2
- package/lib/rules/require-meta-charset.js +3 -4
- package/lib/rules/require-meta-description.js +3 -4
- package/lib/rules/require-meta-viewport.js +3 -4
- package/lib/rules/require-open-graph-protocol.js +3 -6
- package/lib/rules/require-title.js +3 -5
- package/lib/rules/sort-attrs.js +4 -5
- package/lib/rules/use-baseline.js +3 -6
- package/lib/rules/utils/baseline.js +7 -4
- package/lib/rules/utils/node.js +11 -26
- package/lib/rules/utils/settings.js +4 -7
- package/lib/rules/utils/source-code.js +2 -2
- package/lib/rules/utils/template-literal.js +43 -0
- package/lib/rules/utils/visitors.js +6 -7
- package/package.json +6 -6
- package/types/languages/html-language.d.ts +0 -5
- package/types/languages/html-language.d.ts.map +1 -1
- package/types/languages/html-source-code.d.ts +13 -14
- package/types/languages/html-source-code.d.ts.map +1 -1
- package/types/languages/html-traversal-step.d.ts +5 -5
- package/types/languages/html-traversal-step.d.ts.map +1 -1
- package/types/rules/attrs-newline.d.ts +3 -4
- package/types/rules/attrs-newline.d.ts.map +1 -1
- package/types/rules/element-newline.d.ts +5 -13
- package/types/rules/element-newline.d.ts.map +1 -1
- package/types/rules/id-naming-convention.d.ts +3 -6
- package/types/rules/id-naming-convention.d.ts.map +1 -1
- package/types/rules/indent/indent-level.d.ts +3 -3
- package/types/rules/indent/indent-level.d.ts.map +1 -1
- package/types/rules/indent/indent.d.ts +5 -18
- package/types/rules/indent/indent.d.ts.map +1 -1
- package/types/rules/lowercase.d.ts +2 -8
- package/types/rules/lowercase.d.ts.map +1 -1
- package/types/rules/max-element-depth.d.ts +3 -6
- package/types/rules/max-element-depth.d.ts.map +1 -1
- package/types/rules/no-abstract-roles.d.ts +2 -8
- package/types/rules/no-abstract-roles.d.ts.map +1 -1
- package/types/rules/no-accesskey-attrs.d.ts +2 -8
- package/types/rules/no-accesskey-attrs.d.ts.map +1 -1
- package/types/rules/no-aria-hidden-body.d.ts +2 -5
- package/types/rules/no-aria-hidden-body.d.ts.map +1 -1
- package/types/rules/no-aria-hidden-on-focusable.d.ts +2 -6
- package/types/rules/no-aria-hidden-on-focusable.d.ts.map +1 -1
- package/types/rules/no-duplicate-attrs.d.ts +2 -10
- package/types/rules/no-duplicate-attrs.d.ts.map +1 -1
- package/types/rules/no-duplicate-class.d.ts +3 -7
- package/types/rules/no-duplicate-class.d.ts.map +1 -1
- package/types/rules/no-duplicate-id.d.ts +2 -9
- package/types/rules/no-duplicate-id.d.ts.map +1 -1
- package/types/rules/no-duplicate-in-head.d.ts +2 -9
- package/types/rules/no-duplicate-in-head.d.ts.map +1 -1
- package/types/rules/no-empty-headings.d.ts +2 -7
- package/types/rules/no-empty-headings.d.ts.map +1 -1
- package/types/rules/no-extra-spacing-attrs.d.ts +3 -14
- package/types/rules/no-extra-spacing-attrs.d.ts.map +1 -1
- package/types/rules/no-extra-spacing-text.d.ts +3 -9
- package/types/rules/no-extra-spacing-text.d.ts.map +1 -1
- package/types/rules/no-heading-inside-button.d.ts +2 -5
- package/types/rules/no-heading-inside-button.d.ts.map +1 -1
- package/types/rules/no-inline-styles.d.ts +2 -5
- package/types/rules/no-inline-styles.d.ts.map +1 -1
- package/types/rules/no-invalid-entity.d.ts +3 -5
- package/types/rules/no-invalid-entity.d.ts.map +1 -1
- package/types/rules/no-invalid-role.d.ts +2 -5
- package/types/rules/no-invalid-role.d.ts.map +1 -1
- package/types/rules/no-multiple-empty-lines.d.ts +3 -7
- package/types/rules/no-multiple-empty-lines.d.ts.map +1 -1
- package/types/rules/no-multiple-h1.d.ts +2 -6
- package/types/rules/no-multiple-h1.d.ts.map +1 -1
- package/types/rules/no-nested-interactive.d.ts +2 -6
- package/types/rules/no-nested-interactive.d.ts.map +1 -1
- package/types/rules/no-non-scalable-viewport.d.ts +2 -5
- package/types/rules/no-non-scalable-viewport.d.ts.map +1 -1
- package/types/rules/no-obsolete-tags.d.ts +2 -5
- package/types/rules/no-obsolete-tags.d.ts.map +1 -1
- package/types/rules/no-positive-tabindex.d.ts +2 -8
- package/types/rules/no-positive-tabindex.d.ts.map +1 -1
- package/types/rules/no-restricted-attr-values.d.ts +3 -7
- package/types/rules/no-restricted-attr-values.d.ts.map +1 -1
- package/types/rules/no-restricted-attrs.d.ts +3 -7
- package/types/rules/no-restricted-attrs.d.ts.map +1 -1
- package/types/rules/no-script-style-type.d.ts +2 -8
- package/types/rules/no-script-style-type.d.ts.map +1 -1
- package/types/rules/no-skip-heading-levels.d.ts +2 -6
- package/types/rules/no-skip-heading-levels.d.ts.map +1 -1
- package/types/rules/no-target-blank.d.ts +2 -5
- package/types/rules/no-target-blank.d.ts.map +1 -1
- package/types/rules/no-trailing-spaces.d.ts +2 -7
- package/types/rules/no-trailing-spaces.d.ts.map +1 -1
- package/types/rules/prefer-https.d.ts +2 -9
- package/types/rules/prefer-https.d.ts.map +1 -1
- package/types/rules/quotes.d.ts +7 -9
- package/types/rules/quotes.d.ts.map +1 -1
- package/types/rules/require-attrs.d.ts +3 -8
- package/types/rules/require-attrs.d.ts.map +1 -1
- package/types/rules/require-button-type.d.ts +2 -7
- package/types/rules/require-button-type.d.ts.map +1 -1
- package/types/rules/require-closing-tags.d.ts +3 -4
- package/types/rules/require-closing-tags.d.ts.map +1 -1
- package/types/rules/require-doctype.d.ts +2 -5
- package/types/rules/require-doctype.d.ts.map +1 -1
- package/types/rules/require-explicit-size.d.ts +3 -5
- package/types/rules/require-explicit-size.d.ts.map +1 -1
- package/types/rules/require-form-method.d.ts +2 -5
- package/types/rules/require-form-method.d.ts.map +1 -1
- package/types/rules/require-frame-title.d.ts +2 -5
- package/types/rules/require-frame-title.d.ts.map +1 -1
- package/types/rules/require-img-alt.d.ts +3 -4
- package/types/rules/require-img-alt.d.ts.map +1 -1
- package/types/rules/require-input-label.d.ts +2 -6
- package/types/rules/require-input-label.d.ts.map +1 -1
- package/types/rules/require-lang.d.ts +2 -5
- package/types/rules/require-lang.d.ts.map +1 -1
- package/types/rules/require-li-container.d.ts +2 -5
- package/types/rules/require-li-container.d.ts.map +1 -1
- package/types/rules/require-meta-charset.d.ts +2 -7
- package/types/rules/require-meta-charset.d.ts.map +1 -1
- package/types/rules/require-meta-description.d.ts +2 -7
- package/types/rules/require-meta-description.d.ts.map +1 -1
- package/types/rules/require-meta-viewport.d.ts +2 -7
- package/types/rules/require-meta-viewport.d.ts.map +1 -1
- package/types/rules/require-open-graph-protocol.d.ts +3 -5
- package/types/rules/require-open-graph-protocol.d.ts.map +1 -1
- package/types/rules/require-title.d.ts +2 -8
- package/types/rules/require-title.d.ts.map +1 -1
- package/types/rules/sort-attrs.d.ts +3 -6
- package/types/rules/sort-attrs.d.ts.map +1 -1
- package/types/rules/use-baseline.d.ts +3 -7
- package/types/rules/use-baseline.d.ts.map +1 -1
- package/types/rules/utils/baseline.d.ts.map +1 -1
- package/types/rules/utils/node.d.ts +25 -29
- package/types/rules/utils/node.d.ts.map +1 -1
- package/types/rules/utils/settings.d.ts +7 -9
- package/types/rules/utils/settings.d.ts.map +1 -1
- package/types/rules/utils/source-code.d.ts +4 -4
- package/types/rules/utils/source-code.d.ts.map +1 -1
- package/types/rules/utils/template-literal.d.ts +18 -0
- package/types/rules/utils/template-literal.d.ts.map +1 -0
- package/types/rules/utils/visitors.d.ts +4 -4
- package/types/rules/utils/visitors.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/node.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node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,0CAHW,QAAQ,EAAE,GACR,CAAC,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAaxD;AAlLD;;;GAGG;AACH,kCAHW,YAAY,GAAG,cAAc,GAAG,IAAI,GAAG,cAAc,GACnD,OAAO,CAInB;yBA/DqI,oBAAoB;+BAApB,oBAAoB;8BAApB,oBAAoB;+BAApB,oBAAoB;6BAApB,oBAAoB;0BAApB,oBAAoB;oCAApB,oBAAoB;0BACzH,aAAa;yBACxB,QAAQ;8BADG,aAAa;6BADwF,oBAAoB;8BAApB,oBAAoB;kCAApB,oBAAoB;oCAApB,oBAAoB"}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
export type MaybeHTMLSettings = import("../../types").MaybeHTMLSettings;
|
|
2
|
-
export type HTMLSettings = import("../../types").HTMLSettings;
|
|
3
|
-
export type Context = import("../../types").Context<any[]>;
|
|
4
|
-
export type TaggedTemplateExpression = import("@html-eslint/types").TaggedTemplateExpression;
|
|
5
|
-
export type TemplateLiteral = import("@html-eslint/types").TemplateLiteral;
|
|
6
1
|
/**
|
|
7
2
|
*
|
|
8
3
|
* @param {TemplateLiteral} node
|
|
9
|
-
* @param {Context} context
|
|
4
|
+
* @param {Context<any[]>} context
|
|
10
5
|
* @returns {boolean}
|
|
11
6
|
*/
|
|
12
|
-
export function shouldCheckTemplateLiteral(node: TemplateLiteral, context: Context): boolean;
|
|
7
|
+
export function shouldCheckTemplateLiteral(node: TemplateLiteral, context: Context<any[]>): boolean;
|
|
13
8
|
/**
|
|
14
9
|
* @param {TaggedTemplateExpression} node
|
|
15
|
-
* @param {Context} context
|
|
10
|
+
* @param {Context<any[]>} context
|
|
16
11
|
* @returns {boolean}
|
|
17
12
|
*/
|
|
18
|
-
export function shouldCheckTaggedTemplateExpression(node: TaggedTemplateExpression, context: Context): boolean;
|
|
13
|
+
export function shouldCheckTaggedTemplateExpression(node: TaggedTemplateExpression, context: Context<any[]>): boolean;
|
|
14
|
+
import type { TemplateLiteral } from "@html-eslint/types";
|
|
15
|
+
import type { Context } from "../../types";
|
|
16
|
+
import type { TaggedTemplateExpression } from "@html-eslint/types";
|
|
19
17
|
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/settings.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/settings.js"],"names":[],"mappings":"AAgEA;;;;;GAKG;AACH,iDAJW,eAAe,WACf,QAAQ,GAAG,EAAE,CAAC,GACZ,OAAO,CAWnB;AA7BD;;;;GAIG;AACH,0DAJW,wBAAwB,WACxB,QAAQ,GAAG,EAAE,CAAC,GACZ,OAAO,CASnB;qCA5D2D,oBAAoB;6BADrB,aAAa;8CACZ,oBAAoB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export type Context = import("../../types").Context<any[]>;
|
|
2
1
|
/**
|
|
3
|
-
* @
|
|
2
|
+
* @import {Context} from "../../types";
|
|
4
3
|
*/
|
|
5
4
|
/**
|
|
6
|
-
* @param {Context} context
|
|
5
|
+
* @param {Context<any[]>} context
|
|
7
6
|
*/
|
|
8
|
-
export function getSourceCode(context: Context): import("eslint").SourceCode;
|
|
7
|
+
export function getSourceCode(context: Context<any[]>): import("eslint").SourceCode;
|
|
8
|
+
import type { Context } from "../../types";
|
|
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":"
|
|
1
|
+
{"version":3,"file":"source-code.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/source-code.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,uCAFW,QAAQ,GAAG,EAAE,CAAC,+BAIxB;6BARyB,aAAa"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get or create cached parse result for a template literal.
|
|
3
|
+
* @param {TemplateLiteral} node
|
|
4
|
+
* @param {SourceCode} sourceCode
|
|
5
|
+
* @param {TemplateHTMLVisitor} [visitor]
|
|
6
|
+
* @returns {{ast: DocumentNode, html: string, tokens: AnyToken[]}}
|
|
7
|
+
*/
|
|
8
|
+
export function parseTemplateLiteral(node: TemplateLiteral, sourceCode: SourceCode, visitor?: TemplateHTMLVisitor): {
|
|
9
|
+
ast: DocumentNode;
|
|
10
|
+
html: string;
|
|
11
|
+
tokens: AnyToken[];
|
|
12
|
+
};
|
|
13
|
+
import type { TemplateLiteral } from "@html-eslint/types";
|
|
14
|
+
import type { SourceCode } from "eslint";
|
|
15
|
+
import type { TemplateHTMLVisitor } from "@html-eslint/template-parser";
|
|
16
|
+
import type { DocumentNode } from "es-html-parser";
|
|
17
|
+
import type { AnyToken } from "es-html-parser";
|
|
18
|
+
//# sourceMappingURL=template-literal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-literal.d.ts","sourceRoot":"","sources":["../../../lib/rules/utils/template-literal.js"],"names":[],"mappings":"AAgBA;;;;;;GAMG;AACH,2CALW,eAAe,cACf,UAAU,YACV,mBAAmB,GACjB;IAAC,GAAG,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,QAAQ,EAAE,CAAA;CAAC,CAmBjE;qCAvCiC,oBAAoB;gCAEzB,QAAQ;yCACC,8BAA8B;kCAF3B,gBAAgB;8BAAhB,gBAAgB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export type Context = import("../../types").Context<any[]>;
|
|
2
|
-
export type RuleListener = import("../../types").RuleListener;
|
|
3
1
|
/**
|
|
4
|
-
* @param {Context} context
|
|
2
|
+
* @param {Context<any[]>} context
|
|
5
3
|
* @param {RuleListener} visitors
|
|
6
4
|
* @param {any} [templateVisitors]
|
|
7
5
|
* @returns {RuleListener}
|
|
8
6
|
*/
|
|
9
|
-
export function createVisitors(context: Context
|
|
7
|
+
export function createVisitors(context: Context<any[]>, visitors: RuleListener, templateVisitors?: any): RuleListener;
|
|
8
|
+
import type { Context } from "../../types";
|
|
9
|
+
import type { RuleListener } from "../../types";
|
|
10
10
|
//# sourceMappingURL=visitors.d.ts.map
|
|
@@ -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":"AA+BA;;;;;GAKG;AACH,wCALW,QAAQ,GAAG,EAAE,CAAC,YACd,YAAY,qBACZ,GAAG,GACD,YAAY,CAWxB;6BA7CuC,aAAa;kCAAb,aAAa"}
|