html-validate 8.0.5 → 8.2.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/dist/cjs/browser.js +4 -2
- package/dist/cjs/browser.js.map +1 -1
- package/dist/cjs/cli.js +41 -15
- package/dist/cjs/cli.js.map +1 -1
- package/dist/cjs/core-browser.js +31 -0
- package/dist/cjs/core-browser.js.map +1 -0
- package/dist/cjs/{nodejs.js → core-nodejs.js} +54 -4
- package/dist/cjs/core-nodejs.js.map +1 -0
- package/dist/cjs/core.js +306 -269
- package/dist/cjs/core.js.map +1 -1
- package/dist/cjs/elements.js +24 -3
- package/dist/cjs/elements.js.map +1 -1
- package/dist/cjs/html-validate.js +6 -6
- package/dist/cjs/html-validate.js.map +1 -1
- package/dist/cjs/index.js +6 -6
- package/dist/cjs/jest-lib.js +6 -6
- package/dist/cjs/jest-lib.js.map +1 -1
- package/dist/cjs/jest.js +3 -3
- package/dist/cjs/meta-helper.js +16 -2
- package/dist/cjs/meta-helper.js.map +1 -1
- package/dist/cjs/test-utils.js +1 -1
- package/dist/cjs/test-utils.js.map +1 -1
- package/dist/cjs/tsdoc-metadata.json +1 -1
- package/dist/es/browser.js +4 -3
- package/dist/es/browser.js.map +1 -1
- package/dist/es/cli.js +39 -13
- package/dist/es/cli.js.map +1 -1
- package/dist/es/core-browser.js +29 -0
- package/dist/es/core-browser.js.map +1 -0
- package/dist/es/{nodejs.js → core-nodejs.js} +53 -5
- package/dist/es/core-nodejs.js.map +1 -0
- package/dist/es/core.js +304 -266
- package/dist/es/core.js.map +1 -1
- package/dist/es/elements.js +24 -3
- package/dist/es/elements.js.map +1 -1
- package/dist/es/html-validate.js +7 -7
- package/dist/es/html-validate.js.map +1 -1
- package/dist/es/index.js +4 -4
- package/dist/es/jest-lib.js +4 -4
- package/dist/es/jest-lib.js.map +1 -1
- package/dist/es/jest.js +3 -3
- package/dist/es/meta-helper.js +16 -2
- package/dist/es/meta-helper.js.map +1 -1
- package/dist/es/test-utils.js +1 -1
- package/dist/es/test-utils.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types/browser.d.ts +66 -74
- package/dist/types/index.d.ts +45 -77
- package/dist/types/jest.d.ts +4 -8
- package/package.json +22 -22
- package/dist/cjs/nodejs.js.map +0 -1
- package/dist/es/nodejs.js.map +0 -1
package/dist/types/browser.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare class Attribute {
|
|
|
25
25
|
* transformation (e.g. vuejs `:id` generating the `id` attribute) this
|
|
26
26
|
* parameter should be set to the attribute name of the source attribute (`:id`).
|
|
27
27
|
*/
|
|
28
|
-
constructor(key: string, value:
|
|
28
|
+
constructor(key: string, value: string | DynamicValue | null, keyLocation: Location_2, valueLocation: Location_2 | null, originalAttribute?: string);
|
|
29
29
|
/**
|
|
30
30
|
* Flag set to true if the attribute value is static.
|
|
31
31
|
*/
|
|
@@ -44,9 +44,7 @@ export declare class Attribute {
|
|
|
44
44
|
* it never matches.
|
|
45
45
|
* @returns `true` if attribute value matches pattern.
|
|
46
46
|
*/
|
|
47
|
-
valueMatches(pattern: RegExp, dynamicMatches?: boolean): boolean;
|
|
48
|
-
valueMatches(pattern: string, dynamicMatches?: boolean): boolean;
|
|
49
|
-
valueMatches(pattern: string[], dynamicMatches?: boolean): boolean;
|
|
47
|
+
valueMatches(pattern: RegExp | string | string[], dynamicMatches?: boolean): boolean;
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
/**
|
|
@@ -116,6 +114,31 @@ export declare function classifyNodeText(node: HtmlElement, options?: TextClassi
|
|
|
116
114
|
|
|
117
115
|
/* Excluded from this release type: CommentToken */
|
|
118
116
|
|
|
117
|
+
/**
|
|
118
|
+
* Tests if plugin is compatible with html-validate library. Unless the `silent`
|
|
119
|
+
* option is used a warning is displayed on the console.
|
|
120
|
+
*
|
|
121
|
+
* @public
|
|
122
|
+
* @since v5.0.0
|
|
123
|
+
* @param name - Name of plugin
|
|
124
|
+
* @param declared - What library versions the plugin support (e.g. declared peerDependencies)
|
|
125
|
+
* @returns - `true` if version is compatible
|
|
126
|
+
*/
|
|
127
|
+
export declare function compatibilityCheck(name: string, declared: string, options?: Partial<CompatibilityOptions>): boolean;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Options for {@link compatibilityCheck}.
|
|
131
|
+
*
|
|
132
|
+
* @public
|
|
133
|
+
*/
|
|
134
|
+
export declare interface CompatibilityOptions {
|
|
135
|
+
/** If `true` nothing no output will be generated on console. Default: `false` */
|
|
136
|
+
silent: boolean;
|
|
137
|
+
/* Excluded from this release type: version */
|
|
138
|
+
/** Use custom logging callback. Default: `console.error` */
|
|
139
|
+
logger(this: void, message: string): void;
|
|
140
|
+
}
|
|
141
|
+
|
|
119
142
|
/**
|
|
120
143
|
* Event emitted when Internet Explorer conditionals `<![if ...]>` are
|
|
121
144
|
* encountered.
|
|
@@ -340,9 +363,7 @@ export declare interface ConfigReadyEvent extends Event_2 {
|
|
|
340
363
|
/**
|
|
341
364
|
* @public
|
|
342
365
|
*/
|
|
343
|
-
declare
|
|
344
|
-
[key: string]: string;
|
|
345
|
-
}
|
|
366
|
+
declare type CSSStyleDeclaration_2 = Record<string, string>;
|
|
346
367
|
export { CSSStyleDeclaration_2 as CSSStyleDeclaration }
|
|
347
368
|
|
|
348
369
|
/**
|
|
@@ -647,9 +668,7 @@ export declare type EventCallback = (event: string, data: any) => void;
|
|
|
647
668
|
* @public
|
|
648
669
|
*/
|
|
649
670
|
export declare class EventHandler {
|
|
650
|
-
listeners:
|
|
651
|
-
[event: string]: EventCallback[];
|
|
652
|
-
};
|
|
671
|
+
listeners: Record<string, EventCallback[]>;
|
|
653
672
|
constructor();
|
|
654
673
|
/**
|
|
655
674
|
* Add an event listener.
|
|
@@ -694,11 +713,10 @@ export declare class HtmlElement extends DOMNode {
|
|
|
694
713
|
readonly voidElement: boolean;
|
|
695
714
|
readonly depth: number;
|
|
696
715
|
closed: NodeClosed;
|
|
697
|
-
protected readonly attr:
|
|
698
|
-
[key: string]: Attribute[];
|
|
699
|
-
};
|
|
716
|
+
protected readonly attr: Record<string, Attribute[]>;
|
|
700
717
|
private metaElement;
|
|
701
718
|
private annotation;
|
|
719
|
+
/* Excluded from this release type: _adapter */
|
|
702
720
|
constructor(tagName: string | undefined, parent: HtmlElement | null, closed: NodeClosed, meta: MetaElement | null, location: Location_2);
|
|
703
721
|
/* Excluded from this release type: rootNode */
|
|
704
722
|
/* Excluded from this release type: fromTokens */
|
|
@@ -864,6 +882,23 @@ export declare class HtmlElement extends DOMNode {
|
|
|
864
882
|
/* Excluded from this release type: find */
|
|
865
883
|
}
|
|
866
884
|
|
|
885
|
+
/**
|
|
886
|
+
* HTML5 interface for HTMLElement. Contains all the needed methods the
|
|
887
|
+
* HTML-Validate metadata requires to determine if usage is valid.
|
|
888
|
+
*
|
|
889
|
+
* While not officially supported, changes to this interface should be verified
|
|
890
|
+
* against browsers and/or jsdom, i.e. it should be possible to pass in either
|
|
891
|
+
* implementation and the element metadata should still work.
|
|
892
|
+
*
|
|
893
|
+
* @public
|
|
894
|
+
* @since 8.2.0
|
|
895
|
+
*/
|
|
896
|
+
export declare interface HtmlElementLike {
|
|
897
|
+
closest(selectors: string): HtmlElementLike | null | undefined;
|
|
898
|
+
getAttribute(name: string): string | DynamicValue | null | undefined;
|
|
899
|
+
hasAttribute(name: string): boolean;
|
|
900
|
+
}
|
|
901
|
+
|
|
867
902
|
/**
|
|
868
903
|
* Primary API for using HTML-validate.
|
|
869
904
|
*
|
|
@@ -1009,28 +1044,6 @@ export declare class HtmlValidate {
|
|
|
1009
1044
|
* configuration. As a rule-of-thumb, set it to the elements json file.
|
|
1010
1045
|
*/
|
|
1011
1046
|
getElementsSchemaSync(filename?: string): SchemaObject;
|
|
1012
|
-
/**
|
|
1013
|
-
* Get contextual documentation for the given rule. The default configuration
|
|
1014
|
-
* will be used.
|
|
1015
|
-
*
|
|
1016
|
-
* @example
|
|
1017
|
-
*
|
|
1018
|
-
* ```js
|
|
1019
|
-
* const report = await htmlvalidate.validateFile("my-file.html");
|
|
1020
|
-
* for (const result of report.results){
|
|
1021
|
-
* for (const message of result.messages){
|
|
1022
|
-
* const documentation = await htmlvalidate.getRuleDocumentation(message, result.filePath);
|
|
1023
|
-
* // do something with documentation
|
|
1024
|
-
* }
|
|
1025
|
-
* }
|
|
1026
|
-
* ```
|
|
1027
|
-
*
|
|
1028
|
-
* @public
|
|
1029
|
-
* @since 8.0.0
|
|
1030
|
-
* @param message - Message reported during validation
|
|
1031
|
-
* @returns Contextual documentation or `null` if the rule does not exist.
|
|
1032
|
-
*/
|
|
1033
|
-
getContextualDocumentation(message: Pick<Message, "ruleId" | "context">): Promise<RuleDocumentation | null>;
|
|
1034
1047
|
/**
|
|
1035
1048
|
* Get contextual documentation for the given rule. Configuration will be
|
|
1036
1049
|
* resolved for given filename.
|
|
@@ -1041,7 +1054,7 @@ export declare class HtmlValidate {
|
|
|
1041
1054
|
* const report = await htmlvalidate.validateFile("my-file.html");
|
|
1042
1055
|
* for (const result of report.results){
|
|
1043
1056
|
* for (const message of result.messages){
|
|
1044
|
-
* const documentation = await htmlvalidate.
|
|
1057
|
+
* const documentation = await htmlvalidate.getContextualDocumentation(message, result.filePath);
|
|
1045
1058
|
* // do something with documentation
|
|
1046
1059
|
* }
|
|
1047
1060
|
* }
|
|
@@ -1053,7 +1066,7 @@ export declare class HtmlValidate {
|
|
|
1053
1066
|
* @param filename - Filename used to resolve configuration.
|
|
1054
1067
|
* @returns Contextual documentation or `null` if the rule does not exist.
|
|
1055
1068
|
*/
|
|
1056
|
-
getContextualDocumentation(message: Pick<Message, "ruleId" | "context">, filename
|
|
1069
|
+
getContextualDocumentation(message: Pick<Message, "ruleId" | "context">, filename?: string): Promise<RuleDocumentation | null>;
|
|
1057
1070
|
/**
|
|
1058
1071
|
* Get contextual documentation for the given rule using provided
|
|
1059
1072
|
* configuration.
|
|
@@ -1077,28 +1090,6 @@ export declare class HtmlValidate {
|
|
|
1077
1090
|
* @returns Contextual documentation or `null` if the rule does not exist.
|
|
1078
1091
|
*/
|
|
1079
1092
|
getContextualDocumentation(message: Pick<Message, "ruleId" | "context">, config: ResolvedConfig | Promise<ResolvedConfig>): Promise<RuleDocumentation | null>;
|
|
1080
|
-
/**
|
|
1081
|
-
* Get contextual documentation for the given rule. The default configuration
|
|
1082
|
-
* will be used.
|
|
1083
|
-
*
|
|
1084
|
-
* @example
|
|
1085
|
-
*
|
|
1086
|
-
* ```js
|
|
1087
|
-
* const report = htmlvalidate.validateFileSync("my-file.html");
|
|
1088
|
-
* for (const result of report.results){
|
|
1089
|
-
* for (const message of result.messages){
|
|
1090
|
-
* const documentation = htmlvalidate.getRuleDocumentationSync(message, result.filePath);
|
|
1091
|
-
* // do something with documentation
|
|
1092
|
-
* }
|
|
1093
|
-
* }
|
|
1094
|
-
* ```
|
|
1095
|
-
*
|
|
1096
|
-
* @public
|
|
1097
|
-
* @since 8.0.0
|
|
1098
|
-
* @param message - Message reported during validation
|
|
1099
|
-
* @returns Contextual documentation or `null` if the rule does not exist.
|
|
1100
|
-
*/
|
|
1101
|
-
getContextualDocumentationSync(message: Pick<Message, "ruleId" | "context">): RuleDocumentation | null;
|
|
1102
1093
|
/**
|
|
1103
1094
|
* Get contextual documentation for the given rule. Configuration will be
|
|
1104
1095
|
* resolved for given filename.
|
|
@@ -1121,7 +1112,7 @@ export declare class HtmlValidate {
|
|
|
1121
1112
|
* @param filename - Filename used to resolve configuration.
|
|
1122
1113
|
* @returns Contextual documentation or `null` if the rule does not exist.
|
|
1123
1114
|
*/
|
|
1124
|
-
getContextualDocumentationSync(message: Pick<Message, "ruleId" | "context">, filename
|
|
1115
|
+
getContextualDocumentationSync(message: Pick<Message, "ruleId" | "context">, filename?: string): RuleDocumentation | null;
|
|
1125
1116
|
/**
|
|
1126
1117
|
* Get contextual documentation for the given rule using provided
|
|
1127
1118
|
* configuration.
|
|
@@ -1346,9 +1337,9 @@ export declare interface MetaAttribute {
|
|
|
1346
1337
|
*
|
|
1347
1338
|
* @public
|
|
1348
1339
|
* @param node - The node the attribute belongs to.
|
|
1349
|
-
* @param attr - The current attribute being validated.
|
|
1340
|
+
* @param attr - The current attribute value being validated.
|
|
1350
1341
|
*/
|
|
1351
|
-
export declare type MetaAttributeAllowedCallback = (node:
|
|
1342
|
+
export declare type MetaAttributeAllowedCallback = (node: HtmlElementLike, attr: string | DynamicValue | null | undefined) => string | null | undefined;
|
|
1352
1343
|
|
|
1353
1344
|
/**
|
|
1354
1345
|
* Properties listed here can be copied (loaded) onto another element using
|
|
@@ -1406,6 +1397,12 @@ export declare interface MetadataHelper {
|
|
|
1406
1397
|
allowedIfAttributeHasValue(this: void, attr: string, value: string[], options?: {
|
|
1407
1398
|
defaultValue?: string | null;
|
|
1408
1399
|
}): MetaAttributeAllowedCallback;
|
|
1400
|
+
/**
|
|
1401
|
+
* Returns an error if the node doesn't have any of the given elements as parent
|
|
1402
|
+
*
|
|
1403
|
+
* @since 8.2.0
|
|
1404
|
+
**/
|
|
1405
|
+
allowedIfParentIsPresent(this: void, ...tags: string[]): MetaAttributeAllowedCallback;
|
|
1409
1406
|
}
|
|
1410
1407
|
|
|
1411
1408
|
/**
|
|
@@ -1416,9 +1413,7 @@ export declare const metadataHelper: MetadataHelper;
|
|
|
1416
1413
|
/**
|
|
1417
1414
|
* @public
|
|
1418
1415
|
*/
|
|
1419
|
-
export declare
|
|
1420
|
-
[tagName: string]: MetaData;
|
|
1421
|
-
}
|
|
1416
|
+
export declare type MetaDataTable = Record<string, MetaData>;
|
|
1422
1417
|
|
|
1423
1418
|
/**
|
|
1424
1419
|
* @public
|
|
@@ -1675,7 +1670,7 @@ declare interface Plugin_2 {
|
|
|
1675
1670
|
*
|
|
1676
1671
|
* Called once per plugin during initialization.
|
|
1677
1672
|
*/
|
|
1678
|
-
init
|
|
1673
|
+
init?(): void;
|
|
1679
1674
|
/**
|
|
1680
1675
|
* Setup callback.
|
|
1681
1676
|
*
|
|
@@ -1685,7 +1680,7 @@ declare interface Plugin_2 {
|
|
|
1685
1680
|
* @param eventhandler - Eventhandler from parser. Can be used to listen for
|
|
1686
1681
|
* parser events.
|
|
1687
1682
|
*/
|
|
1688
|
-
setup
|
|
1683
|
+
setup?(source: Source, eventhandler: EventHandler): void;
|
|
1689
1684
|
/**
|
|
1690
1685
|
* Configuration presets.
|
|
1691
1686
|
*
|
|
@@ -1922,8 +1917,8 @@ export declare abstract class Rule<ContextType = void, OptionsType = void> {
|
|
|
1922
1917
|
*/
|
|
1923
1918
|
readonly options: OptionsType;
|
|
1924
1919
|
constructor(options: OptionsType);
|
|
1925
|
-
getSeverity():
|
|
1926
|
-
setServerity(severity:
|
|
1920
|
+
getSeverity(): Severity;
|
|
1921
|
+
setServerity(severity: Severity): void;
|
|
1927
1922
|
/* Excluded from this release type: block */
|
|
1928
1923
|
/* Excluded from this release type: unblock */
|
|
1929
1924
|
setEnabled(enabled: boolean): void;
|
|
@@ -1995,8 +1990,7 @@ export declare abstract class Rule<ContextType = void, OptionsType = void> {
|
|
|
1995
1990
|
* have any effect.
|
|
1996
1991
|
*/
|
|
1997
1992
|
report(error: ErrorDescriptor<ContextType>): void;
|
|
1998
|
-
report(node: DOMNode | null, message: string): void;
|
|
1999
|
-
report(node: DOMNode | null, message: string, location: Location_2 | null | undefined): void;
|
|
1993
|
+
report(node: DOMNode | null, message: string, location?: Location_2 | null | undefined): void;
|
|
2000
1994
|
report(node: DOMNode | null, message: string, location: Location_2 | null | undefined, context: ContextType): void;
|
|
2001
1995
|
private findLocation;
|
|
2002
1996
|
/**
|
|
@@ -2487,9 +2481,7 @@ export declare interface TransformerEntry {
|
|
|
2487
2481
|
/**
|
|
2488
2482
|
* @public
|
|
2489
2483
|
*/
|
|
2490
|
-
export declare
|
|
2491
|
-
[key: string]: string;
|
|
2492
|
-
}
|
|
2484
|
+
export declare type TransformMap = Record<string, string>;
|
|
2493
2485
|
|
|
2494
2486
|
/**
|
|
2495
2487
|
* @public
|
package/dist/types/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare class Attribute {
|
|
|
25
25
|
* transformation (e.g. vuejs `:id` generating the `id` attribute) this
|
|
26
26
|
* parameter should be set to the attribute name of the source attribute (`:id`).
|
|
27
27
|
*/
|
|
28
|
-
constructor(key: string, value:
|
|
28
|
+
constructor(key: string, value: string | DynamicValue | null, keyLocation: Location_2, valueLocation: Location_2 | null, originalAttribute?: string);
|
|
29
29
|
/**
|
|
30
30
|
* Flag set to true if the attribute value is static.
|
|
31
31
|
*/
|
|
@@ -44,9 +44,7 @@ export declare class Attribute {
|
|
|
44
44
|
* it never matches.
|
|
45
45
|
* @returns `true` if attribute value matches pattern.
|
|
46
46
|
*/
|
|
47
|
-
valueMatches(pattern: RegExp, dynamicMatches?: boolean): boolean;
|
|
48
|
-
valueMatches(pattern: string, dynamicMatches?: boolean): boolean;
|
|
49
|
-
valueMatches(pattern: string[], dynamicMatches?: boolean): boolean;
|
|
47
|
+
valueMatches(pattern: RegExp | string | string[], dynamicMatches?: boolean): boolean;
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
/**
|
|
@@ -202,15 +200,16 @@ export declare interface CLIOptions {
|
|
|
202
200
|
export declare function compatibilityCheck(name: string, declared: string, options?: Partial<CompatibilityOptions>): boolean;
|
|
203
201
|
|
|
204
202
|
/**
|
|
203
|
+
* Options for {@link compatibilityCheck}.
|
|
204
|
+
*
|
|
205
205
|
* @public
|
|
206
206
|
*/
|
|
207
207
|
export declare interface CompatibilityOptions {
|
|
208
208
|
/** If `true` nothing no output will be generated on console. Default: `false` */
|
|
209
209
|
silent: boolean;
|
|
210
|
-
|
|
211
|
-
version: string;
|
|
210
|
+
/* Excluded from this release type: version */
|
|
212
211
|
/** Use custom logging callback. Default: `console.error` */
|
|
213
|
-
logger(message: string): void;
|
|
212
|
+
logger(this: void, message: string): void;
|
|
214
213
|
}
|
|
215
214
|
|
|
216
215
|
/**
|
|
@@ -437,9 +436,7 @@ export declare interface ConfigReadyEvent extends Event_2 {
|
|
|
437
436
|
/**
|
|
438
437
|
* @public
|
|
439
438
|
*/
|
|
440
|
-
declare
|
|
441
|
-
[key: string]: string;
|
|
442
|
-
}
|
|
439
|
+
declare type CSSStyleDeclaration_2 = Record<string, string>;
|
|
443
440
|
export { CSSStyleDeclaration_2 as CSSStyleDeclaration }
|
|
444
441
|
|
|
445
442
|
/**
|
|
@@ -744,9 +741,7 @@ export declare type EventCallback = (event: string, data: any) => void;
|
|
|
744
741
|
* @public
|
|
745
742
|
*/
|
|
746
743
|
export declare class EventHandler {
|
|
747
|
-
listeners:
|
|
748
|
-
[event: string]: EventCallback[];
|
|
749
|
-
};
|
|
744
|
+
listeners: Record<string, EventCallback[]>;
|
|
750
745
|
constructor();
|
|
751
746
|
/**
|
|
752
747
|
* Add an event listener.
|
|
@@ -913,11 +908,10 @@ export declare class HtmlElement extends DOMNode {
|
|
|
913
908
|
readonly voidElement: boolean;
|
|
914
909
|
readonly depth: number;
|
|
915
910
|
closed: NodeClosed;
|
|
916
|
-
protected readonly attr:
|
|
917
|
-
[key: string]: Attribute[];
|
|
918
|
-
};
|
|
911
|
+
protected readonly attr: Record<string, Attribute[]>;
|
|
919
912
|
private metaElement;
|
|
920
913
|
private annotation;
|
|
914
|
+
/* Excluded from this release type: _adapter */
|
|
921
915
|
constructor(tagName: string | undefined, parent: HtmlElement | null, closed: NodeClosed, meta: MetaElement | null, location: Location_2);
|
|
922
916
|
/* Excluded from this release type: rootNode */
|
|
923
917
|
/* Excluded from this release type: fromTokens */
|
|
@@ -1083,6 +1077,23 @@ export declare class HtmlElement extends DOMNode {
|
|
|
1083
1077
|
/* Excluded from this release type: find */
|
|
1084
1078
|
}
|
|
1085
1079
|
|
|
1080
|
+
/**
|
|
1081
|
+
* HTML5 interface for HTMLElement. Contains all the needed methods the
|
|
1082
|
+
* HTML-Validate metadata requires to determine if usage is valid.
|
|
1083
|
+
*
|
|
1084
|
+
* While not officially supported, changes to this interface should be verified
|
|
1085
|
+
* against browsers and/or jsdom, i.e. it should be possible to pass in either
|
|
1086
|
+
* implementation and the element metadata should still work.
|
|
1087
|
+
*
|
|
1088
|
+
* @public
|
|
1089
|
+
* @since 8.2.0
|
|
1090
|
+
*/
|
|
1091
|
+
export declare interface HtmlElementLike {
|
|
1092
|
+
closest(selectors: string): HtmlElementLike | null | undefined;
|
|
1093
|
+
getAttribute(name: string): string | DynamicValue | null | undefined;
|
|
1094
|
+
hasAttribute(name: string): boolean;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1086
1097
|
/**
|
|
1087
1098
|
* Primary API for using HTML-validate.
|
|
1088
1099
|
*
|
|
@@ -1228,28 +1239,6 @@ export declare class HtmlValidate {
|
|
|
1228
1239
|
* configuration. As a rule-of-thumb, set it to the elements json file.
|
|
1229
1240
|
*/
|
|
1230
1241
|
getElementsSchemaSync(filename?: string): SchemaObject;
|
|
1231
|
-
/**
|
|
1232
|
-
* Get contextual documentation for the given rule. The default configuration
|
|
1233
|
-
* will be used.
|
|
1234
|
-
*
|
|
1235
|
-
* @example
|
|
1236
|
-
*
|
|
1237
|
-
* ```js
|
|
1238
|
-
* const report = await htmlvalidate.validateFile("my-file.html");
|
|
1239
|
-
* for (const result of report.results){
|
|
1240
|
-
* for (const message of result.messages){
|
|
1241
|
-
* const documentation = await htmlvalidate.getRuleDocumentation(message, result.filePath);
|
|
1242
|
-
* // do something with documentation
|
|
1243
|
-
* }
|
|
1244
|
-
* }
|
|
1245
|
-
* ```
|
|
1246
|
-
*
|
|
1247
|
-
* @public
|
|
1248
|
-
* @since 8.0.0
|
|
1249
|
-
* @param message - Message reported during validation
|
|
1250
|
-
* @returns Contextual documentation or `null` if the rule does not exist.
|
|
1251
|
-
*/
|
|
1252
|
-
getContextualDocumentation(message: Pick<Message, "ruleId" | "context">): Promise<RuleDocumentation | null>;
|
|
1253
1242
|
/**
|
|
1254
1243
|
* Get contextual documentation for the given rule. Configuration will be
|
|
1255
1244
|
* resolved for given filename.
|
|
@@ -1260,7 +1249,7 @@ export declare class HtmlValidate {
|
|
|
1260
1249
|
* const report = await htmlvalidate.validateFile("my-file.html");
|
|
1261
1250
|
* for (const result of report.results){
|
|
1262
1251
|
* for (const message of result.messages){
|
|
1263
|
-
* const documentation = await htmlvalidate.
|
|
1252
|
+
* const documentation = await htmlvalidate.getContextualDocumentation(message, result.filePath);
|
|
1264
1253
|
* // do something with documentation
|
|
1265
1254
|
* }
|
|
1266
1255
|
* }
|
|
@@ -1272,7 +1261,7 @@ export declare class HtmlValidate {
|
|
|
1272
1261
|
* @param filename - Filename used to resolve configuration.
|
|
1273
1262
|
* @returns Contextual documentation or `null` if the rule does not exist.
|
|
1274
1263
|
*/
|
|
1275
|
-
getContextualDocumentation(message: Pick<Message, "ruleId" | "context">, filename
|
|
1264
|
+
getContextualDocumentation(message: Pick<Message, "ruleId" | "context">, filename?: string): Promise<RuleDocumentation | null>;
|
|
1276
1265
|
/**
|
|
1277
1266
|
* Get contextual documentation for the given rule using provided
|
|
1278
1267
|
* configuration.
|
|
@@ -1296,28 +1285,6 @@ export declare class HtmlValidate {
|
|
|
1296
1285
|
* @returns Contextual documentation or `null` if the rule does not exist.
|
|
1297
1286
|
*/
|
|
1298
1287
|
getContextualDocumentation(message: Pick<Message, "ruleId" | "context">, config: ResolvedConfig | Promise<ResolvedConfig>): Promise<RuleDocumentation | null>;
|
|
1299
|
-
/**
|
|
1300
|
-
* Get contextual documentation for the given rule. The default configuration
|
|
1301
|
-
* will be used.
|
|
1302
|
-
*
|
|
1303
|
-
* @example
|
|
1304
|
-
*
|
|
1305
|
-
* ```js
|
|
1306
|
-
* const report = htmlvalidate.validateFileSync("my-file.html");
|
|
1307
|
-
* for (const result of report.results){
|
|
1308
|
-
* for (const message of result.messages){
|
|
1309
|
-
* const documentation = htmlvalidate.getRuleDocumentationSync(message, result.filePath);
|
|
1310
|
-
* // do something with documentation
|
|
1311
|
-
* }
|
|
1312
|
-
* }
|
|
1313
|
-
* ```
|
|
1314
|
-
*
|
|
1315
|
-
* @public
|
|
1316
|
-
* @since 8.0.0
|
|
1317
|
-
* @param message - Message reported during validation
|
|
1318
|
-
* @returns Contextual documentation or `null` if the rule does not exist.
|
|
1319
|
-
*/
|
|
1320
|
-
getContextualDocumentationSync(message: Pick<Message, "ruleId" | "context">): RuleDocumentation | null;
|
|
1321
1288
|
/**
|
|
1322
1289
|
* Get contextual documentation for the given rule. Configuration will be
|
|
1323
1290
|
* resolved for given filename.
|
|
@@ -1340,7 +1307,7 @@ export declare class HtmlValidate {
|
|
|
1340
1307
|
* @param filename - Filename used to resolve configuration.
|
|
1341
1308
|
* @returns Contextual documentation or `null` if the rule does not exist.
|
|
1342
1309
|
*/
|
|
1343
|
-
getContextualDocumentationSync(message: Pick<Message, "ruleId" | "context">, filename
|
|
1310
|
+
getContextualDocumentationSync(message: Pick<Message, "ruleId" | "context">, filename?: string): RuleDocumentation | null;
|
|
1344
1311
|
/**
|
|
1345
1312
|
* Get contextual documentation for the given rule using provided
|
|
1346
1313
|
* configuration.
|
|
@@ -1572,9 +1539,9 @@ export declare interface MetaAttribute {
|
|
|
1572
1539
|
*
|
|
1573
1540
|
* @public
|
|
1574
1541
|
* @param node - The node the attribute belongs to.
|
|
1575
|
-
* @param attr - The current attribute being validated.
|
|
1542
|
+
* @param attr - The current attribute value being validated.
|
|
1576
1543
|
*/
|
|
1577
|
-
export declare type MetaAttributeAllowedCallback = (node:
|
|
1544
|
+
export declare type MetaAttributeAllowedCallback = (node: HtmlElementLike, attr: string | DynamicValue | null | undefined) => string | null | undefined;
|
|
1578
1545
|
|
|
1579
1546
|
/**
|
|
1580
1547
|
* Properties listed here can be copied (loaded) onto another element using
|
|
@@ -1632,6 +1599,12 @@ export declare interface MetadataHelper {
|
|
|
1632
1599
|
allowedIfAttributeHasValue(this: void, attr: string, value: string[], options?: {
|
|
1633
1600
|
defaultValue?: string | null;
|
|
1634
1601
|
}): MetaAttributeAllowedCallback;
|
|
1602
|
+
/**
|
|
1603
|
+
* Returns an error if the node doesn't have any of the given elements as parent
|
|
1604
|
+
*
|
|
1605
|
+
* @since 8.2.0
|
|
1606
|
+
**/
|
|
1607
|
+
allowedIfParentIsPresent(this: void, ...tags: string[]): MetaAttributeAllowedCallback;
|
|
1635
1608
|
}
|
|
1636
1609
|
|
|
1637
1610
|
/**
|
|
@@ -1642,9 +1615,7 @@ export declare const metadataHelper: MetadataHelper;
|
|
|
1642
1615
|
/**
|
|
1643
1616
|
* @public
|
|
1644
1617
|
*/
|
|
1645
|
-
export declare
|
|
1646
|
-
[tagName: string]: MetaData;
|
|
1647
|
-
}
|
|
1618
|
+
export declare type MetaDataTable = Record<string, MetaData>;
|
|
1648
1619
|
|
|
1649
1620
|
/**
|
|
1650
1621
|
* @public
|
|
@@ -1924,7 +1895,7 @@ declare interface Plugin_2 {
|
|
|
1924
1895
|
*
|
|
1925
1896
|
* Called once per plugin during initialization.
|
|
1926
1897
|
*/
|
|
1927
|
-
init
|
|
1898
|
+
init?(): void;
|
|
1928
1899
|
/**
|
|
1929
1900
|
* Setup callback.
|
|
1930
1901
|
*
|
|
@@ -1934,7 +1905,7 @@ declare interface Plugin_2 {
|
|
|
1934
1905
|
* @param eventhandler - Eventhandler from parser. Can be used to listen for
|
|
1935
1906
|
* parser events.
|
|
1936
1907
|
*/
|
|
1937
|
-
setup
|
|
1908
|
+
setup?(source: Source, eventhandler: EventHandler): void;
|
|
1938
1909
|
/**
|
|
1939
1910
|
* Configuration presets.
|
|
1940
1911
|
*
|
|
@@ -2171,8 +2142,8 @@ export declare abstract class Rule<ContextType = void, OptionsType = void> {
|
|
|
2171
2142
|
*/
|
|
2172
2143
|
readonly options: OptionsType;
|
|
2173
2144
|
constructor(options: OptionsType);
|
|
2174
|
-
getSeverity():
|
|
2175
|
-
setServerity(severity:
|
|
2145
|
+
getSeverity(): Severity;
|
|
2146
|
+
setServerity(severity: Severity): void;
|
|
2176
2147
|
/* Excluded from this release type: block */
|
|
2177
2148
|
/* Excluded from this release type: unblock */
|
|
2178
2149
|
setEnabled(enabled: boolean): void;
|
|
@@ -2244,8 +2215,7 @@ export declare abstract class Rule<ContextType = void, OptionsType = void> {
|
|
|
2244
2215
|
* have any effect.
|
|
2245
2216
|
*/
|
|
2246
2217
|
report(error: ErrorDescriptor<ContextType>): void;
|
|
2247
|
-
report(node: DOMNode | null, message: string): void;
|
|
2248
|
-
report(node: DOMNode | null, message: string, location: Location_2 | null | undefined): void;
|
|
2218
|
+
report(node: DOMNode | null, message: string, location?: Location_2 | null | undefined): void;
|
|
2249
2219
|
report(node: DOMNode | null, message: string, location: Location_2 | null | undefined, context: ContextType): void;
|
|
2250
2220
|
private findLocation;
|
|
2251
2221
|
/**
|
|
@@ -2736,9 +2706,7 @@ export declare interface TransformerEntry {
|
|
|
2736
2706
|
/**
|
|
2737
2707
|
* @public
|
|
2738
2708
|
*/
|
|
2739
|
-
export declare
|
|
2740
|
-
[key: string]: string;
|
|
2741
|
-
}
|
|
2709
|
+
export declare type TransformMap = Record<string, string>;
|
|
2742
2710
|
|
|
2743
2711
|
/**
|
|
2744
2712
|
* @public
|
package/dist/types/jest.d.ts
CHANGED
|
@@ -21,14 +21,10 @@ declare global {
|
|
|
21
21
|
* @param filename - Optional filename used when matching transformer and
|
|
22
22
|
* loading configuration.
|
|
23
23
|
*/
|
|
24
|
-
toHTMLValidate(): R;
|
|
25
|
-
toHTMLValidate(
|
|
26
|
-
toHTMLValidate(
|
|
27
|
-
toHTMLValidate(config: ConfigData, filename
|
|
28
|
-
toHTMLValidate(error: Partial<Message>): R;
|
|
29
|
-
toHTMLValidate(error: Partial<Message>, filename: string): R;
|
|
30
|
-
toHTMLValidate(error: Partial<Message>, config: ConfigData): R;
|
|
31
|
-
toHTMLValidate(error: Partial<Message>, config: ConfigData, filename: string): R;
|
|
24
|
+
toHTMLValidate(filename?: string): R;
|
|
25
|
+
toHTMLValidate(config: ConfigData, filename?: string): R;
|
|
26
|
+
toHTMLValidate(error: Partial<Message>, filename?: string): R;
|
|
27
|
+
toHTMLValidate(error: Partial<Message>, config: ConfigData, filename?: string): R;
|
|
32
28
|
/**
|
|
33
29
|
* Writes out the given [[Report]] using codeframe formatter and compares
|
|
34
30
|
* with snapshot.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-validate",
|
|
3
|
-
"version": "8.0
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"description": "Offline html5 validator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"html",
|
|
@@ -187,42 +187,42 @@
|
|
|
187
187
|
"semver": "^7.0.0"
|
|
188
188
|
},
|
|
189
189
|
"devDependencies": {
|
|
190
|
-
"@html-validate/commitlint-config": "3.0.
|
|
191
|
-
"@html-validate/eslint-config": "5.
|
|
192
|
-
"@html-validate/eslint-config-jest": "5.
|
|
193
|
-
"@html-validate/eslint-config-typescript": "5.
|
|
194
|
-
"@html-validate/eslint-config-typescript-typeinfo": "5.
|
|
195
|
-
"@html-validate/jest-config": "3.7.
|
|
196
|
-
"@html-validate/prettier-config": "2.3
|
|
197
|
-
"@html-validate/release-scripts": "4.1.
|
|
198
|
-
"@microsoft/api-extractor": "7.
|
|
190
|
+
"@html-validate/commitlint-config": "3.0.19",
|
|
191
|
+
"@html-validate/eslint-config": "5.10.6",
|
|
192
|
+
"@html-validate/eslint-config-jest": "5.10.0",
|
|
193
|
+
"@html-validate/eslint-config-typescript": "5.10.6",
|
|
194
|
+
"@html-validate/eslint-config-typescript-typeinfo": "5.10.6",
|
|
195
|
+
"@html-validate/jest-config": "3.7.7",
|
|
196
|
+
"@html-validate/prettier-config": "2.4.3",
|
|
197
|
+
"@html-validate/release-scripts": "4.1.6",
|
|
198
|
+
"@microsoft/api-extractor": "7.36.3",
|
|
199
199
|
"@rollup/plugin-json": "6.0.0",
|
|
200
200
|
"@rollup/plugin-node-resolve": "15.1.0",
|
|
201
201
|
"@rollup/plugin-replace": "5.0.2",
|
|
202
|
-
"@rollup/plugin-typescript": "11.1.
|
|
202
|
+
"@rollup/plugin-typescript": "11.1.2",
|
|
203
203
|
"@rollup/plugin-virtual": "3.0.1",
|
|
204
204
|
"@types/babar": "0.2.1",
|
|
205
205
|
"@types/babel__code-frame": "7.0.3",
|
|
206
|
-
"@types/jest": "29.5.
|
|
206
|
+
"@types/jest": "29.5.3",
|
|
207
207
|
"@types/minimist": "1.2.2",
|
|
208
|
-
"@types/node": "16.18.
|
|
208
|
+
"@types/node": "16.18.39",
|
|
209
209
|
"@types/prompts": "2.4.4",
|
|
210
210
|
"@types/semver": "7.5.0",
|
|
211
211
|
"@types/stream-buffers": "3.0.4",
|
|
212
212
|
"babar": "0.2.3",
|
|
213
213
|
"husky": "8.0.3",
|
|
214
214
|
"is-ci": "3.0.1",
|
|
215
|
-
"jest": "29.
|
|
216
|
-
"jest-diff": "29.
|
|
217
|
-
"jest-environment-jsdom": "29.
|
|
218
|
-
"jest-snapshot": "29.
|
|
219
|
-
"memfs": "
|
|
220
|
-
"npm-pkg-lint": "
|
|
215
|
+
"jest": "29.6.2",
|
|
216
|
+
"jest-diff": "29.6.2",
|
|
217
|
+
"jest-environment-jsdom": "29.6.2",
|
|
218
|
+
"jest-snapshot": "29.6.2",
|
|
219
|
+
"memfs": "4.2.0",
|
|
220
|
+
"npm-pkg-lint": "2.0.0",
|
|
221
221
|
"npm-run-all": "4.1.5",
|
|
222
|
-
"rollup": "3.
|
|
222
|
+
"rollup": "3.27.2",
|
|
223
223
|
"stream-buffers": "3.0.2",
|
|
224
|
-
"ts-jest": "29.1.
|
|
225
|
-
"typescript": "5.1.
|
|
224
|
+
"ts-jest": "29.1.1",
|
|
225
|
+
"typescript": "5.1.6"
|
|
226
226
|
},
|
|
227
227
|
"peerDependencies": {
|
|
228
228
|
"jest": "^27.1 || ^28.1.3 || ^29.0.3",
|
package/dist/cjs/nodejs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nodejs.js","sources":["../../../src/config/resolver/nodejs/determine-root-dir.ts","../../../src/config/resolver/nodejs/expand-relative-path.ts","../../../src/config/resolver/nodejs/nodejs-resolver.ts","../../../src/config/loaders/file-system.ts"],"sourcesContent":[null,null,null,null],"names":["path","fs","requireUncached","ConfigError","ConfigLoader","Config"],"mappings":";;;;;;;;;;;;;AAGA,IAAI,aAAa,GAAkB,IAAI,CAAC;AAMxC;;AAEG;AACa,SAAA,oBAAoB,CAAC,MAAc,EAAE,EAAU,EAAA;;IAE9D,IAAI,OAAO,GAAG,MAAM,CAAC;;AAGrB,IAAA,OAAO,IAAI,EAAE;QACZ,MAAM,MAAM,GAAGA,qBAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;AAClD,QAAA,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;AAC1B,YAAA,OAAO,OAAO,CAAC;AACf,SAAA;;QAGD,MAAM,KAAK,GAAG,OAAO,CAAC;AACtB,QAAA,OAAO,GAAGA,qBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;;QAGhC,IAAI,OAAO,KAAK,KAAK,EAAE;YACtB,MAAM;AACN,SAAA;AACD,KAAA;;AAGD,IAAA,OAAO,MAAM,CAAC;AACf,CAAC;AAED;;;;;AAKG;AACH;SACgB,gBAAgB,GAAA;IAC/B,IAAI,aAAa,KAAK,IAAI,EAAE;QAC3B,aAAa,GAAG,oBAAoB,CAAC,OAAO,CAAC,GAAG,EAAE,EAAEC,mBAAE,CAAC,CAAC;AACxD,KAAA;AACD,IAAA,OAAO,aAAa,CAAC;AACtB;;AC/CA;;AAEG;SACa,kBAAkB,CAAI,KAAiB,EAAE,EAAE,GAAG,EAAmB,EAAA;IAChF,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;AAClD,QAAA,OAAOD,qBAAI,CAAC,SAAS,CAACA,qBAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAC7C,KAAA;AAAM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AAO,CAAC,CAAC;;YAGhC,IAAI,OAAO,KAAK,KAAK,EAAE;gBACtB,MAAM;AACN,aAAA;AACD,SAAA;;QAGD,IAAI,CAAC,KAAK,EAAE;YACX,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC/B,YAAA,OAAO,IAAI,CAAC;AACZ,SAAA;QAED,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AACjC,QAAA,OAAO,MAAM,CAAC;KACd;AAED;;AAEG;IACI,iBAAiB,GAAA;QACvB,OAAO,IAAI,CAAC,KAAK,CAAC;KAClB;IAES,aAAa,GAAA;AACtB,QAAA,OAAOK,WAAM,CAAC,aAAa,EAAE,CAAC;KAC9B;AACD;;;;;;"}
|
package/dist/es/nodejs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nodejs.js","sources":["../../../src/config/resolver/nodejs/determine-root-dir.ts","../../../src/config/resolver/nodejs/expand-relative-path.ts","../../../src/config/resolver/nodejs/nodejs-resolver.ts","../../../src/config/loaders/file-system.ts"],"sourcesContent":[null,null,null,null],"names":[],"mappings":";;;;;;;AAGA,IAAI,aAAa,GAAkB,IAAI,CAAC;AAMxC;;AAEG;AACa,SAAA,oBAAoB,CAAC,MAAc,EAAE,EAAU,EAAA;;IAE9D,IAAI,OAAO,GAAG,MAAM,CAAC;;AAGrB,IAAA,OAAO,IAAI,EAAE;QACZ,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;AAClD,QAAA,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;AAC1B,YAAA,OAAO,OAAO,CAAC;AACf,SAAA;;QAGD,MAAM,KAAK,GAAG,OAAO,CAAC;AACtB,QAAA,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;;QAGhC,IAAI,OAAO,K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