html-validate 7.15.3 → 7.17.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/cli.js +1 -1
- package/dist/cjs/cli.js.map +1 -1
- package/dist/cjs/core.js +126 -105
- package/dist/cjs/core.js.map +1 -1
- package/dist/cjs/tsdoc-metadata.json +1 -1
- package/dist/es/cli.js +1 -1
- package/dist/es/cli.js.map +1 -1
- package/dist/es/core.js +126 -104
- package/dist/es/core.js.map +1 -1
- package/dist/schema/config.json +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types/browser.d.ts +17 -14
- package/dist/types/index.d.ts +18 -15
- package/package.json +10 -10
package/dist/schema/config.json
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"plugins": {
|
|
41
41
|
"type": "array",
|
|
42
42
|
"items": {
|
|
43
|
-
"type": "string"
|
|
43
|
+
"anyOf": [{ "type": "string" }, { "type": "object" }]
|
|
44
44
|
},
|
|
45
45
|
"title": "Plugins to load",
|
|
46
46
|
"description": "Array of plugins load. Use <rootDir> to refer to the folder with the package.json file.",
|
package/dist/tsdoc-metadata.json
CHANGED
package/dist/types/browser.d.ts
CHANGED
|
@@ -273,7 +273,7 @@ export declare interface ConfigData {
|
|
|
273
273
|
*
|
|
274
274
|
* Each plugin must be resolvable be require and export the plugin interface.
|
|
275
275
|
*/
|
|
276
|
-
plugins?: string
|
|
276
|
+
plugins?: Array<string | Plugin_2>;
|
|
277
277
|
/**
|
|
278
278
|
* List of source file transformations. A transformer takes a filename and
|
|
279
279
|
* returns Source instances with extracted HTML-templates.
|
|
@@ -329,10 +329,13 @@ export declare abstract class ConfigLoader {
|
|
|
329
329
|
*
|
|
330
330
|
* If [[configOverride]] is set it is merged with the final result.
|
|
331
331
|
*
|
|
332
|
+
* Returning a [[Config]] instance is deprecated and support will be removed
|
|
333
|
+
* in the next major release.
|
|
334
|
+
*
|
|
332
335
|
* @param handle - Unique handle to get configuration for.
|
|
333
336
|
* @param configOverride - Optional configuration to merge final results with.
|
|
334
337
|
*/
|
|
335
|
-
abstract getConfigFor(handle: string, configOverride?: ConfigData): Config;
|
|
338
|
+
abstract getConfigFor(handle: string, configOverride?: ConfigData): Config | ResolvedConfig;
|
|
336
339
|
/**
|
|
337
340
|
* Flush configuration cache.
|
|
338
341
|
*
|
|
@@ -1035,7 +1038,7 @@ export declare class HtmlValidate {
|
|
|
1035
1038
|
* @param context - If set to `Message.context` some rules can provide
|
|
1036
1039
|
* contextual details and suggestions.
|
|
1037
1040
|
*/
|
|
1038
|
-
getRuleDocumentation(ruleId: string, config?:
|
|
1041
|
+
getRuleDocumentation(ruleId: string, config?: ResolvedConfig | null, context?: any | null): RuleDocumentation | null;
|
|
1039
1042
|
/* Excluded from this release type: getParserFor */
|
|
1040
1043
|
/**
|
|
1041
1044
|
* Get configuration for given filename.
|
|
@@ -1046,7 +1049,7 @@ export declare class HtmlValidate {
|
|
|
1046
1049
|
* @param filename - Filename to get configuration for.
|
|
1047
1050
|
* @param configOverride - Configuration to apply last.
|
|
1048
1051
|
*/
|
|
1049
|
-
getConfigFor(filename: string, configOverride?: ConfigData):
|
|
1052
|
+
getConfigFor(filename: string, configOverride?: ConfigData): ResolvedConfig;
|
|
1050
1053
|
/**
|
|
1051
1054
|
* Flush configuration cache. Clears full cache unless a filename is given.
|
|
1052
1055
|
*
|
|
@@ -1291,13 +1294,6 @@ export declare class MetaTable {
|
|
|
1291
1294
|
* @param filename - Optional filename used when presenting validation error
|
|
1292
1295
|
*/
|
|
1293
1296
|
loadFromObject(obj: unknown, filename?: string | null): void;
|
|
1294
|
-
/**
|
|
1295
|
-
* Load metadata table from filename
|
|
1296
|
-
*
|
|
1297
|
-
* @public
|
|
1298
|
-
* @param filename - Filename to load
|
|
1299
|
-
*/
|
|
1300
|
-
loadFromFile(filename: string): void;
|
|
1301
1297
|
/**
|
|
1302
1298
|
* Get [[MetaElement]] for the given tag. If no specific metadata is present
|
|
1303
1299
|
* the global metadata is returned or null if no global is present.
|
|
@@ -1647,7 +1643,14 @@ export declare class ResolvedConfig {
|
|
|
1647
1643
|
private plugins;
|
|
1648
1644
|
private rules;
|
|
1649
1645
|
private transformers;
|
|
1650
|
-
|
|
1646
|
+
/** The original data this resolved configuration was created from */
|
|
1647
|
+
private original;
|
|
1648
|
+
/* Excluded from this release type: __constructor */
|
|
1649
|
+
/**
|
|
1650
|
+
* Returns the (merged) configuration data used to create this resolved
|
|
1651
|
+
* configuration.
|
|
1652
|
+
*/
|
|
1653
|
+
getConfigData(): ConfigData;
|
|
1651
1654
|
getMetaTable(): MetaTable;
|
|
1652
1655
|
getPlugins(): Plugin_2[];
|
|
1653
1656
|
getRules(): Map<string, [Severity, RuleOptions]>;
|
|
@@ -2030,13 +2033,13 @@ export declare interface SourceReadyEvent extends Event_2 {
|
|
|
2030
2033
|
* The static configuration loader does not do any per-handle lookup. Only the
|
|
2031
2034
|
* global or per-call configuration is used.
|
|
2032
2035
|
*
|
|
2033
|
-
* In practice this means no configuration is
|
|
2036
|
+
* In practice this means no configuration is fetched by traversing the
|
|
2034
2037
|
* filesystem.
|
|
2035
2038
|
*
|
|
2036
2039
|
* @public
|
|
2037
2040
|
*/
|
|
2038
2041
|
export declare class StaticConfigLoader extends ConfigLoader {
|
|
2039
|
-
getConfigFor(
|
|
2042
|
+
getConfigFor(_handle: string, configOverride?: ConfigData): ResolvedConfig;
|
|
2040
2043
|
flushCache(): void;
|
|
2041
2044
|
protected defaultConfig(): Config;
|
|
2042
2045
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -368,7 +368,7 @@ export declare interface ConfigData {
|
|
|
368
368
|
*
|
|
369
369
|
* Each plugin must be resolvable be require and export the plugin interface.
|
|
370
370
|
*/
|
|
371
|
-
plugins?: string
|
|
371
|
+
plugins?: Array<string | Plugin_2>;
|
|
372
372
|
/**
|
|
373
373
|
* List of source file transformations. A transformer takes a filename and
|
|
374
374
|
* returns Source instances with extracted HTML-templates.
|
|
@@ -424,10 +424,13 @@ export declare abstract class ConfigLoader {
|
|
|
424
424
|
*
|
|
425
425
|
* If [[configOverride]] is set it is merged with the final result.
|
|
426
426
|
*
|
|
427
|
+
* Returning a [[Config]] instance is deprecated and support will be removed
|
|
428
|
+
* in the next major release.
|
|
429
|
+
*
|
|
427
430
|
* @param handle - Unique handle to get configuration for.
|
|
428
431
|
* @param configOverride - Optional configuration to merge final results with.
|
|
429
432
|
*/
|
|
430
|
-
abstract getConfigFor(handle: string, configOverride?: ConfigData): Config;
|
|
433
|
+
abstract getConfigFor(handle: string, configOverride?: ConfigData): Config | ResolvedConfig;
|
|
431
434
|
/**
|
|
432
435
|
* Flush configuration cache.
|
|
433
436
|
*
|
|
@@ -858,7 +861,7 @@ export declare class FileSystemConfigLoader extends ConfigLoader {
|
|
|
858
861
|
* @param filename - Filename to get configuration for.
|
|
859
862
|
* @param configOverride - Configuration to merge final result with.
|
|
860
863
|
*/
|
|
861
|
-
getConfigFor(filename: string, configOverride?: ConfigData):
|
|
864
|
+
getConfigFor(filename: string, configOverride?: ConfigData): ResolvedConfig;
|
|
862
865
|
/**
|
|
863
866
|
* Flush configuration cache.
|
|
864
867
|
*
|
|
@@ -1221,7 +1224,7 @@ export declare class HtmlValidate {
|
|
|
1221
1224
|
* @param context - If set to `Message.context` some rules can provide
|
|
1222
1225
|
* contextual details and suggestions.
|
|
1223
1226
|
*/
|
|
1224
|
-
getRuleDocumentation(ruleId: string, config?:
|
|
1227
|
+
getRuleDocumentation(ruleId: string, config?: ResolvedConfig | null, context?: any | null): RuleDocumentation | null;
|
|
1225
1228
|
/* Excluded from this release type: getParserFor */
|
|
1226
1229
|
/**
|
|
1227
1230
|
* Get configuration for given filename.
|
|
@@ -1232,7 +1235,7 @@ export declare class HtmlValidate {
|
|
|
1232
1235
|
* @param filename - Filename to get configuration for.
|
|
1233
1236
|
* @param configOverride - Configuration to apply last.
|
|
1234
1237
|
*/
|
|
1235
|
-
getConfigFor(filename: string, configOverride?: ConfigData):
|
|
1238
|
+
getConfigFor(filename: string, configOverride?: ConfigData): ResolvedConfig;
|
|
1236
1239
|
/**
|
|
1237
1240
|
* Flush configuration cache. Clears full cache unless a filename is given.
|
|
1238
1241
|
*
|
|
@@ -1484,13 +1487,6 @@ export declare class MetaTable {
|
|
|
1484
1487
|
* @param filename - Optional filename used when presenting validation error
|
|
1485
1488
|
*/
|
|
1486
1489
|
loadFromObject(obj: unknown, filename?: string | null): void;
|
|
1487
|
-
/**
|
|
1488
|
-
* Load metadata table from filename
|
|
1489
|
-
*
|
|
1490
|
-
* @public
|
|
1491
|
-
* @param filename - Filename to load
|
|
1492
|
-
*/
|
|
1493
|
-
loadFromFile(filename: string): void;
|
|
1494
1490
|
/**
|
|
1495
1491
|
* Get [[MetaElement]] for the given tag. If no specific metadata is present
|
|
1496
1492
|
* the global metadata is returned or null if no global is present.
|
|
@@ -1840,7 +1836,14 @@ export declare class ResolvedConfig {
|
|
|
1840
1836
|
private plugins;
|
|
1841
1837
|
private rules;
|
|
1842
1838
|
private transformers;
|
|
1843
|
-
|
|
1839
|
+
/** The original data this resolved configuration was created from */
|
|
1840
|
+
private original;
|
|
1841
|
+
/* Excluded from this release type: __constructor */
|
|
1842
|
+
/**
|
|
1843
|
+
* Returns the (merged) configuration data used to create this resolved
|
|
1844
|
+
* configuration.
|
|
1845
|
+
*/
|
|
1846
|
+
getConfigData(): ConfigData;
|
|
1844
1847
|
getMetaTable(): MetaTable;
|
|
1845
1848
|
getPlugins(): Plugin_2[];
|
|
1846
1849
|
getRules(): Map<string, [Severity, RuleOptions]>;
|
|
@@ -2223,13 +2226,13 @@ export declare interface SourceReadyEvent extends Event_2 {
|
|
|
2223
2226
|
* The static configuration loader does not do any per-handle lookup. Only the
|
|
2224
2227
|
* global or per-call configuration is used.
|
|
2225
2228
|
*
|
|
2226
|
-
* In practice this means no configuration is
|
|
2229
|
+
* In practice this means no configuration is fetched by traversing the
|
|
2227
2230
|
* filesystem.
|
|
2228
2231
|
*
|
|
2229
2232
|
* @public
|
|
2230
2233
|
*/
|
|
2231
2234
|
export declare class StaticConfigLoader extends ConfigLoader {
|
|
2232
|
-
getConfigFor(
|
|
2235
|
+
getConfigFor(_handle: string, configOverride?: ConfigData): ResolvedConfig;
|
|
2233
2236
|
flushCache(): void;
|
|
2234
2237
|
protected defaultConfig(): Config;
|
|
2235
2238
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-validate",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.17.0",
|
|
4
4
|
"description": "Offline html5 validator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"html",
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
},
|
|
158
158
|
"dependencies": {
|
|
159
159
|
"@babel/code-frame": "^7.10.0",
|
|
160
|
-
"@html-validate/stylish": "^
|
|
160
|
+
"@html-validate/stylish": "^4.0.1",
|
|
161
161
|
"@sidvind/better-ajv-errors": "^2.0.0",
|
|
162
162
|
"acorn-walk": "^8.0.0",
|
|
163
163
|
"ajv": "^8.0.0",
|
|
@@ -171,15 +171,15 @@
|
|
|
171
171
|
"semver": "^7.0.0"
|
|
172
172
|
},
|
|
173
173
|
"devDependencies": {
|
|
174
|
-
"@html-validate/commitlint-config": "3.0.
|
|
175
|
-
"@html-validate/eslint-config": "5.9.
|
|
174
|
+
"@html-validate/commitlint-config": "3.0.15",
|
|
175
|
+
"@html-validate/eslint-config": "5.9.4",
|
|
176
176
|
"@html-validate/eslint-config-jest": "5.9.0",
|
|
177
|
-
"@html-validate/eslint-config-typescript": "5.9.
|
|
177
|
+
"@html-validate/eslint-config-typescript": "5.9.4",
|
|
178
178
|
"@html-validate/eslint-config-typescript-typeinfo": "5.9.0",
|
|
179
179
|
"@html-validate/jest-config": "3.7.5",
|
|
180
180
|
"@html-validate/prettier-config": "2.3.10",
|
|
181
181
|
"@html-validate/release-scripts": "4.0.6",
|
|
182
|
-
"@microsoft/api-extractor": "7.34.
|
|
182
|
+
"@microsoft/api-extractor": "7.34.8",
|
|
183
183
|
"@rollup/plugin-json": "6.0.0",
|
|
184
184
|
"@rollup/plugin-node-resolve": "15.0.2",
|
|
185
185
|
"@rollup/plugin-replace": "5.0.2",
|
|
@@ -190,9 +190,9 @@
|
|
|
190
190
|
"@types/estree": "1.0.1",
|
|
191
191
|
"@types/jest": "29.5.1",
|
|
192
192
|
"@types/minimist": "1.2.2",
|
|
193
|
-
"@types/node": "14.18.
|
|
193
|
+
"@types/node": "14.18.46",
|
|
194
194
|
"@types/prompts": "2.4.4",
|
|
195
|
-
"@types/semver": "7.
|
|
195
|
+
"@types/semver": "7.5.0",
|
|
196
196
|
"@types/stream-buffers": "3.0.4",
|
|
197
197
|
"babar": "0.2.3",
|
|
198
198
|
"husky": "8.0.3",
|
|
@@ -202,9 +202,9 @@
|
|
|
202
202
|
"jest-environment-jsdom": "29.5.0",
|
|
203
203
|
"jest-snapshot": "29.5.0",
|
|
204
204
|
"memfs": "3.5.1",
|
|
205
|
-
"npm-pkg-lint": "1.14.
|
|
205
|
+
"npm-pkg-lint": "1.14.1",
|
|
206
206
|
"npm-run-all": "4.1.5",
|
|
207
|
-
"rollup": "3.21.
|
|
207
|
+
"rollup": "3.21.6",
|
|
208
208
|
"stream-buffers": "3.0.2",
|
|
209
209
|
"ts-jest": "29.1.0",
|
|
210
210
|
"typescript": "5.0.4"
|