@accesslint/cli 0.3.0 → 0.3.2

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/audit.js CHANGED
@@ -25,11 +25,11 @@ function ensureGlobals(window) {
25
25
  globalsRegistered = true;
26
26
  }
27
27
  function audit(html, options = {}) {
28
- const config = {};
28
+ const config = {
29
+ componentMode: options.componentMode ?? isHTMLFragment(html)
30
+ };
29
31
  if (options.includeAAA)
30
32
  config.includeAAA = true;
31
- if (options.componentMode)
32
- config.componentMode = true;
33
33
  if (options.disabledRules?.length)
34
34
  config.disabledRules = options.disabledRules;
35
35
  configureRules(config);
package/dist/cli.js CHANGED
@@ -7766,11 +7766,11 @@ function ensureGlobals(window) {
7766
7766
  globalsRegistered = true;
7767
7767
  }
7768
7768
  function audit(html, options = {}) {
7769
- const config = {};
7769
+ const config = {
7770
+ componentMode: options.componentMode ?? isHTMLFragment(html)
7771
+ };
7770
7772
  if (options.includeAAA)
7771
7773
  config.includeAAA = true;
7772
- if (options.componentMode)
7773
- config.componentMode = true;
7774
7774
  if (options.disabledRules?.length)
7775
7775
  config.disabledRules = options.disabledRules;
7776
7776
  Bn(config);
@@ -7868,7 +7868,6 @@ var main = defineCommand({
7868
7868
  const disabledRules = args.disable ? args.disable.split(",").map((s2) => s2.trim()) : undefined;
7869
7869
  const result = audit(html, {
7870
7870
  includeAAA: args["include-aaa"],
7871
- componentMode: isHTMLFragment(html),
7872
7871
  disabledRules
7873
7872
  });
7874
7873
  console.log(format(result, args.format));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@accesslint/cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/AccessLint/cli"