html-validate 8.18.1 → 8.19.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/es/core.js CHANGED
@@ -5,7 +5,7 @@ import { n as naturalJoin } from './utils/natural-join.js';
5
5
  import fs from 'fs';
6
6
  import { codeFrameColumns } from '@babel/code-frame';
7
7
  import kleur from 'kleur';
8
- import { stylish as stylish$2 } from '@html-validate/stylish';
8
+ import { stylish as stylish$1 } from '@html-validate/stylish';
9
9
  import semver from 'semver';
10
10
 
11
11
  const $schema$2 = "http://json-schema.org/draft-06/schema#";
@@ -1469,6 +1469,9 @@ class DynamicValue {
1469
1469
  }
1470
1470
  }
1471
1471
 
1472
+ function isDynamicAttribute(attr) {
1473
+ return Boolean(attr == null ? void 0 : attr.isDynamic);
1474
+ }
1472
1475
  class Attribute {
1473
1476
  /**
1474
1477
  * @param key - Attribute name.
@@ -1710,7 +1713,8 @@ class DOMNode {
1710
1713
  }
1711
1714
  }
1712
1715
  cacheExists(key) {
1713
- return Boolean(this.cache && this.cache.has(key));
1716
+ var _a;
1717
+ return Boolean((_a = this.cache) == null ? void 0 : _a.has(key));
1714
1718
  }
1715
1719
  /**
1716
1720
  * Get the text (recursive) from all child nodes.
@@ -2810,7 +2814,7 @@ class HtmlElement extends DOMNode {
2810
2814
  }
2811
2815
  function isClosed(endToken, meta) {
2812
2816
  let closed = 0 /* Open */;
2813
- if (meta && meta.void) {
2817
+ if (meta == null ? void 0 : meta.void) {
2814
2818
  closed = 2 /* VoidOmitted */;
2815
2819
  }
2816
2820
  if (endToken.data[0] === "/>") {
@@ -3456,7 +3460,7 @@ function isAriaHidden(node, details) {
3456
3460
  function isHTMLHiddenImpl(node) {
3457
3461
  const getHiddenAttr = (node2) => {
3458
3462
  const hidden = node2.getAttribute("hidden");
3459
- return hidden !== null && hidden.isStatic;
3463
+ return Boolean(hidden == null ? void 0 : hidden.isStatic);
3460
3464
  };
3461
3465
  return {
3462
3466
  byParent: node.parent ? isHTMLHidden(node.parent) : false,
@@ -3474,7 +3478,7 @@ function isHTMLHidden(node, details) {
3474
3478
  function isInertImpl(node) {
3475
3479
  const getInertAttr = (node2) => {
3476
3480
  const inert = node2.getAttribute("inert");
3477
- return inert !== null && inert.isStatic;
3481
+ return Boolean(inert == null ? void 0 : inert.isStatic);
3478
3482
  };
3479
3483
  return {
3480
3484
  byParent: node.parent ? isInert(node.parent) : false,
@@ -3511,7 +3515,7 @@ function isPresentation(node) {
3511
3515
  return Boolean(node.cacheGet(ROLE_PRESENTATION_CACHE));
3512
3516
  }
3513
3517
  const meta = node.meta;
3514
- if (meta && meta.interactive) {
3518
+ if (meta == null ? void 0 : meta.interactive) {
3515
3519
  return node.cacheSet(ROLE_PRESENTATION_CACHE, false);
3516
3520
  }
3517
3521
  const tabindex = node.getAttribute("tabindex");
@@ -3945,10 +3949,11 @@ function parseAllow(value) {
3945
3949
  };
3946
3950
  }
3947
3951
  function matchList(value, list) {
3952
+ var _a;
3948
3953
  if (list.include && !list.include.some((it) => it.test(value))) {
3949
3954
  return false;
3950
3955
  }
3951
- if (list.exclude && list.exclude.some((it) => it.test(value))) {
3956
+ if ((_a = list.exclude) == null ? void 0 : _a.some((it) => it.test(value))) {
3952
3957
  return false;
3953
3958
  }
3954
3959
  return true;
@@ -4178,7 +4183,7 @@ class AreaAlt extends Rule {
4178
4183
  const href = area.getAttribute("href");
4179
4184
  const alt = area.getAttribute("alt");
4180
4185
  if (href) {
4181
- if (alt && alt.isDynamic) {
4186
+ if (isDynamicAttribute(alt)) {
4182
4187
  return;
4183
4188
  }
4184
4189
  const target = area.getAttributeValue("href");
@@ -4217,7 +4222,7 @@ class AriaHiddenBody extends Rule {
4217
4222
  this.on("tag:ready", this.isRelevant, (event) => {
4218
4223
  const { target } = event;
4219
4224
  const attr = target.getAttribute("aria-hidden");
4220
- if (!attr || !attr.valueMatches("true", true)) {
4225
+ if (!(attr == null ? void 0 : attr.valueMatches("true", true))) {
4221
4226
  return;
4222
4227
  }
4223
4228
  this.report(target, "aria-hidden must not be used on <body>", attr.keyLocation);
@@ -4439,8 +4444,9 @@ class AttrCase extends Rule {
4439
4444
  });
4440
4445
  }
4441
4446
  isIgnored(node) {
4447
+ var _a;
4442
4448
  if (this.options.ignoreForeign) {
4443
- return Boolean(node.meta && node.meta.foreign);
4449
+ return Boolean((_a = node.meta) == null ? void 0 : _a.foreign);
4444
4450
  } else {
4445
4451
  return false;
4446
4452
  }
@@ -4596,7 +4602,7 @@ class Lexer {
4596
4602
  * Called when entering a new state.
4597
4603
  */
4598
4604
  enter(context, state, data) {
4599
- if (state === State.TAG && data && data[0].startsWith("<")) {
4605
+ if (state === State.TAG && (data == null ? void 0 : data[0].startsWith("<"))) {
4600
4606
  if (data[0] === "<script") {
4601
4607
  context.contentModel = ContentModel.SCRIPT;
4602
4608
  } else if (data[0] === "<style") {
@@ -4813,8 +4819,9 @@ class AttrPattern extends Rule {
4813
4819
  });
4814
4820
  }
4815
4821
  isIgnored(node) {
4822
+ var _a;
4816
4823
  if (this.options.ignoreForeign) {
4817
- return Boolean(node.meta && node.meta.foreign);
4824
+ return Boolean((_a = node.meta) == null ? void 0 : _a.foreign);
4818
4825
  } else {
4819
4826
  return false;
4820
4827
  }
@@ -5813,6 +5820,7 @@ class ElementPermittedContent extends Rule {
5813
5820
  return this.validatePermittedContentImpl(cur, parent, rules);
5814
5821
  }
5815
5822
  validatePermittedContentImpl(cur, parent, rules) {
5823
+ var _a;
5816
5824
  if (!Validator.validatePermitted(cur, rules)) {
5817
5825
  const child = `<${cur.tagName}>`;
5818
5826
  const message = `${child} element is not permitted as content under ${parent.annotatedName}`;
@@ -5824,7 +5832,7 @@ class ElementPermittedContent extends Rule {
5824
5832
  this.report(cur, message, null, context);
5825
5833
  return true;
5826
5834
  }
5827
- if (cur.meta && cur.meta.transparent) {
5835
+ if ((_a = cur.meta) == null ? void 0 : _a.transparent) {
5828
5836
  const children = getTransparentChildren(cur, cur.meta.transparent);
5829
5837
  return children.map((child) => {
5830
5838
  return this.validatePermittedContentImpl(child, parent, rules);
@@ -6206,6 +6214,7 @@ class EmptyTitle extends Rule {
6206
6214
 
6207
6215
  const defaults$k = {
6208
6216
  allowArrayBrackets: true,
6217
+ allowCheckboxDefault: true,
6209
6218
  shared: ["radio", "button", "reset", "submit"]
6210
6219
  };
6211
6220
  const UNIQUE_CACHE_KEY = Symbol("form-elements-unique");
@@ -6215,7 +6224,26 @@ function haveName(name) {
6215
6224
  }
6216
6225
  function allowSharedName(node, shared) {
6217
6226
  const type = node.getAttribute("type");
6218
- return Boolean(type && type.valueMatches(shared, false));
6227
+ return Boolean(type == null ? void 0 : type.valueMatches(shared, false));
6228
+ }
6229
+ function isInputHidden(element) {
6230
+ return element.is("input") && element.getAttributeValue("type") === "hidden";
6231
+ }
6232
+ function isInputCheckbox(element) {
6233
+ return element.is("input") && element.getAttributeValue("type") === "checkbox";
6234
+ }
6235
+ function isCheckboxWithDefault(control, previous, options) {
6236
+ const { allowCheckboxDefault } = options;
6237
+ if (!allowCheckboxDefault) {
6238
+ return false;
6239
+ }
6240
+ if (!previous.potentialHiddenDefault) {
6241
+ return false;
6242
+ }
6243
+ if (!isInputCheckbox(control)) {
6244
+ return false;
6245
+ }
6246
+ return true;
6219
6247
  }
6220
6248
  function getDocumentation(context) {
6221
6249
  const trailer = "Each form control must have a unique name.";
@@ -6239,6 +6267,9 @@ class FormDupName extends Rule {
6239
6267
  allowArrayBrackets: {
6240
6268
  type: "boolean"
6241
6269
  },
6270
+ allowCheckboxDefault: {
6271
+ type: "boolean"
6272
+ },
6242
6273
  shared: {
6243
6274
  type: "array",
6244
6275
  items: {
@@ -6304,14 +6335,20 @@ class FormDupName extends Rule {
6304
6335
  }
6305
6336
  if (!details && isarray) {
6306
6337
  elements.set(basename, {
6307
- array: true
6338
+ array: true,
6339
+ potentialHiddenDefault: false
6308
6340
  });
6309
6341
  }
6310
6342
  if (isarray) {
6311
6343
  return;
6312
6344
  }
6313
6345
  }
6314
- if (elements.has(name)) {
6346
+ const previous = elements.get(name);
6347
+ if (previous) {
6348
+ if (isCheckboxWithDefault(control, previous, this.options)) {
6349
+ previous.potentialHiddenDefault = false;
6350
+ return;
6351
+ }
6315
6352
  const context = {
6316
6353
  name,
6317
6354
  kind: "duplicate"
@@ -6324,7 +6361,8 @@ class FormDupName extends Rule {
6324
6361
  });
6325
6362
  } else {
6326
6363
  elements.set(name, {
6327
- array: false
6364
+ array: false,
6365
+ potentialHiddenDefault: isInputHidden(control)
6328
6366
  });
6329
6367
  }
6330
6368
  }
@@ -6387,8 +6425,9 @@ const defaults$j = {
6387
6425
  sectioningRoots: ["dialog", '[role="dialog"]', '[role="alertdialog"]']
6388
6426
  };
6389
6427
  function isRelevant$6(event) {
6428
+ var _a;
6390
6429
  const node = event.target;
6391
- return Boolean(node.meta && node.meta.heading);
6430
+ return Boolean((_a = node.meta) == null ? void 0 : _a.heading);
6392
6431
  }
6393
6432
  function extractLevel(node) {
6394
6433
  const match = node.tagName.match(/^[hH](\d)$/);
@@ -6804,7 +6843,7 @@ class InputAttributes extends Rule {
6804
6843
  const HAS_ACCESSIBLE_TEXT_CACHE = Symbol(hasAccessibleName.name);
6805
6844
  function isHidden(node, context) {
6806
6845
  const { reference } = context;
6807
- if (reference && reference.isSameNode(node)) {
6846
+ if (reference == null ? void 0 : reference.isSameNode(node)) {
6808
6847
  return false;
6809
6848
  } else {
6810
6849
  return !inAccessibilityTree(node);
@@ -6856,7 +6895,7 @@ function hasAccessibleNameImpl(current, context) {
6856
6895
  if (isHidden(current, context)) {
6857
6896
  return false;
6858
6897
  }
6859
- const ignoreHiddenRoot = Boolean(reference && reference.isSameNode(current));
6898
+ const ignoreHiddenRoot = Boolean(reference == null ? void 0 : reference.isSameNode(current));
6860
6899
  const text = classifyNodeText(current, { accessible: true, ignoreHiddenRoot });
6861
6900
  if (text !== TextClassification.EMPTY_TEXT) {
6862
6901
  return true;
@@ -7177,20 +7216,23 @@ class MultipleLabeledControls extends Rule {
7177
7216
  }
7178
7217
  setup() {
7179
7218
  this.labelable = this.getTagsWithProperty("labelable").join(",");
7180
- this.on("element:ready", (event) => {
7181
- const { target } = event;
7182
- if (target.tagName !== "label") {
7183
- return;
7184
- }
7185
- const numControls = this.getNumLabledControls(target);
7186
- if (numControls <= 1) {
7187
- return;
7219
+ this.on("dom:ready", (event) => {
7220
+ const { document } = event;
7221
+ const labels = document.querySelectorAll("label");
7222
+ for (const label of labels) {
7223
+ const numControls = this.getNumLabledControls(label);
7224
+ if (numControls <= 1) {
7225
+ continue;
7226
+ }
7227
+ this.report(label, "<label> is associated with multiple controls", label.location);
7188
7228
  }
7189
- this.report(target, "<label> is associated with multiple controls", target.location);
7190
7229
  });
7191
7230
  }
7192
7231
  getNumLabledControls(src) {
7193
- const controls = src.querySelectorAll(this.labelable).map((node) => node.id);
7232
+ const controls = src.querySelectorAll(this.labelable).filter((node) => {
7233
+ var _a;
7234
+ return (_a = node.meta) == null ? void 0 : _a.labelable;
7235
+ }).map((node) => node.id);
7194
7236
  const attr = src.getAttribute("for");
7195
7237
  if (!attr || attr.isDynamic || !attr.value) {
7196
7238
  return controls.length;
@@ -7701,7 +7743,7 @@ class NoInlineStyle extends Rule {
7701
7743
  if (include && !include.includes(key)) {
7702
7744
  return false;
7703
7745
  }
7704
- if (exclude && exclude.includes(key)) {
7746
+ if (exclude == null ? void 0 : exclude.includes(key)) {
7705
7747
  return false;
7706
7748
  }
7707
7749
  return true;
@@ -8756,7 +8798,7 @@ class TelNonBreaking extends Rule {
8756
8798
  return false;
8757
8799
  }
8758
8800
  const attr = target.getAttribute("href");
8759
- if (!attr || !attr.valueMatches(/^tel:/, false)) {
8801
+ if (!(attr == null ? void 0 : attr.valueMatches(/^tel:/, false))) {
8760
8802
  return false;
8761
8803
  }
8762
8804
  return true;
@@ -8810,7 +8852,7 @@ class TelNonBreaking extends Rule {
8810
8852
 
8811
8853
  function hasNonEmptyAttribute(node, key) {
8812
8854
  const attr = node.getAttribute(key);
8813
- return Boolean(attr && attr.valueMatches(/.+/, true));
8855
+ return Boolean(attr == null ? void 0 : attr.valueMatches(/.+/, true));
8814
8856
  }
8815
8857
  function hasDefaultText(node) {
8816
8858
  if (!node.is("input")) {
@@ -8820,7 +8862,7 @@ function hasDefaultText(node) {
8820
8862
  return false;
8821
8863
  }
8822
8864
  const type = node.getAttribute("type");
8823
- return Boolean(type && type.valueMatches(/submit|reset/, false));
8865
+ return Boolean(type == null ? void 0 : type.valueMatches(/submit|reset/, false));
8824
8866
  }
8825
8867
  function isNonEmptyText(node) {
8826
8868
  if (isTextNode(node)) {
@@ -9734,7 +9776,7 @@ class ValidID extends Rule {
9734
9776
  const message = this.messages[context].replace("id", "ID").replace(/^(.)/, (m) => m.toUpperCase());
9735
9777
  const relaxedDescription = relaxed ? [] : [
9736
9778
  " - ID must begin with a letter",
9737
- " - ID must only contain alphanumerical characters, `-` and `_`"
9779
+ " - ID must only contain letters, digits, `-` and `_`"
9738
9780
  ];
9739
9781
  return {
9740
9782
  description: [
@@ -9769,12 +9811,12 @@ class ValidID extends Rule {
9769
9811
  if (relaxed) {
9770
9812
  return;
9771
9813
  }
9772
- if (value.match(/^[^a-zA-Z]/)) {
9814
+ if (value.match(/^[^\p{L}]/u)) {
9773
9815
  const context = 3 /* LEADING_CHARACTER */;
9774
9816
  this.report(event.target, this.messages[context], event.valueLocation, context);
9775
9817
  return;
9776
9818
  }
9777
- if (value.match(/[^a-zA-Z0-9-_]/)) {
9819
+ if (value.match(/[^\p{L}\p{N}_-]/u)) {
9778
9820
  const context = 4 /* DISALLOWED_CHARACTER */;
9779
9821
  this.report(event.target, this.messages[context], event.valueLocation, context);
9780
9822
  }
@@ -9785,7 +9827,7 @@ class ValidID extends Rule {
9785
9827
  [1 /* EMPTY */]: "element id must not be empty",
9786
9828
  [2 /* WHITESPACE */]: "element id must not contain whitespace",
9787
9829
  [3 /* LEADING_CHARACTER */]: "element id must begin with a letter",
9788
- [4 /* DISALLOWED_CHARACTER */]: "element id must only contain alphanumerical, dash and underscore characters"
9830
+ [4 /* DISALLOWED_CHARACTER */]: "element id must only contain letters, digits, dash and underscore characters"
9789
9831
  };
9790
9832
  }
9791
9833
  isRelevant(event) {
@@ -9912,7 +9954,7 @@ function styleDescription(style) {
9912
9954
  class H30 extends Rule {
9913
9955
  documentation() {
9914
9956
  return {
9915
- description: "WCAG 2.1 requires each `<a>` anchor link to have a text describing the purpose of the link using either plain text or an `<img>` with the `alt` attribute set.",
9957
+ description: "WCAG 2.1 requires each `<a href>` anchor link to have a text describing the purpose of the link using either plain text or an `<img>` with the `alt` attribute set.",
9916
9958
  url: "https://html-validate.org/rules/wcag/h30.html"
9917
9959
  };
9918
9960
  }
@@ -9920,6 +9962,9 @@ class H30 extends Rule {
9920
9962
  this.on("dom:ready", (event) => {
9921
9963
  const links = event.document.getElementsByTagName("a");
9922
9964
  for (const link of links) {
9965
+ if (!link.hasAttribute("href")) {
9966
+ continue;
9967
+ }
9923
9968
  if (!inAccessibilityTree(link)) {
9924
9969
  continue;
9925
9970
  }
@@ -9972,7 +10017,7 @@ function isSubmit(node) {
9972
10017
  }
9973
10018
  function isAssociated(id, node) {
9974
10019
  const form = node.getAttribute("form");
9975
- return Boolean(form && form.valueMatches(id, true));
10020
+ return Boolean(form == null ? void 0 : form.valueMatches(id, true));
9976
10021
  }
9977
10022
  function hasNestedSubmit(form) {
9978
10023
  const matches = form.querySelectorAll("button,input").filter(isSubmit).filter((node) => !node.hasAttribute("form"));
@@ -10188,7 +10233,6 @@ const bundledRules$1 = {
10188
10233
  "wcag/h67": H67,
10189
10234
  "wcag/h71": H71
10190
10235
  };
10191
- var WCAG = bundledRules$1;
10192
10236
 
10193
10237
  const bundledRules = {
10194
10238
  "allowed-links": AllowedLinks,
@@ -10274,7 +10318,7 @@ const bundledRules = {
10274
10318
  "valid-id": ValidID,
10275
10319
  "void-content": VoidContent,
10276
10320
  "void-style": VoidStyle,
10277
- ...WCAG
10321
+ ...bundledRules$1
10278
10322
  };
10279
10323
 
10280
10324
  var defaultConfig = {};
@@ -10311,7 +10355,6 @@ const config$4 = {
10311
10355
  "wcag/h71": "error"
10312
10356
  }
10313
10357
  };
10314
- var a11y = config$4;
10315
10358
 
10316
10359
  const config$3 = {
10317
10360
  rules: {
@@ -10322,7 +10365,6 @@ const config$3 = {
10322
10365
  "require-sri": "error"
10323
10366
  }
10324
10367
  };
10325
- var document = config$3;
10326
10368
 
10327
10369
  const config$2 = {
10328
10370
  rules: {
@@ -10331,7 +10373,6 @@ const config$2 = {
10331
10373
  "void-style": "off"
10332
10374
  }
10333
10375
  };
10334
- var prettier = config$2;
10335
10376
 
10336
10377
  const config$1 = {
10337
10378
  rules: {
@@ -10415,7 +10456,6 @@ const config$1 = {
10415
10456
  "wcag/h71": "error"
10416
10457
  }
10417
10458
  };
10418
- var recommended = config$1;
10419
10459
 
10420
10460
  const config = {
10421
10461
  rules: {
@@ -10454,18 +10494,17 @@ const config = {
10454
10494
  "void-content": "error"
10455
10495
  }
10456
10496
  };
10457
- var standard = config;
10458
10497
 
10459
10498
  const presets = {
10460
- "html-validate:a11y": a11y,
10461
- "html-validate:document": document,
10462
- "html-validate:prettier": prettier,
10463
- "html-validate:recommended": recommended,
10464
- "html-validate:standard": standard,
10499
+ "html-validate:a11y": config$4,
10500
+ "html-validate:document": config$3,
10501
+ "html-validate:prettier": config$2,
10502
+ "html-validate:recommended": config$1,
10503
+ "html-validate:standard": config,
10465
10504
  /* @deprecated aliases */
10466
- "htmlvalidate:recommended": recommended,
10467
- "htmlvalidate:document": document,
10468
- "html-validate:a17y": a11y
10505
+ "htmlvalidate:recommended": config$1,
10506
+ "htmlvalidate:document": config$3,
10507
+ "html-validate:a17y": config$4
10469
10508
  };
10470
10509
  var Presets = presets;
10471
10510
 
@@ -11334,8 +11373,9 @@ class Parser {
11334
11373
  /**
11335
11374
  * @internal
11336
11375
  */
11337
- /* eslint-disable-next-line complexity, sonarjs/cognitive-complexity -- technical debt, chould be refactored a bit */
11376
+ /* eslint-disable-next-line complexity -- technical debt, chould be refactored a bit */
11338
11377
  consumeTag(source, startToken, tokenStream) {
11378
+ var _a;
11339
11379
  const tokens = Array.from(
11340
11380
  this.consumeUntil(tokenStream, TokenType.TAG_CLOSE, startToken.location)
11341
11381
  );
@@ -11351,7 +11391,7 @@ class Parser {
11351
11391
  );
11352
11392
  const isStartTag = !startToken.data[1];
11353
11393
  const isClosing = !isStartTag || node.closed !== NodeClosed.Open;
11354
- const isForeign = node.meta && node.meta.foreign;
11394
+ const isForeign = (_a = node.meta) == null ? void 0 : _a.foreign;
11355
11395
  if (closeOptional) {
11356
11396
  const active = this.dom.getActive();
11357
11397
  active.closed = NodeClosed.ImplicitClosed;
@@ -12679,7 +12719,7 @@ class HtmlValidate {
12679
12719
  }
12680
12720
 
12681
12721
  const name = "html-validate";
12682
- const version = "8.18.1";
12722
+ const version = "8.19.0";
12683
12723
  const bugs = "https://gitlab.com/html-validate/html-validate/issues/new";
12684
12724
 
12685
12725
  function definePlugin(plugin) {
@@ -13365,7 +13405,6 @@ function checkstyleFormatter(results) {
13365
13405
  return output;
13366
13406
  }
13367
13407
  const formatter$3 = checkstyleFormatter;
13368
- var checkstyle = formatter$3;
13369
13408
 
13370
13409
  const defaults = {
13371
13410
  showLink: true,
@@ -13471,7 +13510,6 @@ function jsonFormatter(results) {
13471
13510
  return JSON.stringify(results);
13472
13511
  }
13473
13512
  const formatter$2 = jsonFormatter;
13474
- var json = formatter$2;
13475
13513
 
13476
13514
  function linkSummary(results) {
13477
13515
  const urls = results.reduce((result, it) => {
@@ -13490,7 +13528,7 @@ ${lines.join("")}
13490
13528
  `;
13491
13529
  }
13492
13530
  function stylish(results) {
13493
- const errors = stylish$2(
13531
+ const errors = stylish$1(
13494
13532
  results.map((it) => ({
13495
13533
  ...it,
13496
13534
  fixableErrorCount: 0,
@@ -13501,7 +13539,6 @@ function stylish(results) {
13501
13539
  return `${errors}${links}`;
13502
13540
  }
13503
13541
  const formatter$1 = stylish;
13504
- var stylish$1 = formatter$1;
13505
13542
 
13506
13543
  function textFormatter(results) {
13507
13544
  let output = "";
@@ -13529,14 +13566,13 @@ function textFormatter(results) {
13529
13566
  return total > 0 ? output : "";
13530
13567
  }
13531
13568
  const formatter = textFormatter;
13532
- var text = formatter;
13533
13569
 
13534
13570
  const availableFormatters = {
13535
- checkstyle,
13571
+ checkstyle: formatter$3,
13536
13572
  codeframe,
13537
- json,
13538
- stylish: stylish$1,
13539
- text
13573
+ json: formatter$2,
13574
+ stylish: formatter$1,
13575
+ text: formatter
13540
13576
  };
13541
13577
  function getFormatter(name) {
13542
13578
  return availableFormatters[name] ?? null;