html-validate 8.22.0 → 8.24.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.
@@ -46,7 +46,7 @@ exports.Validator = core.Validator;
46
46
  exports.WrappedError = core.WrappedError;
47
47
  exports.ariaNaming = core.ariaNaming;
48
48
  exports.classifyNodeText = core.classifyNodeText;
49
- exports.configPresets = core.Presets;
49
+ exports.configPresets = core.presets;
50
50
  exports.defineConfig = core.defineConfig;
51
51
  exports.definePlugin = core.definePlugin;
52
52
  exports.keywordPatternMatcher = core.keywordPatternMatcher;
package/dist/cjs/core.js CHANGED
@@ -10445,7 +10445,7 @@ const TRANSFORMER_API = {
10445
10445
 
10446
10446
  var defaultConfig = {};
10447
10447
 
10448
- const config$4 = {
10448
+ const config$5 = {
10449
10449
  rules: {
10450
10450
  "area-alt": ["error", { accessible: true }],
10451
10451
  "aria-hidden-body": "error",
@@ -10478,6 +10478,25 @@ const config$4 = {
10478
10478
  }
10479
10479
  };
10480
10480
 
10481
+ const config$4 = {
10482
+ rules: {
10483
+ /* doctype is usually not included when fetching source code from browser */
10484
+ "missing-doctype": "off",
10485
+ /* some frameworks (such as jQuery) often uses inline style, e.g. for
10486
+ * showing/hiding elements so it is counter-productive to check for inline
10487
+ * style. If anything it should be used on original sorce code only. */
10488
+ "no-inline-style": "off",
10489
+ /* scripts will often add markup with trailing whitespace */
10490
+ "no-trailing-whitespace": "off",
10491
+ /* browser normalizes boolean attributes */
10492
+ "attribute-boolean-style": "off",
10493
+ "attribute-empty-style": "off",
10494
+ /* the browser will often do what it wants, out of users control */
10495
+ "void-style": "off",
10496
+ "no-self-closing": "off"
10497
+ }
10498
+ };
10499
+
10481
10500
  const config$3 = {
10482
10501
  rules: {
10483
10502
  "input-missing-label": "error",
@@ -10618,7 +10637,8 @@ const config = {
10618
10637
  };
10619
10638
 
10620
10639
  const presets = {
10621
- "html-validate:a11y": config$4,
10640
+ "html-validate:a11y": config$5,
10641
+ "html-validate:browser": config$4,
10622
10642
  "html-validate:document": config$3,
10623
10643
  "html-validate:prettier": config$2,
10624
10644
  "html-validate:recommended": config$1,
@@ -10626,9 +10646,8 @@ const presets = {
10626
10646
  /* @deprecated aliases */
10627
10647
  "htmlvalidate:recommended": config$1,
10628
10648
  "htmlvalidate:document": config$3,
10629
- "html-validate:a17y": config$4
10649
+ "html-validate:a17y": config$5
10630
10650
  };
10631
- var Presets = presets;
10632
10651
 
10633
10652
  class ResolvedConfig {
10634
10653
  /**
@@ -11086,7 +11105,7 @@ class Config {
11086
11105
  }
11087
11106
  loadConfigurations(plugins) {
11088
11107
  const configs = /* @__PURE__ */ new Map();
11089
- for (const [name, config] of Object.entries(Presets)) {
11108
+ for (const [name, config] of Object.entries(presets)) {
11090
11109
  Config.validate(config, name);
11091
11110
  configs.set(name, config);
11092
11111
  }
@@ -11241,12 +11260,18 @@ class Config {
11241
11260
  }
11242
11261
 
11243
11262
  class ConfigLoader {
11244
- constructor(resolvers, config) {
11263
+ /**
11264
+ * Create a new ConfigLoader.
11265
+ *
11266
+ * @param resolvers - Sorted list of resolvers to use (in order).
11267
+ * @param configData - Default configuration (which all configurations will inherit from).
11268
+ */
11269
+ constructor(resolvers, configData) {
11245
11270
  const defaults = Config.empty();
11246
11271
  this.resolvers = resolvers;
11247
11272
  this.globalConfig = defaults.merge(
11248
11273
  this.resolvers,
11249
- config ? this.loadFromObject(config) : this.defaultConfig()
11274
+ configData ? this.loadFromObject(configData) : this.defaultConfig()
11250
11275
  );
11251
11276
  }
11252
11277
  /**
@@ -12843,7 +12868,7 @@ class HtmlValidate {
12843
12868
  }
12844
12869
 
12845
12870
  const name = "html-validate";
12846
- const version = "8.22.0";
12871
+ const version = "8.24.0";
12847
12872
  const bugs = "https://gitlab.com/html-validate/html-validate/issues/new";
12848
12873
 
12849
12874
  function definePlugin(plugin) {
@@ -13815,7 +13840,6 @@ exports.NestedError = NestedError;
13815
13840
  exports.NodeClosed = NodeClosed;
13816
13841
  exports.NodeType = NodeType;
13817
13842
  exports.Parser = Parser;
13818
- exports.Presets = Presets;
13819
13843
  exports.Reporter = Reporter;
13820
13844
  exports.ResolvedConfig = ResolvedConfig;
13821
13845
  exports.Rule = Rule;
@@ -13841,6 +13865,7 @@ exports.getFormatter = getFormatter;
13841
13865
  exports.ignore = ignore$1;
13842
13866
  exports.keywordPatternMatcher = keywordPatternMatcher;
13843
13867
  exports.name = name;
13868
+ exports.presets = presets;
13844
13869
  exports.ruleExists = ruleExists;
13845
13870
  exports.sliceLocation = sliceLocation;
13846
13871
  exports.staticResolver = staticResolver;