@storm-software/markdownlint 0.18.35 → 0.18.36

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/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-0.18.34-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-0.18.35-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
@@ -1,25 +1,21 @@
1
1
  import {
2
2
  require_no_default_alt_text
3
- } from "./chunk-T5XN24SU.mjs";
3
+ } from "./chunk-GGMQ54WL.mjs";
4
4
  import {
5
5
  require_no_empty_alt_text
6
- } from "./chunk-UP2FAX2A.mjs";
6
+ } from "./chunk-I2NU2OJP.mjs";
7
7
  import {
8
8
  require_no_generic_link_text
9
- } from "./chunk-BLA57FQS.mjs";
9
+ } from "./chunk-YJIN6DTZ.mjs";
10
10
  import {
11
11
  __toESM
12
- } from "./chunk-A3UDIEI3.mjs";
12
+ } from "./chunk-UJCSKKID.mjs";
13
13
 
14
14
  // src/rules/index.ts
15
15
  var SS01 = __toESM(require_no_default_alt_text());
16
16
  var SS03 = __toESM(require_no_empty_alt_text());
17
17
  var SS02 = __toESM(require_no_generic_link_text());
18
- var rules = [
19
- SS01,
20
- SS02,
21
- SS03
22
- ];
18
+ var rules = [SS01, SS02, SS03];
23
19
 
24
20
  export {
25
21
  rules
@@ -1,39 +1,32 @@
1
1
  import {
2
- __commonJS,
3
- __name
4
- } from "./chunk-A3UDIEI3.mjs";
2
+ __commonJS
3
+ } from "./chunk-UJCSKKID.mjs";
5
4
 
6
5
  // src/rules/no-default-alt-text.ts
7
6
  var require_no_default_alt_text = __commonJS({
8
7
  "src/rules/no-default-alt-text.ts"(exports, module) {
9
8
  var defaultScreenshotRegex = `(?:screen|clean) ?(?:shot|cast) \\d{4}-\\d{2}-\\d{2}[^'"\\]]*`;
10
9
  var imageRegex = "image";
11
- var combinedRegex = `(${[
12
- defaultScreenshotRegex,
13
- imageRegex
14
- ].join("|")})`;
10
+ var combinedRegex = `(${[defaultScreenshotRegex, imageRegex].join("|")})`;
15
11
  var markdownAltRegex = new RegExp(`!\\[${combinedRegex}\\]\\(.*\\)`, "gid");
16
12
  var htmlAltRegex = new RegExp(`alt=["']${combinedRegex}["']`, "gid");
17
13
  module.exports = {
18
- names: [
19
- "SSW01",
20
- "no-default-alt-text"
21
- ],
14
+ names: ["SSW01", "no-default-alt-text"],
22
15
  description: "Images should have meaningful alternative text (alt text)",
23
- information: new URL("https://github.com/github/markdownlint-github/blob/main/docs/rules/GH001-no-default-alt-text.md"),
24
- tags: [
25
- "accessibility",
26
- "images"
27
- ],
28
- function: /* @__PURE__ */ __name(function SS001(params, onError) {
29
- const htmlTagsWithImages = params.parsers.markdownit.tokens.filter((token) => {
30
- return token.type === "html_block" && token.content.includes("<img") || token.type === "inline" && token.content.includes("<img") && token.children.some((child) => child.type === "html_inline");
31
- });
32
- const inlineImages = params.parsers.markdownit.tokens.filter((token) => token.type === "inline" && token.children.some((child) => child.type === "image"));
33
- for (const token of [
34
- ...htmlTagsWithImages,
35
- ...inlineImages
36
- ]) {
16
+ information: new URL(
17
+ "https://github.com/github/markdownlint-github/blob/main/docs/rules/GH001-no-default-alt-text.md"
18
+ ),
19
+ tags: ["accessibility", "images"],
20
+ function: function SS001(params, onError) {
21
+ const htmlTagsWithImages = params.parsers.markdownit.tokens.filter(
22
+ (token) => {
23
+ return token.type === "html_block" && token.content.includes("<img") || token.type === "inline" && token.content.includes("<img") && token.children.some((child) => child.type === "html_inline");
24
+ }
25
+ );
26
+ const inlineImages = params.parsers.markdownit.tokens.filter(
27
+ (token) => token.type === "inline" && token.children.some((child) => child.type === "image")
28
+ );
29
+ for (const token of [...htmlTagsWithImages, ...inlineImages]) {
37
30
  const lineRange = token.map;
38
31
  const lineNumber = token.lineNumber;
39
32
  const lines = params.lines.slice(lineRange[0], lineRange[1]);
@@ -54,16 +47,13 @@ var require_no_default_alt_text = __commonJS({
54
47
  const [startIndex] = match.indices[1];
55
48
  onError({
56
49
  lineNumber: lineNumber + i,
57
- range: [
58
- startIndex + 1,
59
- altText.length
60
- ],
50
+ range: [startIndex + 1, altText.length],
61
51
  detail: `Flagged alt: ${altText}`
62
52
  });
63
53
  }
64
54
  }
65
55
  }
66
- }, "SS001")
56
+ }
67
57
  };
68
58
  }
69
59
  });
@@ -1,26 +1,23 @@
1
1
  import {
2
- __commonJS,
3
- __name
4
- } from "./chunk-A3UDIEI3.mjs";
2
+ __commonJS
3
+ } from "./chunk-UJCSKKID.mjs";
5
4
 
6
5
  // src/rules/no-empty-alt-text.ts
7
6
  var require_no_empty_alt_text = __commonJS({
8
7
  "src/rules/no-empty-alt-text.ts"(exports, module) {
9
8
  module.exports = {
10
- names: [
11
- "SSW03",
12
- "no-empty-alt-text"
13
- ],
9
+ names: ["SSW03", "no-empty-alt-text"],
14
10
  description: "Please provide an alternative text for the image.",
15
- information: new URL("https://github.com/github/markdownlint-github/blob/main/docs/rules/GH003-no-empty-alt-text.md"),
16
- tags: [
17
- "accessibility",
18
- "images"
19
- ],
20
- function: /* @__PURE__ */ __name(function SS003(params, onError) {
21
- const htmlTagsWithImages = params.parsers.markdownit.tokens.filter((token) => {
22
- return token.type === "html_block" && token.content.includes("<img") || token.type === "inline" && token.content.includes("<img") && token.children.some((child) => child.type === "html_inline");
23
- });
11
+ information: new URL(
12
+ "https://github.com/github/markdownlint-github/blob/main/docs/rules/GH003-no-empty-alt-text.md"
13
+ ),
14
+ tags: ["accessibility", "images"],
15
+ function: function SS003(params, onError) {
16
+ const htmlTagsWithImages = params.parsers.markdownit.tokens.filter(
17
+ (token) => {
18
+ return token.type === "html_block" && token.content.includes("<img") || token.type === "inline" && token.content.includes("<img") && token.children.some((child) => child.type === "html_inline");
19
+ }
20
+ );
24
21
  const ImageRegex = new RegExp(/<img(.*?)>/, "gid");
25
22
  const htmlEmptyAltRegex = new RegExp(/alt=['"]['"]/, "gid");
26
23
  for (const token of htmlTagsWithImages) {
@@ -39,16 +36,13 @@ var require_no_empty_alt_text = __commonJS({
39
36
  const startIndex = emptyAltMatches.indices[0][0];
40
37
  onError({
41
38
  lineNumber: lineNumber + i,
42
- range: [
43
- imageTagIndex + startIndex + 1,
44
- matchingContent.length
45
- ]
39
+ range: [imageTagIndex + startIndex + 1, matchingContent.length]
46
40
  });
47
41
  }
48
42
  }
49
43
  }
50
44
  }
51
- }, "SS003")
45
+ }
52
46
  };
53
47
  }
54
48
  });
@@ -0,0 +1,22 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkLJKIR7QGjs = require('./chunk-LJKIR7QG.js');
4
+
5
+
6
+ var _chunkXHKGFYKRjs = require('./chunk-XHKGFYKR.js');
7
+
8
+
9
+ var _chunkWMAPY4NDjs = require('./chunk-WMAPY4ND.js');
10
+
11
+
12
+ var _chunkJSBRDJBEjs = require('./chunk-JSBRDJBE.js');
13
+
14
+ // src/rules/index.ts
15
+ var SS01 = _chunkJSBRDJBEjs.__toESM.call(void 0, _chunkLJKIR7QGjs.require_no_default_alt_text.call(void 0, ));
16
+ var SS03 = _chunkJSBRDJBEjs.__toESM.call(void 0, _chunkXHKGFYKRjs.require_no_empty_alt_text.call(void 0, ));
17
+ var SS02 = _chunkJSBRDJBEjs.__toESM.call(void 0, _chunkWMAPY4NDjs.require_no_generic_link_text.call(void 0, ));
18
+ var rules = [SS01, SS02, SS03];
19
+
20
+
21
+
22
+ exports.rules = rules;
@@ -4,7 +4,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
8
7
  var __commonJS = (cb, mod) => function __require() {
9
8
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
9
  };
@@ -28,5 +27,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
27
 
29
28
 
30
29
 
31
-
32
- exports.__name = __name; exports.__commonJS = __commonJS; exports.__toESM = __toESM;
30
+ exports.__commonJS = __commonJS; exports.__toESM = __toESM;
@@ -1,39 +1,32 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
-
4
- var _chunk5BKT4CS5js = require('./chunk-5BKT4CS5.js');
3
+ var _chunkJSBRDJBEjs = require('./chunk-JSBRDJBE.js');
5
4
 
6
5
  // src/rules/no-default-alt-text.ts
7
- var require_no_default_alt_text = _chunk5BKT4CS5js.__commonJS.call(void 0, {
6
+ var require_no_default_alt_text = _chunkJSBRDJBEjs.__commonJS.call(void 0, {
8
7
  "src/rules/no-default-alt-text.ts"(exports, module) {
9
8
  var defaultScreenshotRegex = `(?:screen|clean) ?(?:shot|cast) \\d{4}-\\d{2}-\\d{2}[^'"\\]]*`;
10
9
  var imageRegex = "image";
11
- var combinedRegex = `(${[
12
- defaultScreenshotRegex,
13
- imageRegex
14
- ].join("|")})`;
10
+ var combinedRegex = `(${[defaultScreenshotRegex, imageRegex].join("|")})`;
15
11
  var markdownAltRegex = new RegExp(`!\\[${combinedRegex}\\]\\(.*\\)`, "gid");
16
12
  var htmlAltRegex = new RegExp(`alt=["']${combinedRegex}["']`, "gid");
17
13
  module.exports = {
18
- names: [
19
- "SSW01",
20
- "no-default-alt-text"
21
- ],
14
+ names: ["SSW01", "no-default-alt-text"],
22
15
  description: "Images should have meaningful alternative text (alt text)",
23
- information: new URL("https://github.com/github/markdownlint-github/blob/main/docs/rules/GH001-no-default-alt-text.md"),
24
- tags: [
25
- "accessibility",
26
- "images"
27
- ],
28
- function: /* @__PURE__ */ _chunk5BKT4CS5js.__name.call(void 0, function SS001(params, onError) {
29
- const htmlTagsWithImages = params.parsers.markdownit.tokens.filter((token) => {
30
- return token.type === "html_block" && token.content.includes("<img") || token.type === "inline" && token.content.includes("<img") && token.children.some((child) => child.type === "html_inline");
31
- });
32
- const inlineImages = params.parsers.markdownit.tokens.filter((token) => token.type === "inline" && token.children.some((child) => child.type === "image"));
33
- for (const token of [
34
- ...htmlTagsWithImages,
35
- ...inlineImages
36
- ]) {
16
+ information: new URL(
17
+ "https://github.com/github/markdownlint-github/blob/main/docs/rules/GH001-no-default-alt-text.md"
18
+ ),
19
+ tags: ["accessibility", "images"],
20
+ function: function SS001(params, onError) {
21
+ const htmlTagsWithImages = params.parsers.markdownit.tokens.filter(
22
+ (token) => {
23
+ return token.type === "html_block" && token.content.includes("<img") || token.type === "inline" && token.content.includes("<img") && token.children.some((child) => child.type === "html_inline");
24
+ }
25
+ );
26
+ const inlineImages = params.parsers.markdownit.tokens.filter(
27
+ (token) => token.type === "inline" && token.children.some((child) => child.type === "image")
28
+ );
29
+ for (const token of [...htmlTagsWithImages, ...inlineImages]) {
37
30
  const lineRange = token.map;
38
31
  const lineNumber = token.lineNumber;
39
32
  const lines = params.lines.slice(lineRange[0], lineRange[1]);
@@ -54,16 +47,13 @@ var require_no_default_alt_text = _chunk5BKT4CS5js.__commonJS.call(void 0, {
54
47
  const [startIndex] = match.indices[1];
55
48
  onError({
56
49
  lineNumber: lineNumber + i,
57
- range: [
58
- startIndex + 1,
59
- altText.length
60
- ],
50
+ range: [startIndex + 1, altText.length],
61
51
  detail: `Flagged alt: ${altText}`
62
52
  });
63
53
  }
64
54
  }
65
55
  }
66
- }, "SS001")
56
+ }
67
57
  };
68
58
  }
69
59
  });
@@ -4,7 +4,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
8
7
  var __commonJS = (cb, mod) => function __require() {
9
8
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
9
  };
@@ -26,7 +25,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
25
  ));
27
26
 
28
27
  export {
29
- __name,
30
28
  __commonJS,
31
29
  __toESM
32
30
  };
@@ -1,15 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
-
4
- var _chunk5BKT4CS5js = require('./chunk-5BKT4CS5.js');
3
+ var _chunkJSBRDJBEjs = require('./chunk-JSBRDJBE.js');
5
4
 
6
5
  // src/rules/no-generic-link-text.ts
7
- var require_no_generic_link_text = _chunk5BKT4CS5js.__commonJS.call(void 0, {
6
+ var require_no_generic_link_text = _chunkJSBRDJBEjs.__commonJS.call(void 0, {
8
7
  "src/rules/no-generic-link-text.ts"(exports, module) {
9
8
  function stripAndDowncaseText(text) {
10
9
  return text.toLowerCase().replace(/[.,/#!$%^&*;:{}=\-_`~()]/g, "").replace(/\s+/g, " ").trim();
11
10
  }
12
- _chunk5BKT4CS5js.__name.call(void 0, stripAndDowncaseText, "stripAndDowncaseText");
13
11
  var bannedLinkText = [
14
12
  "read more",
15
13
  "learn more",
@@ -19,21 +17,21 @@ var require_no_generic_link_text = _chunk5BKT4CS5js.__commonJS.call(void 0, {
19
17
  "link"
20
18
  ];
21
19
  module.exports = {
22
- names: [
23
- "SSW02",
24
- "no-generic-link-text"
25
- ],
20
+ names: ["SSW02", "no-generic-link-text"],
26
21
  description: "Avoid using generic link text like `Learn more` or `Click here`",
27
- information: new URL("https://github.com/github/markdownlint-github/blob/main/docs/rules/GH002-no-generic-link-text.md"),
28
- tags: [
29
- "accessibility",
30
- "links"
31
- ],
32
- function: /* @__PURE__ */ _chunk5BKT4CS5js.__name.call(void 0, function SS002(params, onError) {
33
- let bannedLinkTexts = bannedLinkText.concat(params.config.additional_banned_texts || []);
22
+ information: new URL(
23
+ "https://github.com/github/markdownlint-github/blob/main/docs/rules/GH002-no-generic-link-text.md"
24
+ ),
25
+ tags: ["accessibility", "links"],
26
+ function: function SS002(params, onError) {
27
+ let bannedLinkTexts = bannedLinkText.concat(
28
+ params.config.additional_banned_texts || []
29
+ );
34
30
  const exceptions = params.config.exceptions || [];
35
31
  if (exceptions.length > 0) {
36
- bannedLinkTexts = bannedLinkTexts.filter((text) => !exceptions.includes(text));
32
+ bannedLinkTexts = bannedLinkTexts.filter(
33
+ (text) => !exceptions.includes(text)
34
+ );
37
35
  }
38
36
  const inlineTokens = params.tokens.filter((t) => t.type === "inline");
39
37
  for (const token of inlineTokens) {
@@ -58,7 +56,7 @@ var require_no_generic_link_text = _chunk5BKT4CS5js.__commonJS.call(void 0, {
58
56
  }
59
57
  }
60
58
  }
61
- }, "SS002")
59
+ }
62
60
  };
63
61
  }
64
62
  });
@@ -1,26 +1,23 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
-
4
- var _chunk5BKT4CS5js = require('./chunk-5BKT4CS5.js');
3
+ var _chunkJSBRDJBEjs = require('./chunk-JSBRDJBE.js');
5
4
 
6
5
  // src/rules/no-empty-alt-text.ts
7
- var require_no_empty_alt_text = _chunk5BKT4CS5js.__commonJS.call(void 0, {
6
+ var require_no_empty_alt_text = _chunkJSBRDJBEjs.__commonJS.call(void 0, {
8
7
  "src/rules/no-empty-alt-text.ts"(exports, module) {
9
8
  module.exports = {
10
- names: [
11
- "SSW03",
12
- "no-empty-alt-text"
13
- ],
9
+ names: ["SSW03", "no-empty-alt-text"],
14
10
  description: "Please provide an alternative text for the image.",
15
- information: new URL("https://github.com/github/markdownlint-github/blob/main/docs/rules/GH003-no-empty-alt-text.md"),
16
- tags: [
17
- "accessibility",
18
- "images"
19
- ],
20
- function: /* @__PURE__ */ _chunk5BKT4CS5js.__name.call(void 0, function SS003(params, onError) {
21
- const htmlTagsWithImages = params.parsers.markdownit.tokens.filter((token) => {
22
- return token.type === "html_block" && token.content.includes("<img") || token.type === "inline" && token.content.includes("<img") && token.children.some((child) => child.type === "html_inline");
23
- });
11
+ information: new URL(
12
+ "https://github.com/github/markdownlint-github/blob/main/docs/rules/GH003-no-empty-alt-text.md"
13
+ ),
14
+ tags: ["accessibility", "images"],
15
+ function: function SS003(params, onError) {
16
+ const htmlTagsWithImages = params.parsers.markdownit.tokens.filter(
17
+ (token) => {
18
+ return token.type === "html_block" && token.content.includes("<img") || token.type === "inline" && token.content.includes("<img") && token.children.some((child) => child.type === "html_inline");
19
+ }
20
+ );
24
21
  const ImageRegex = new RegExp(/<img(.*?)>/, "gid");
25
22
  const htmlEmptyAltRegex = new RegExp(/alt=['"]['"]/, "gid");
26
23
  for (const token of htmlTagsWithImages) {
@@ -39,16 +36,13 @@ var require_no_empty_alt_text = _chunk5BKT4CS5js.__commonJS.call(void 0, {
39
36
  const startIndex = emptyAltMatches.indices[0][0];
40
37
  onError({
41
38
  lineNumber: lineNumber + i,
42
- range: [
43
- imageTagIndex + startIndex + 1,
44
- matchingContent.length
45
- ]
39
+ range: [imageTagIndex + startIndex + 1, matchingContent.length]
46
40
  });
47
41
  }
48
42
  }
49
43
  }
50
44
  }
51
- }, "SS003")
45
+ }
52
46
  };
53
47
  }
54
48
  });
@@ -1,7 +1,6 @@
1
1
  import {
2
- __commonJS,
3
- __name
4
- } from "./chunk-A3UDIEI3.mjs";
2
+ __commonJS
3
+ } from "./chunk-UJCSKKID.mjs";
5
4
 
6
5
  // src/rules/no-generic-link-text.ts
7
6
  var require_no_generic_link_text = __commonJS({
@@ -9,7 +8,6 @@ var require_no_generic_link_text = __commonJS({
9
8
  function stripAndDowncaseText(text) {
10
9
  return text.toLowerCase().replace(/[.,/#!$%^&*;:{}=\-_`~()]/g, "").replace(/\s+/g, " ").trim();
11
10
  }
12
- __name(stripAndDowncaseText, "stripAndDowncaseText");
13
11
  var bannedLinkText = [
14
12
  "read more",
15
13
  "learn more",
@@ -19,21 +17,21 @@ var require_no_generic_link_text = __commonJS({
19
17
  "link"
20
18
  ];
21
19
  module.exports = {
22
- names: [
23
- "SSW02",
24
- "no-generic-link-text"
25
- ],
20
+ names: ["SSW02", "no-generic-link-text"],
26
21
  description: "Avoid using generic link text like `Learn more` or `Click here`",
27
- information: new URL("https://github.com/github/markdownlint-github/blob/main/docs/rules/GH002-no-generic-link-text.md"),
28
- tags: [
29
- "accessibility",
30
- "links"
31
- ],
32
- function: /* @__PURE__ */ __name(function SS002(params, onError) {
33
- let bannedLinkTexts = bannedLinkText.concat(params.config.additional_banned_texts || []);
22
+ information: new URL(
23
+ "https://github.com/github/markdownlint-github/blob/main/docs/rules/GH002-no-generic-link-text.md"
24
+ ),
25
+ tags: ["accessibility", "links"],
26
+ function: function SS002(params, onError) {
27
+ let bannedLinkTexts = bannedLinkText.concat(
28
+ params.config.additional_banned_texts || []
29
+ );
34
30
  const exceptions = params.config.exceptions || [];
35
31
  if (exceptions.length > 0) {
36
- bannedLinkTexts = bannedLinkTexts.filter((text) => !exceptions.includes(text));
32
+ bannedLinkTexts = bannedLinkTexts.filter(
33
+ (text) => !exceptions.includes(text)
34
+ );
37
35
  }
38
36
  const inlineTokens = params.tokens.filter((t) => t.type === "inline");
39
37
  for (const token of inlineTokens) {
@@ -58,7 +56,7 @@ var require_no_generic_link_text = __commonJS({
58
56
  }
59
57
  }
60
58
  }
61
- }, "SS002")
59
+ }
62
60
  };
63
61
  }
64
62
  });
package/dist/index.js CHANGED
@@ -1,12 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkZPSREAWVjs = require('./chunk-ZPSREAWV.js');
4
- require('./chunk-T2GN3E2Q.js');
5
- require('./chunk-ZD5PYAVS.js');
6
- require('./chunk-CSEVGJXW.js');
7
-
8
-
9
- var _chunk5BKT4CS5js = require('./chunk-5BKT4CS5.js');
3
+ var _chunkJ4SXAUTHjs = require('./chunk-J4SXAUTH.js');
4
+ require('./chunk-LJKIR7QG.js');
5
+ require('./chunk-XHKGFYKR.js');
6
+ require('./chunk-WMAPY4ND.js');
7
+ require('./chunk-JSBRDJBE.js');
10
8
 
11
9
  // src/index.ts
12
10
  var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
@@ -102,9 +100,7 @@ var markdownlintConfig = {
102
100
  shortcut_syntax: false
103
101
  },
104
102
  "link-image-reference-definitions": {
105
- ignored_definitions: [
106
- "//"
107
- ]
103
+ ignored_definitions: ["//"]
108
104
  },
109
105
  "link-image-style": {
110
106
  autolink: true,
@@ -126,21 +122,17 @@ var markdownlintConfig = {
126
122
 
127
123
  // src/index.ts
128
124
  var offByDefault = [];
129
- var baseConfig = {
130
- ...markdownlintConfig
131
- };
132
- for (const rule of _chunkZPSREAWVjs.rules) {
125
+ var baseConfig = { ...markdownlintConfig };
126
+ for (const rule of _chunkJ4SXAUTHjs.rules) {
133
127
  const ruleName = _optionalChain([rule, 'optionalAccess', _ => _.names, 'access', _2 => _2[1]]);
134
128
  if (ruleName) {
135
129
  baseConfig[ruleName] = offByDefault.includes(ruleName) ? false : true;
136
130
  }
137
131
  }
138
- var init = /* @__PURE__ */ _chunk5BKT4CS5js.__name.call(void 0, function init2(defaultConfig) {
132
+ var init = function init2(defaultConfig) {
139
133
  return _defu2.default.call(void 0, defaultConfig, baseConfig);
140
- }, "init");
141
- var rules2 = [
142
- ..._chunkZPSREAWVjs.rules
143
- ];
134
+ };
135
+ var rules2 = [..._chunkJ4SXAUTHjs.rules];
144
136
  var config = baseConfig;
145
137
  var index_default = config;
146
138
 
package/dist/index.mjs CHANGED
@@ -1,12 +1,10 @@
1
1
  import {
2
2
  rules
3
- } from "./chunk-KF4NZASG.mjs";
4
- import "./chunk-T5XN24SU.mjs";
5
- import "./chunk-UP2FAX2A.mjs";
6
- import "./chunk-BLA57FQS.mjs";
7
- import {
8
- __name
9
- } from "./chunk-A3UDIEI3.mjs";
3
+ } from "./chunk-3ZA6O7AY.mjs";
4
+ import "./chunk-GGMQ54WL.mjs";
5
+ import "./chunk-I2NU2OJP.mjs";
6
+ import "./chunk-YJIN6DTZ.mjs";
7
+ import "./chunk-UJCSKKID.mjs";
10
8
 
11
9
  // src/index.ts
12
10
  import defu from "defu";
@@ -102,9 +100,7 @@ var markdownlintConfig = {
102
100
  shortcut_syntax: false
103
101
  },
104
102
  "link-image-reference-definitions": {
105
- ignored_definitions: [
106
- "//"
107
- ]
103
+ ignored_definitions: ["//"]
108
104
  },
109
105
  "link-image-style": {
110
106
  autolink: true,
@@ -126,21 +122,17 @@ var markdownlintConfig = {
126
122
 
127
123
  // src/index.ts
128
124
  var offByDefault = [];
129
- var baseConfig = {
130
- ...markdownlintConfig
131
- };
125
+ var baseConfig = { ...markdownlintConfig };
132
126
  for (const rule of rules) {
133
127
  const ruleName = rule?.names[1];
134
128
  if (ruleName) {
135
129
  baseConfig[ruleName] = offByDefault.includes(ruleName) ? false : true;
136
130
  }
137
131
  }
138
- var init = /* @__PURE__ */ __name(function init2(defaultConfig) {
132
+ var init = function init2(defaultConfig) {
139
133
  return defu(defaultConfig, baseConfig);
140
- }, "init");
141
- var rules2 = [
142
- ...rules
143
- ];
134
+ };
135
+ var rules2 = [...rules];
144
136
  var config = baseConfig;
145
137
  var index_default = config;
146
138
  export {
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkZPSREAWVjs = require('../chunk-ZPSREAWV.js');
4
- require('../chunk-T2GN3E2Q.js');
5
- require('../chunk-ZD5PYAVS.js');
6
- require('../chunk-CSEVGJXW.js');
7
- require('../chunk-5BKT4CS5.js');
3
+ var _chunkJ4SXAUTHjs = require('../chunk-J4SXAUTH.js');
4
+ require('../chunk-LJKIR7QG.js');
5
+ require('../chunk-XHKGFYKR.js');
6
+ require('../chunk-WMAPY4ND.js');
7
+ require('../chunk-JSBRDJBE.js');
8
8
 
9
9
 
10
- exports.rules = _chunkZPSREAWVjs.rules;
10
+ exports.rules = _chunkJ4SXAUTHjs.rules;
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  rules
3
- } from "../chunk-KF4NZASG.mjs";
4
- import "../chunk-T5XN24SU.mjs";
5
- import "../chunk-UP2FAX2A.mjs";
6
- import "../chunk-BLA57FQS.mjs";
7
- import "../chunk-A3UDIEI3.mjs";
3
+ } from "../chunk-3ZA6O7AY.mjs";
4
+ import "../chunk-GGMQ54WL.mjs";
5
+ import "../chunk-I2NU2OJP.mjs";
6
+ import "../chunk-YJIN6DTZ.mjs";
7
+ import "../chunk-UJCSKKID.mjs";
8
8
  export {
9
9
  rules
10
10
  };
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkT2GN3E2Qjs = require('../chunk-T2GN3E2Q.js');
4
- require('../chunk-5BKT4CS5.js');
5
- exports. default = _chunkT2GN3E2Qjs.require_no_default_alt_text.call(void 0, );
3
+ var _chunkLJKIR7QGjs = require('../chunk-LJKIR7QG.js');
4
+ require('../chunk-JSBRDJBE.js');
5
+ exports. default = _chunkLJKIR7QGjs.require_no_default_alt_text.call(void 0, );
@@ -1,5 +1,5 @@
1
1
  import {
2
2
  require_no_default_alt_text
3
- } from "../chunk-T5XN24SU.mjs";
4
- import "../chunk-A3UDIEI3.mjs";
3
+ } from "../chunk-GGMQ54WL.mjs";
4
+ import "../chunk-UJCSKKID.mjs";
5
5
  export default require_no_default_alt_text();
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkZD5PYAVSjs = require('../chunk-ZD5PYAVS.js');
4
- require('../chunk-5BKT4CS5.js');
5
- exports. default = _chunkZD5PYAVSjs.require_no_empty_alt_text.call(void 0, );
3
+ var _chunkXHKGFYKRjs = require('../chunk-XHKGFYKR.js');
4
+ require('../chunk-JSBRDJBE.js');
5
+ exports. default = _chunkXHKGFYKRjs.require_no_empty_alt_text.call(void 0, );
@@ -1,5 +1,5 @@
1
1
  import {
2
2
  require_no_empty_alt_text
3
- } from "../chunk-UP2FAX2A.mjs";
4
- import "../chunk-A3UDIEI3.mjs";
3
+ } from "../chunk-I2NU2OJP.mjs";
4
+ import "../chunk-UJCSKKID.mjs";
5
5
  export default require_no_empty_alt_text();
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkCSEVGJXWjs = require('../chunk-CSEVGJXW.js');
4
- require('../chunk-5BKT4CS5.js');
5
- exports. default = _chunkCSEVGJXWjs.require_no_generic_link_text.call(void 0, );
3
+ var _chunkWMAPY4NDjs = require('../chunk-WMAPY4ND.js');
4
+ require('../chunk-JSBRDJBE.js');
5
+ exports. default = _chunkWMAPY4NDjs.require_no_generic_link_text.call(void 0, );
@@ -1,5 +1,5 @@
1
1
  import {
2
2
  require_no_generic_link_text
3
- } from "../chunk-BLA57FQS.mjs";
4
- import "../chunk-A3UDIEI3.mjs";
3
+ } from "../chunk-YJIN6DTZ.mjs";
4
+ import "../chunk-UJCSKKID.mjs";
5
5
  export default require_no_generic_link_text();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/markdownlint",
3
- "version": "0.18.35",
3
+ "version": "0.18.36",
4
4
  "description": "An opinionated collection of markdownlint rules used by Storm Software.",
5
5
  "repository": {
6
6
  "type": "github",
@@ -1,26 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkT2GN3E2Qjs = require('./chunk-T2GN3E2Q.js');
4
-
5
-
6
- var _chunkZD5PYAVSjs = require('./chunk-ZD5PYAVS.js');
7
-
8
-
9
- var _chunkCSEVGJXWjs = require('./chunk-CSEVGJXW.js');
10
-
11
-
12
- var _chunk5BKT4CS5js = require('./chunk-5BKT4CS5.js');
13
-
14
- // src/rules/index.ts
15
- var SS01 = _chunk5BKT4CS5js.__toESM.call(void 0, _chunkT2GN3E2Qjs.require_no_default_alt_text.call(void 0, ));
16
- var SS03 = _chunk5BKT4CS5js.__toESM.call(void 0, _chunkZD5PYAVSjs.require_no_empty_alt_text.call(void 0, ));
17
- var SS02 = _chunk5BKT4CS5js.__toESM.call(void 0, _chunkCSEVGJXWjs.require_no_generic_link_text.call(void 0, ));
18
- var rules = [
19
- SS01,
20
- SS02,
21
- SS03
22
- ];
23
-
24
-
25
-
26
- exports.rules = rules;