html-validate 6.1.4 → 6.1.5
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/CHANGELOG.md +7 -0
- package/dist/cjs/core.js +22 -11
- package/dist/cjs/core.js.map +1 -1
- package/dist/es/core.js +22 -11
- package/dist/es/core.js.map +1 -1
- package/package.json +16 -16
package/dist/es/core.js
CHANGED
|
@@ -2917,7 +2917,7 @@ var TRANSFORMER_API;
|
|
|
2917
2917
|
/** @public */
|
|
2918
2918
|
const name = "html-validate";
|
|
2919
2919
|
/** @public */
|
|
2920
|
-
const version = "6.1.
|
|
2920
|
+
const version = "6.1.5";
|
|
2921
2921
|
/** @public */
|
|
2922
2922
|
const homepage = "https://html-validate.org";
|
|
2923
2923
|
/** @public */
|
|
@@ -9778,9 +9778,11 @@ class Config {
|
|
|
9778
9778
|
this.configurations = this.loadConfigurations(this.plugins);
|
|
9779
9779
|
this.extendMeta(this.plugins);
|
|
9780
9780
|
/* process extended configs */
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9781
|
+
this.config = this.extendConfig((_a = this.config.extends) !== null && _a !== void 0 ? _a : []);
|
|
9782
|
+
/* reset extends as we already processed them, this prevents the next config
|
|
9783
|
+
* from reapplying config from extended config as well as duplicate entries
|
|
9784
|
+
* when merging arrays */
|
|
9785
|
+
this.config.extends = [];
|
|
9784
9786
|
/* rules explicitly set by passed options should have precedence over any
|
|
9785
9787
|
* extended rules, not the other way around. */
|
|
9786
9788
|
if (options && options.rules) {
|
|
@@ -9878,15 +9880,23 @@ class Config {
|
|
|
9878
9880
|
merge(rhs) {
|
|
9879
9881
|
return new Config(mergeInternal(this.config, rhs.config));
|
|
9880
9882
|
}
|
|
9881
|
-
extendConfig(
|
|
9882
|
-
|
|
9883
|
-
|
|
9884
|
-
base = this.configurations.get(entry);
|
|
9883
|
+
extendConfig(entries) {
|
|
9884
|
+
if (entries.length === 0) {
|
|
9885
|
+
return this.config;
|
|
9885
9886
|
}
|
|
9886
|
-
|
|
9887
|
-
|
|
9887
|
+
let base = {};
|
|
9888
|
+
for (let i = 0; i < entries.length; i++) {
|
|
9889
|
+
const entry = entries[i];
|
|
9890
|
+
let extended;
|
|
9891
|
+
if (this.configurations.has(entry)) {
|
|
9892
|
+
extended = this.configurations.get(entry);
|
|
9893
|
+
}
|
|
9894
|
+
else {
|
|
9895
|
+
extended = Config.fromFile(entry).config;
|
|
9896
|
+
}
|
|
9897
|
+
base = mergeInternal(base, extended);
|
|
9888
9898
|
}
|
|
9889
|
-
return mergeInternal(this.config
|
|
9899
|
+
return mergeInternal(base, this.config);
|
|
9890
9900
|
}
|
|
9891
9901
|
/**
|
|
9892
9902
|
* Get element metadata.
|
|
@@ -9961,6 +9971,7 @@ class Config {
|
|
|
9961
9971
|
}
|
|
9962
9972
|
});
|
|
9963
9973
|
}
|
|
9974
|
+
delete config.extends;
|
|
9964
9975
|
return config;
|
|
9965
9976
|
}
|
|
9966
9977
|
/**
|