html-validate 8.7.3 → 8.7.4
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/core.js +31 -22
- package/dist/cjs/core.js.map +1 -1
- package/dist/cjs/tsdoc-metadata.json +1 -1
- package/dist/es/core.js +31 -22
- package/dist/es/core.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types/browser.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +19 -15
package/dist/es/core.js
CHANGED
|
@@ -10198,7 +10198,7 @@ class Config {
|
|
|
10198
10198
|
* Create a new blank configuration. See also `Config.defaultConfig()`.
|
|
10199
10199
|
*/
|
|
10200
10200
|
static empty() {
|
|
10201
|
-
return
|
|
10201
|
+
return Config.create([], {
|
|
10202
10202
|
extends: [],
|
|
10203
10203
|
rules: {},
|
|
10204
10204
|
plugins: [],
|
|
@@ -10210,7 +10210,7 @@ class Config {
|
|
|
10210
10210
|
*/
|
|
10211
10211
|
static fromObject(resolvers, options, filename = null) {
|
|
10212
10212
|
Config.validate(options, filename);
|
|
10213
|
-
return
|
|
10213
|
+
return Config.create(resolvers, options);
|
|
10214
10214
|
}
|
|
10215
10215
|
/**
|
|
10216
10216
|
* Read configuration from filename.
|
|
@@ -10253,13 +10253,35 @@ class Config {
|
|
|
10253
10253
|
* Load a default configuration object.
|
|
10254
10254
|
*/
|
|
10255
10255
|
static defaultConfig() {
|
|
10256
|
-
return
|
|
10256
|
+
return Config.create([], defaultConfig);
|
|
10257
10257
|
}
|
|
10258
10258
|
/**
|
|
10259
10259
|
* @internal
|
|
10260
10260
|
*/
|
|
10261
|
-
|
|
10261
|
+
static create(resolvers, options) {
|
|
10262
10262
|
var _a, _b;
|
|
10263
|
+
const instance = new Config(resolvers, options);
|
|
10264
|
+
/* load plugins */
|
|
10265
|
+
instance.plugins = instance.loadPlugins((_a = instance.config.plugins) !== null && _a !== void 0 ? _a : []);
|
|
10266
|
+
instance.configurations = instance.loadConfigurations(instance.plugins);
|
|
10267
|
+
instance.extendMeta(instance.plugins);
|
|
10268
|
+
/* process extended configs */
|
|
10269
|
+
instance.config = instance.extendConfig((_b = instance.config.extends) !== null && _b !== void 0 ? _b : []);
|
|
10270
|
+
/* reset extends as we already processed them, this prevents the next config
|
|
10271
|
+
* from reapplying config from extended config as well as duplicate entries
|
|
10272
|
+
* when merging arrays */
|
|
10273
|
+
instance.config.extends = [];
|
|
10274
|
+
/* rules explicitly set by passed options should have precedence over any
|
|
10275
|
+
* extended rules, not the other way around. */
|
|
10276
|
+
if (options.rules) {
|
|
10277
|
+
instance.config = mergeInternal(instance.config, { rules: options.rules });
|
|
10278
|
+
}
|
|
10279
|
+
return instance;
|
|
10280
|
+
}
|
|
10281
|
+
/**
|
|
10282
|
+
* @internal
|
|
10283
|
+
*/
|
|
10284
|
+
constructor(resolvers, options) {
|
|
10263
10285
|
this.transformers = [];
|
|
10264
10286
|
const initial = {
|
|
10265
10287
|
extends: [],
|
|
@@ -10268,24 +10290,11 @@ class Config {
|
|
|
10268
10290
|
transform: {},
|
|
10269
10291
|
};
|
|
10270
10292
|
this.config = mergeInternal(initial, options);
|
|
10271
|
-
this.
|
|
10293
|
+
this.configurations = new Map();
|
|
10272
10294
|
this.initialized = false;
|
|
10273
10295
|
this.resolvers = toArray(resolvers);
|
|
10274
|
-
|
|
10275
|
-
this.plugins =
|
|
10276
|
-
this.configurations = this.loadConfigurations(this.plugins);
|
|
10277
|
-
this.extendMeta(this.plugins);
|
|
10278
|
-
/* process extended configs */
|
|
10279
|
-
this.config = this.extendConfig((_b = this.config.extends) !== null && _b !== void 0 ? _b : []);
|
|
10280
|
-
/* reset extends as we already processed them, this prevents the next config
|
|
10281
|
-
* from reapplying config from extended config as well as duplicate entries
|
|
10282
|
-
* when merging arrays */
|
|
10283
|
-
this.config.extends = [];
|
|
10284
|
-
/* rules explicitly set by passed options should have precedence over any
|
|
10285
|
-
* extended rules, not the other way around. */
|
|
10286
|
-
if (options.rules) {
|
|
10287
|
-
this.config = mergeInternal(this.config, { rules: options.rules });
|
|
10288
|
-
}
|
|
10296
|
+
this.metaTable = null;
|
|
10297
|
+
this.plugins = [];
|
|
10289
10298
|
}
|
|
10290
10299
|
/**
|
|
10291
10300
|
* Initialize plugins, transforms etc.
|
|
@@ -10318,7 +10327,7 @@ class Config {
|
|
|
10318
10327
|
* @param rhs - Configuration to merge with this one.
|
|
10319
10328
|
*/
|
|
10320
10329
|
merge(resolvers, rhs) {
|
|
10321
|
-
return
|
|
10330
|
+
return Config.create(resolvers, mergeInternal(this.config, rhs.config));
|
|
10322
10331
|
}
|
|
10323
10332
|
extendConfig(entries) {
|
|
10324
10333
|
if (entries.length === 0) {
|
|
@@ -12314,7 +12323,7 @@ class HtmlValidate {
|
|
|
12314
12323
|
/** @public */
|
|
12315
12324
|
const name = "html-validate";
|
|
12316
12325
|
/** @public */
|
|
12317
|
-
const version = "8.7.
|
|
12326
|
+
const version = "8.7.4";
|
|
12318
12327
|
/** @public */
|
|
12319
12328
|
const bugs = "https://gitlab.com/html-validate/html-validate/issues/new";
|
|
12320
12329
|
|