@dougis/markdown-lint-mcp 1.0.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/CHANGELOG.md +80 -0
- package/CONTRIBUTING.md +474 -0
- package/LICENSE +21 -0
- package/README.md +240 -0
- package/USAGE.md +40 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -0
- package/dist/rules/index.d.ts +22 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/index.js +144 -0
- package/dist/rules/index.js.map +1 -0
- package/dist/rules/md001.d.ts +25 -0
- package/dist/rules/md001.d.ts.map +1 -0
- package/dist/rules/md001.js +79 -0
- package/dist/rules/md001.js.map +1 -0
- package/dist/rules/md003.d.ts +41 -0
- package/dist/rules/md003.d.ts.map +1 -0
- package/dist/rules/md003.js +130 -0
- package/dist/rules/md003.js.map +1 -0
- package/dist/rules/md004.d.ts +28 -0
- package/dist/rules/md004.d.ts.map +1 -0
- package/dist/rules/md004.js +79 -0
- package/dist/rules/md004.js.map +1 -0
- package/dist/rules/md005.d.ts +21 -0
- package/dist/rules/md005.d.ts.map +1 -0
- package/dist/rules/md005.js +88 -0
- package/dist/rules/md005.js.map +1 -0
- package/dist/rules/md007.d.ts +21 -0
- package/dist/rules/md007.d.ts.map +1 -0
- package/dist/rules/md007.js +66 -0
- package/dist/rules/md007.js.map +1 -0
- package/dist/rules/md009.d.ts +35 -0
- package/dist/rules/md009.d.ts.map +1 -0
- package/dist/rules/md009.js +122 -0
- package/dist/rules/md009.js.map +1 -0
- package/dist/rules/md010.d.ts +34 -0
- package/dist/rules/md010.d.ts.map +1 -0
- package/dist/rules/md010.js +75 -0
- package/dist/rules/md010.js.map +1 -0
- package/dist/rules/md011.d.ts +30 -0
- package/dist/rules/md011.d.ts.map +1 -0
- package/dist/rules/md011.js +123 -0
- package/dist/rules/md011.js.map +1 -0
- package/dist/rules/md012.d.ts +33 -0
- package/dist/rules/md012.d.ts.map +1 -0
- package/dist/rules/md012.js +125 -0
- package/dist/rules/md012.js.map +1 -0
- package/dist/rules/md013.d.ts +26 -0
- package/dist/rules/md013.d.ts.map +1 -0
- package/dist/rules/md013.js +32 -0
- package/dist/rules/md013.js.map +1 -0
- package/dist/rules/md014.d.ts +29 -0
- package/dist/rules/md014.d.ts.map +1 -0
- package/dist/rules/md014.js +176 -0
- package/dist/rules/md014.js.map +1 -0
- package/dist/rules/md018.d.ts +22 -0
- package/dist/rules/md018.d.ts.map +1 -0
- package/dist/rules/md018.js +27 -0
- package/dist/rules/md018.js.map +1 -0
- package/dist/rules/md019.d.ts +22 -0
- package/dist/rules/md019.d.ts.map +1 -0
- package/dist/rules/md019.js +27 -0
- package/dist/rules/md019.js.map +1 -0
- package/dist/rules/md020.d.ts +22 -0
- package/dist/rules/md020.d.ts.map +1 -0
- package/dist/rules/md020.js +27 -0
- package/dist/rules/md020.js.map +1 -0
- package/dist/rules/md021.d.ts +22 -0
- package/dist/rules/md021.d.ts.map +1 -0
- package/dist/rules/md021.js +27 -0
- package/dist/rules/md021.js.map +1 -0
- package/dist/rules/md022.d.ts +21 -0
- package/dist/rules/md022.d.ts.map +1 -0
- package/dist/rules/md022.js +43 -0
- package/dist/rules/md022.js.map +1 -0
- package/dist/rules/md023.d.ts +21 -0
- package/dist/rules/md023.d.ts.map +1 -0
- package/dist/rules/md023.js +34 -0
- package/dist/rules/md023.js.map +1 -0
- package/dist/rules/md024.d.ts +30 -0
- package/dist/rules/md024.d.ts.map +1 -0
- package/dist/rules/md024.js +123 -0
- package/dist/rules/md024.js.map +1 -0
- package/dist/rules/md025.d.ts +34 -0
- package/dist/rules/md025.d.ts.map +1 -0
- package/dist/rules/md025.js +134 -0
- package/dist/rules/md025.js.map +1 -0
- package/dist/rules/md026.d.ts +21 -0
- package/dist/rules/md026.d.ts.map +1 -0
- package/dist/rules/md026.js +31 -0
- package/dist/rules/md026.js.map +1 -0
- package/dist/rules/md027.d.ts +22 -0
- package/dist/rules/md027.d.ts.map +1 -0
- package/dist/rules/md027.js +27 -0
- package/dist/rules/md027.js.map +1 -0
- package/dist/rules/md028.d.ts +37 -0
- package/dist/rules/md028.d.ts.map +1 -0
- package/dist/rules/md028.js +84 -0
- package/dist/rules/md028.js.map +1 -0
- package/dist/rules/md029.d.ts +30 -0
- package/dist/rules/md029.d.ts.map +1 -0
- package/dist/rules/md029.js +36 -0
- package/dist/rules/md029.js.map +1 -0
- package/dist/rules/md030.d.ts +28 -0
- package/dist/rules/md030.d.ts.map +1 -0
- package/dist/rules/md030.js +76 -0
- package/dist/rules/md030.js.map +1 -0
- package/dist/rules/md031.d.ts +22 -0
- package/dist/rules/md031.d.ts.map +1 -0
- package/dist/rules/md031.js +55 -0
- package/dist/rules/md031.js.map +1 -0
- package/dist/rules/md032.d.ts +21 -0
- package/dist/rules/md032.d.ts.map +1 -0
- package/dist/rules/md032.js +69 -0
- package/dist/rules/md032.js.map +1 -0
- package/dist/rules/md033.d.ts +28 -0
- package/dist/rules/md033.d.ts.map +1 -0
- package/dist/rules/md033.js +34 -0
- package/dist/rules/md033.js.map +1 -0
- package/dist/rules/md034.d.ts +28 -0
- package/dist/rules/md034.d.ts.map +1 -0
- package/dist/rules/md034.js +100 -0
- package/dist/rules/md034.js.map +1 -0
- package/dist/rules/md035.d.ts +23 -0
- package/dist/rules/md035.d.ts.map +1 -0
- package/dist/rules/md035.js +52 -0
- package/dist/rules/md035.js.map +1 -0
- package/dist/rules/md036.d.ts +34 -0
- package/dist/rules/md036.d.ts.map +1 -0
- package/dist/rules/md036.js +112 -0
- package/dist/rules/md036.js.map +1 -0
- package/dist/rules/md037.d.ts +28 -0
- package/dist/rules/md037.d.ts.map +1 -0
- package/dist/rules/md037.js +122 -0
- package/dist/rules/md037.js.map +1 -0
- package/dist/rules/md038.d.ts +28 -0
- package/dist/rules/md038.d.ts.map +1 -0
- package/dist/rules/md038.js +62 -0
- package/dist/rules/md038.js.map +1 -0
- package/dist/rules/md039.d.ts +21 -0
- package/dist/rules/md039.d.ts.map +1 -0
- package/dist/rules/md039.js +34 -0
- package/dist/rules/md039.js.map +1 -0
- package/dist/rules/md040.d.ts +21 -0
- package/dist/rules/md040.d.ts.map +1 -0
- package/dist/rules/md040.js +46 -0
- package/dist/rules/md040.js.map +1 -0
- package/dist/rules/md041.d.ts +33 -0
- package/dist/rules/md041.d.ts.map +1 -0
- package/dist/rules/md041.js +92 -0
- package/dist/rules/md041.js.map +1 -0
- package/dist/rules/md042.d.ts +22 -0
- package/dist/rules/md042.d.ts.map +1 -0
- package/dist/rules/md042.js +50 -0
- package/dist/rules/md042.js.map +1 -0
- package/dist/rules/md043.d.ts +39 -0
- package/dist/rules/md043.d.ts.map +1 -0
- package/dist/rules/md043.js +116 -0
- package/dist/rules/md043.js.map +1 -0
- package/dist/rules/md044.d.ts +40 -0
- package/dist/rules/md044.d.ts.map +1 -0
- package/dist/rules/md044.js +167 -0
- package/dist/rules/md044.js.map +1 -0
- package/dist/rules/md045.d.ts +22 -0
- package/dist/rules/md045.d.ts.map +1 -0
- package/dist/rules/md045.js +57 -0
- package/dist/rules/md045.js.map +1 -0
- package/dist/rules/md046.d.ts +23 -0
- package/dist/rules/md046.d.ts.map +1 -0
- package/dist/rules/md046.js +174 -0
- package/dist/rules/md046.js.map +1 -0
- package/dist/rules/md047.d.ts +22 -0
- package/dist/rules/md047.d.ts.map +1 -0
- package/dist/rules/md047.js +35 -0
- package/dist/rules/md047.js.map +1 -0
- package/dist/rules/md048.d.ts +22 -0
- package/dist/rules/md048.d.ts.map +1 -0
- package/dist/rules/md048.js +80 -0
- package/dist/rules/md048.js.map +1 -0
- package/dist/rules/md049.d.ts +33 -0
- package/dist/rules/md049.d.ts.map +1 -0
- package/dist/rules/md049.js +189 -0
- package/dist/rules/md049.js.map +1 -0
- package/dist/rules/md050.d.ts +22 -0
- package/dist/rules/md050.d.ts.map +1 -0
- package/dist/rules/md050.js +32 -0
- package/dist/rules/md050.js.map +1 -0
- package/dist/rules/md051.d.ts +23 -0
- package/dist/rules/md051.d.ts.map +1 -0
- package/dist/rules/md051.js +63 -0
- package/dist/rules/md051.js.map +1 -0
- package/dist/rules/md052.d.ts +21 -0
- package/dist/rules/md052.d.ts.map +1 -0
- package/dist/rules/md052.js +71 -0
- package/dist/rules/md052.js.map +1 -0
- package/dist/rules/md053.d.ts +21 -0
- package/dist/rules/md053.d.ts.map +1 -0
- package/dist/rules/md053.js +95 -0
- package/dist/rules/md053.js.map +1 -0
- package/dist/rules/md054.d.ts +21 -0
- package/dist/rules/md054.d.ts.map +1 -0
- package/dist/rules/md054.js +87 -0
- package/dist/rules/md054.js.map +1 -0
- package/dist/rules/md055.d.ts +22 -0
- package/dist/rules/md055.d.ts.map +1 -0
- package/dist/rules/md055.js +157 -0
- package/dist/rules/md055.js.map +1 -0
- package/dist/rules/md056.d.ts +21 -0
- package/dist/rules/md056.d.ts.map +1 -0
- package/dist/rules/md056.js +154 -0
- package/dist/rules/md056.js.map +1 -0
- package/dist/rules/md058.d.ts +27 -0
- package/dist/rules/md058.d.ts.map +1 -0
- package/dist/rules/md058.js +71 -0
- package/dist/rules/md058.js.map +1 -0
- package/dist/rules/md059.d.ts +22 -0
- package/dist/rules/md059.d.ts.map +1 -0
- package/dist/rules/md059.js +161 -0
- package/dist/rules/md059.js.map +1 -0
- package/dist/rules/rule-interface.d.ts +51 -0
- package/dist/rules/rule-interface.d.ts.map +1 -0
- package/dist/rules/rule-interface.js +2 -0
- package/dist/rules/rule-interface.js.map +1 -0
- package/dist/server.d.ts +59 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +419 -0
- package/dist/server.js.map +1 -0
- package/dist/types.d.ts +74 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +14 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/file.d.ts +39 -0
- package/dist/utils/file.d.ts.map +1 -0
- package/dist/utils/file.js +124 -0
- package/dist/utils/file.js.map +1 -0
- package/dist/utils/logger.d.ts +61 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +85 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/safe-match.d.ts +4 -0
- package/dist/utils/safe-match.d.ts.map +1 -0
- package/dist/utils/safe-match.js +51 -0
- package/dist/utils/safe-match.js.map +1 -0
- package/package.json +85 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"md041.js","sourceRoot":"","sources":["../../src/rules/md041.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC;AAC5B,MAAM,CAAC,MAAM,WAAW,GAAG,oDAAoD,CAAC;AAEhF;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAe;IACtC,MAAM,UAAU,GAAoB,EAAE,CAAC;IAEvC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,6CAA6C;IAC7C,IAAI,cAAc,GAAG,CAAC,CAAC;IACvB,OAAO,cAAc,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QACrC,MAAM,IAAI,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,EAAE,CAAC;QAC1C,IAAI,IAAI,KAAK,EAAE,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAC3C,cAAc,EAAE,CAAC;YACjB,SAAS;QACX,CAAC;QACD,MAAM;IACR,CAAC;IAED,IAAI,cAAc,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QACnC,OAAO,UAAU,CAAC,CAAC,iBAAiB;IACtC,CAAC;IAED,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC;IAExC,qDAAqD;IACrD,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACvC,UAAU,CAAC,IA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;IACX,QAAQ;IACR,GAAG;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Rule } from './rule-interface';
|
|
2
|
+
/**
|
|
3
|
+
* MD042: No empty links
|
|
4
|
+
*
|
|
5
|
+
* This rule is triggered when links have empty URLs or text. These empty links
|
|
6
|
+
* don't point to anything and should be removed or filled in with proper content.
|
|
7
|
+
* Empty links in markdown take the form of [] or [text]() or [](url).
|
|
8
|
+
*/
|
|
9
|
+
export declare const name = "MD042";
|
|
10
|
+
export declare const description = "No empty links";
|
|
11
|
+
/**
|
|
12
|
+
* Fix empty links by removing them
|
|
13
|
+
* @param lines Array of string lines to fix
|
|
14
|
+
* @returns Fixed lines array with empty links removed
|
|
15
|
+
*/
|
|
16
|
+
export declare function fix(lines: string[]): string[];
|
|
17
|
+
/**
|
|
18
|
+
* Rule implementation for MD042
|
|
19
|
+
*/
|
|
20
|
+
export declare const rule: Rule;
|
|
21
|
+
export default rule;
|
|
22
|
+
//# sourceMappingURL=md042.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"md042.d.ts","sourceRoot":"","sources":["../../src/rules/md042.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,UAAU,CAAC;AAC5B,eAAO,MAAM,WAAW,mBAAmB,CAAC;AAa5C;;;;GAIG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAoB7C;AAED;;GAEG;AACH,eAAO,MAAM,IAAI,EAAE,IAIlB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MD042: No empty links
|
|
3
|
+
*
|
|
4
|
+
* This rule is triggered when links have empty URLs or text. These empty links
|
|
5
|
+
* don't point to anything and should be removed or filled in with proper content.
|
|
6
|
+
* Empty links in markdown take the form of [] or [text]() or [](url).
|
|
7
|
+
*/
|
|
8
|
+
export const name = 'MD042';
|
|
9
|
+
export const description = 'No empty links';
|
|
10
|
+
/**
|
|
11
|
+
* Check if a string contains empty links
|
|
12
|
+
* An empty link can be [] or [text]() or [](url)
|
|
13
|
+
* @param line The line to check
|
|
14
|
+
* @returns True if the line contains empty links
|
|
15
|
+
*/
|
|
16
|
+
function hasEmptyLinks(line) {
|
|
17
|
+
// Match empty links: [] or [text]() or [](url)
|
|
18
|
+
return /\[\](?:\(\)|\([^)]+\))?|\[[^\]]+\]\(\)/.test(line);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Fix empty links by removing them
|
|
22
|
+
* @param lines Array of string lines to fix
|
|
23
|
+
* @returns Fixed lines array with empty links removed
|
|
24
|
+
*/
|
|
25
|
+
export function fix(lines) {
|
|
26
|
+
return lines.map(line => {
|
|
27
|
+
if (!hasEmptyLinks(line)) {
|
|
28
|
+
return line;
|
|
29
|
+
}
|
|
30
|
+
// Replace links with empty text and URL: []()
|
|
31
|
+
let fixedLine = line.replace(/\[\]\(\)/g, '');
|
|
32
|
+
// Replace links with empty text but with URL: [](url)
|
|
33
|
+
fixedLine = fixedLine.replace(/\[\]\(([^)]+)\)/g, '$1');
|
|
34
|
+
// Replace links with text but empty URL: [text]()
|
|
35
|
+
fixedLine = fixedLine.replace(/\[([^\]]+)\]\(\)/g, '$1');
|
|
36
|
+
// Replace completely empty links: []
|
|
37
|
+
fixedLine = fixedLine.replace(/\[\]/g, '');
|
|
38
|
+
return fixedLine;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Rule implementation for MD042
|
|
43
|
+
*/
|
|
44
|
+
export const rule = {
|
|
45
|
+
name,
|
|
46
|
+
description,
|
|
47
|
+
fix,
|
|
48
|
+
};
|
|
49
|
+
export default rule;
|
|
50
|
+
//# sourceMappingURL=md042.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"md042.js","sourceRoot":"","sources":["../../src/rules/md042.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC;AAC5B,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAE5C;;;;;GAKG;AACH,SAAS,aAAa,CAAC,IAAY;IACjC,+CAA+C;IAC/C,OAAO,wCAAwC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,GAAG,CAAC,KAAe;IACjC,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACtB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,8CAA8C;QAC9C,IAAI,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAE9C,sDAAsD;QACtD,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;QAExD,kDAAkD;QAClD,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;QAEzD,qCAAqC;QACrC,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QAE3C,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI;IACJ,WAAW;IACX,GAAG;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Rule, RuleViolation } from './rule-interface';
|
|
2
|
+
/**
|
|
3
|
+
* MD043: Required heading structure
|
|
4
|
+
*
|
|
5
|
+
* This rule is triggered when the headings in a file don't match the array of headings
|
|
6
|
+
* specified in the rule's configuration. It can be used to enforce a standard
|
|
7
|
+
* heading structure across a set of documents.
|
|
8
|
+
*
|
|
9
|
+
* Note: This rule is detection-only and doesn't provide automatic fixes
|
|
10
|
+
* since fixing would require generating appropriate content for potentially
|
|
11
|
+
* missing headings.
|
|
12
|
+
*/
|
|
13
|
+
export declare const name = "MD043";
|
|
14
|
+
export declare const description = "Required heading structure";
|
|
15
|
+
/**
|
|
16
|
+
* Validate function to check if headings match required structure
|
|
17
|
+
* @param lines Array of string lines to validate
|
|
18
|
+
* @param config Optional rule configuration with expected headings
|
|
19
|
+
* @returns Array of rule violations
|
|
20
|
+
*/
|
|
21
|
+
interface MD043Config {
|
|
22
|
+
headings?: string[];
|
|
23
|
+
}
|
|
24
|
+
export declare function validate(lines: string[], _config?: MD043Config): RuleViolation[];
|
|
25
|
+
/**
|
|
26
|
+
* Fix function for MD043
|
|
27
|
+
* Since fixing heading structure issues requires creating meaningful content
|
|
28
|
+
* for missing headings or understanding how to restructure existing ones,
|
|
29
|
+
* this rule only detects the issue and doesn't automatically fix it.
|
|
30
|
+
* @param lines Array of string lines to check
|
|
31
|
+
* @returns Original lines array unchanged
|
|
32
|
+
*/
|
|
33
|
+
export declare function fix(lines: string[]): string[];
|
|
34
|
+
/**
|
|
35
|
+
* Rule implementation for MD043
|
|
36
|
+
*/
|
|
37
|
+
export declare const rule: Rule;
|
|
38
|
+
export default rule;
|
|
39
|
+
//# sourceMappingURL=md043.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"md043.d.ts","sourceRoot":"","sources":["../../src/rules/md043.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,IAAI,UAAU,CAAC;AAC5B,eAAO,MAAM,WAAW,+BAA+B,CAAC;AAwBxD;;;;;GAKG;AACH,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,EAAE,CAmEhF;AAED;;;;;;;GAOG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAG7C;AAED;;GAEG;AACH,eAAO,MAAM,IAAI,EAAE,IAKlB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MD043: Required heading structure
|
|
3
|
+
*
|
|
4
|
+
* This rule is triggered when the headings in a file don't match the array of headings
|
|
5
|
+
* specified in the rule's configuration. It can be used to enforce a standard
|
|
6
|
+
* heading structure across a set of documents.
|
|
7
|
+
*
|
|
8
|
+
* Note: This rule is detection-only and doesn't provide automatic fixes
|
|
9
|
+
* since fixing would require generating appropriate content for potentially
|
|
10
|
+
* missing headings.
|
|
11
|
+
*/
|
|
12
|
+
export const name = 'MD043';
|
|
13
|
+
export const description = 'Required heading structure';
|
|
14
|
+
/**
|
|
15
|
+
* Extract heading text from a line
|
|
16
|
+
* @param line The line to extract heading text from
|
|
17
|
+
* @returns The heading text without the hash symbols
|
|
18
|
+
*/
|
|
19
|
+
function extractHeadingText(line) {
|
|
20
|
+
const trimmed = line.trim();
|
|
21
|
+
const match = trimmed.match(/^#{1,6}\s+(.+?)(?:\s+#{1,6})?$/);
|
|
22
|
+
return match ? match[1].trim() : '';
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get heading level from a line
|
|
26
|
+
* @param line The line to get heading level from
|
|
27
|
+
* @returns The heading level (1-6) or 0 if not a heading
|
|
28
|
+
*/
|
|
29
|
+
function getHeadingLevel(line) {
|
|
30
|
+
const trimmed = line.trim();
|
|
31
|
+
const match = trimmed.match(/^(#{1,6})(\s|$)/);
|
|
32
|
+
return match ? match[1].length : 0;
|
|
33
|
+
}
|
|
34
|
+
export function validate(lines, _config) {
|
|
35
|
+
const violations = [];
|
|
36
|
+
// Default configuration - if no headings specified, no violations
|
|
37
|
+
const expectedHeadings = _config?.headings || [];
|
|
38
|
+
// If no expected headings configured, skip validation
|
|
39
|
+
if (expectedHeadings.length === 0) {
|
|
40
|
+
return violations;
|
|
41
|
+
}
|
|
42
|
+
// Extract all headings from the document
|
|
43
|
+
const documentHeadings = [];
|
|
44
|
+
for (let i = 0; i < lines.length; i++) {
|
|
45
|
+
const line = lines[i];
|
|
46
|
+
const trimmed = line.trim();
|
|
47
|
+
// Check if this line is a heading
|
|
48
|
+
if (trimmed.match(/^#{1,6}(\s|$)/)) {
|
|
49
|
+
const headingText = extractHeadingText(line);
|
|
50
|
+
const level = getHeadingLevel(line);
|
|
51
|
+
// Include all headings, even empty ones
|
|
52
|
+
documentHeadings.push({
|
|
53
|
+
text: headingText,
|
|
54
|
+
level: level,
|
|
55
|
+
lineNumber: i + 1,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
// Compare document headings with expected structure
|
|
60
|
+
for (let i = 0; i < Math.max(documentHeadings.length, expectedHeadings.length); i++) {
|
|
61
|
+
const documentHeading = documentHeadings[i];
|
|
62
|
+
const expectedHeading = expectedHeadings[i];
|
|
63
|
+
if (!documentHeading && expectedHeading) {
|
|
64
|
+
// Missing expected heading
|
|
65
|
+
violations.push({
|
|
66
|
+
lineNumber: documentHeadings.length > 0
|
|
67
|
+
? documentHeadings[documentHeadings.length - 1].lineNumber
|
|
68
|
+
: 1,
|
|
69
|
+
details: `Missing expected heading: "${expectedHeading}"`,
|
|
70
|
+
range: [0, 0],
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
else if (documentHeading && !expectedHeading) {
|
|
74
|
+
// Extra heading not in expected structure
|
|
75
|
+
violations.push({
|
|
76
|
+
lineNumber: documentHeading.lineNumber,
|
|
77
|
+
details: `Unexpected heading: "${documentHeading.text}"`,
|
|
78
|
+
range: [0, lines[documentHeading.lineNumber - 1].length],
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
else if (documentHeading && expectedHeading) {
|
|
82
|
+
// Check if heading text matches expected
|
|
83
|
+
if (documentHeading.text !== expectedHeading) {
|
|
84
|
+
violations.push({
|
|
85
|
+
lineNumber: documentHeading.lineNumber,
|
|
86
|
+
details: `Expected heading "${expectedHeading}" but found "${documentHeading.text}"`,
|
|
87
|
+
range: [0, lines[documentHeading.lineNumber - 1].length],
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return violations;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Fix function for MD043
|
|
96
|
+
* Since fixing heading structure issues requires creating meaningful content
|
|
97
|
+
* for missing headings or understanding how to restructure existing ones,
|
|
98
|
+
* this rule only detects the issue and doesn't automatically fix it.
|
|
99
|
+
* @param lines Array of string lines to check
|
|
100
|
+
* @returns Original lines array unchanged
|
|
101
|
+
*/
|
|
102
|
+
export function fix(lines) {
|
|
103
|
+
// This rule is detection-only, so we return the lines unchanged
|
|
104
|
+
return [...lines];
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Rule implementation for MD043
|
|
108
|
+
*/
|
|
109
|
+
export const rule = {
|
|
110
|
+
name,
|
|
111
|
+
description,
|
|
112
|
+
validate,
|
|
113
|
+
fix,
|
|
114
|
+
};
|
|
115
|
+
export default rule;
|
|
116
|
+
//# sourceMappingURL=md043.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"md043.js","sourceRoot":"","sources":["../../src/rules/md043.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC;AAC5B,MAAM,CAAC,MAAM,WAAW,GAAG,4BAA4B,CAAC;AAExD;;;;GAIG;AACH,SAAS,kBAAkB,CAAC,IAAY;IACtC,MAAM,OAAO,GAAG,IAA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I,KAAK,eAAe,EAAE,CAAC;gBAC7C,UAAU,CAAC,IAAI,CAAC;oBACd,UAAU,EAAE,eAAe,CAAC,UAAU;oBACtC,OAAO,EAAE,qBAAqB,eAAe,gBAAgB,eAAe,CAAC,IAAI,GAAG;oBACpF,KAAK,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;iBACzD,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,GAAG,CAAC,KAAe;IACjC,gEAAgE;IAChE,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC;AACpB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI;IACJ,WAAW;IACX,QAAQ;IACR,GAAG;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Rule, RuleViolation } from './rule-interface';
|
|
2
|
+
/**
|
|
3
|
+
* MD044: Proper names should have the correct capitalization
|
|
4
|
+
*
|
|
5
|
+
* This rule is triggered when proper names have incorrect capitalization.
|
|
6
|
+
* It can be used to enforce consistent capitalization of product names,
|
|
7
|
+
* trademarks, and other proper nouns.
|
|
8
|
+
*
|
|
9
|
+
* Unlike the other rules we've implemented today, this rule CAN be automatically
|
|
10
|
+
* fixed by replacing the incorrect capitalization with the correct form.
|
|
11
|
+
*/
|
|
12
|
+
export declare const name = "MD044";
|
|
13
|
+
export declare const description = "Proper names should have the correct capitalization";
|
|
14
|
+
/**
|
|
15
|
+
* Validate function to check proper name capitalization
|
|
16
|
+
* @param lines Array of string lines to validate
|
|
17
|
+
* @param config Optional rule configuration with proper names
|
|
18
|
+
* @returns Array of rule violations
|
|
19
|
+
*/
|
|
20
|
+
interface MD044Config {
|
|
21
|
+
names?: string[];
|
|
22
|
+
code_blocks?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function validate(lines: string[], _config?: MD044Config): RuleViolation[];
|
|
25
|
+
/**
|
|
26
|
+
* Fix function for MD044
|
|
27
|
+
* This function replaces occurrences of incorrectly capitalized proper names
|
|
28
|
+
* with their correctly capitalized versions.
|
|
29
|
+
*
|
|
30
|
+
* @param lines Array of string lines to fix
|
|
31
|
+
* @param config Optional rule configuration with proper names
|
|
32
|
+
* @returns Fixed lines array with proper names correctly capitalized
|
|
33
|
+
*/
|
|
34
|
+
export declare function fix(lines: string[], _config?: MD044Config): string[];
|
|
35
|
+
/**
|
|
36
|
+
* Rule implementation for MD044
|
|
37
|
+
*/
|
|
38
|
+
export declare const rule: Rule;
|
|
39
|
+
export default rule;
|
|
40
|
+
//# sourceMappingURL=md044.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"md044.d.ts","sourceRoot":"","sources":["../../src/rules/md044.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGvD;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI,UAAU,CAAC;AAC5B,eAAO,MAAM,WAAW,wDAAwD,CAAC;AAkDjF;;;;;GAKG;AACH,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,EAAE,CAuDhF;AAED;;;;;;;;GAQG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE,CAsDpE;AAED;;GAEG;AACH,eAAO,MAAM,IAAI,EAAE,IAKlB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { findWordMatches } from '../utils/safe-match';
|
|
2
|
+
/**
|
|
3
|
+
* MD044: Proper names should have the correct capitalization
|
|
4
|
+
*
|
|
5
|
+
* This rule is triggered when proper names have incorrect capitalization.
|
|
6
|
+
* It can be used to enforce consistent capitalization of product names,
|
|
7
|
+
* trademarks, and other proper nouns.
|
|
8
|
+
*
|
|
9
|
+
* Unlike the other rules we've implemented today, this rule CAN be automatically
|
|
10
|
+
* fixed by replacing the incorrect capitalization with the correct form.
|
|
11
|
+
*/
|
|
12
|
+
export const name = 'MD044';
|
|
13
|
+
export const description = 'Proper names should have the correct capitalization';
|
|
14
|
+
/**
|
|
15
|
+
* Check if a line is within a code block (fenced or indented)
|
|
16
|
+
* @param lines Array of all lines
|
|
17
|
+
* @param lineIndex Index of the line to check
|
|
18
|
+
* @returns True if the line is within a code block
|
|
19
|
+
*/
|
|
20
|
+
function isInCodeBlock(lines, lineIndex) {
|
|
21
|
+
let inFencedBlock = false;
|
|
22
|
+
let fenceChar = '';
|
|
23
|
+
// Check if current line is indented code block (4+ spaces)
|
|
24
|
+
const currentLine = lines[lineIndex];
|
|
25
|
+
if (currentLine.match(/^ /)) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
// Check lines before current line for fenced code blocks
|
|
29
|
+
for (let i = 0; i < lineIndex; i++) {
|
|
30
|
+
const line = lines[i].trim();
|
|
31
|
+
// Check for fenced code block start/end
|
|
32
|
+
const backtickMatch = line.match(/^`{3,}/);
|
|
33
|
+
const tildeMatch = line.match(/^~{3,}/);
|
|
34
|
+
if (backtickMatch || tildeMatch) {
|
|
35
|
+
const currentFence = backtickMatch ? '`' : '~';
|
|
36
|
+
if (!inFencedBlock) {
|
|
37
|
+
// Starting a fenced block
|
|
38
|
+
inFencedBlock = true;
|
|
39
|
+
fenceChar = currentFence;
|
|
40
|
+
}
|
|
41
|
+
else if (fenceChar === currentFence) {
|
|
42
|
+
// Ending a fenced block
|
|
43
|
+
inFencedBlock = false;
|
|
44
|
+
fenceChar = '';
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// Check if current line is a fence line (should be treated as code block)
|
|
49
|
+
const currentLineTrimmed = currentLine.trim();
|
|
50
|
+
if (currentLineTrimmed.match(/^`{3,}/) || currentLineTrimmed.match(/^~{3,}/)) {
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
return inFencedBlock;
|
|
54
|
+
}
|
|
55
|
+
export function validate(lines, _config) {
|
|
56
|
+
const violations = [];
|
|
57
|
+
// Get proper names from configuration
|
|
58
|
+
const properNames = _config?.names || [];
|
|
59
|
+
const ignoreCodeBlocks = _config?.code_blocks !== false; // Default to true (ignore code blocks)
|
|
60
|
+
// If no proper names configured, no violations
|
|
61
|
+
if (properNames.length === 0) {
|
|
62
|
+
return violations;
|
|
63
|
+
}
|
|
64
|
+
// Create a map of lowercase -> correctly capitalized versions
|
|
65
|
+
const nameMap = new Map();
|
|
66
|
+
for (const name of properNames) {
|
|
67
|
+
nameMap.set(name.toLowerCase(), name);
|
|
68
|
+
}
|
|
69
|
+
// Check each line for proper name violations
|
|
70
|
+
for (let i = 0; i < lines.length; i++) {
|
|
71
|
+
const line = lines[i];
|
|
72
|
+
// Skip code blocks if configured to ignore them
|
|
73
|
+
if (ignoreCodeBlocks && isInCodeBlock(lines, i)) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
// Skip fence lines themselves (they are delimiters, not content)
|
|
77
|
+
const trimmedLine = line.trim();
|
|
78
|
+
if (trimmedLine.match(/^`{3,}/) || trimmedLine.match(/^~{3,}/)) {
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
// Check for improper capitalization of proper names
|
|
82
|
+
// We intentionally do not use dynamic RegExp construction here to avoid ReDoS
|
|
83
|
+
// risks. Instead we rely on `findWordMatches`, which uses `indexOf` and
|
|
84
|
+
// simple boundary checks. This is safe for untrusted or adversarial input.
|
|
85
|
+
for (const [lowercase, correct] of nameMap.entries()) {
|
|
86
|
+
const matches = findWordMatches(line, lowercase);
|
|
87
|
+
for (const idx of matches) {
|
|
88
|
+
const foundText = line.substr(idx, lowercase.length);
|
|
89
|
+
// If the found text doesn't match the correct capitalization
|
|
90
|
+
if (foundText !== correct) {
|
|
91
|
+
violations.push({
|
|
92
|
+
lineNumber: i + 1,
|
|
93
|
+
details: `Proper name "${foundText}" should be "${correct}"`,
|
|
94
|
+
range: [idx, idx + foundText.length],
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return violations;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Fix function for MD044
|
|
104
|
+
* This function replaces occurrences of incorrectly capitalized proper names
|
|
105
|
+
* with their correctly capitalized versions.
|
|
106
|
+
*
|
|
107
|
+
* @param lines Array of string lines to fix
|
|
108
|
+
* @param config Optional rule configuration with proper names
|
|
109
|
+
* @returns Fixed lines array with proper names correctly capitalized
|
|
110
|
+
*/
|
|
111
|
+
export function fix(lines, _config) {
|
|
112
|
+
const fixedLines = [...lines];
|
|
113
|
+
// Get proper names from configuration
|
|
114
|
+
const properNames = _config?.names || [];
|
|
115
|
+
const ignoreCodeBlocks = _config?.code_blocks !== false; // Default to true (ignore code blocks)
|
|
116
|
+
// If no proper names configured, return unchanged
|
|
117
|
+
if (properNames.length === 0) {
|
|
118
|
+
return fixedLines;
|
|
119
|
+
}
|
|
120
|
+
// Create a map of lowercase -> correctly capitalized versions
|
|
121
|
+
const nameMap = new Map();
|
|
122
|
+
for (const name of properNames) {
|
|
123
|
+
nameMap.set(name.toLowerCase(), name);
|
|
124
|
+
}
|
|
125
|
+
// Fix each line
|
|
126
|
+
for (let i = 0; i < fixedLines.length; i++) {
|
|
127
|
+
// Skip code blocks if configured to ignore them
|
|
128
|
+
if (ignoreCodeBlocks && isInCodeBlock(fixedLines, i)) {
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
// Skip fence lines themselves (they are delimiters, not content)
|
|
132
|
+
const trimmedLine = fixedLines[i].trim();
|
|
133
|
+
if (trimmedLine.match(/^`{3,}/) || trimmedLine.match(/^~{3,}/)) {
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
let line = fixedLines[i];
|
|
137
|
+
// Replace improper capitalization of proper names using safe matching
|
|
138
|
+
for (const [lowercase, correct] of nameMap.entries()) {
|
|
139
|
+
const matches = findWordMatches(line, lowercase);
|
|
140
|
+
if (matches.length === 0)
|
|
141
|
+
continue;
|
|
142
|
+
let newLine = '';
|
|
143
|
+
let lastIdx = 0;
|
|
144
|
+
for (const idx of matches) {
|
|
145
|
+
newLine += line.slice(lastIdx, idx);
|
|
146
|
+
const foundText = line.substr(idx, lowercase.length);
|
|
147
|
+
newLine += foundText !== correct ? correct : foundText;
|
|
148
|
+
lastIdx = idx + lowercase.length;
|
|
149
|
+
}
|
|
150
|
+
newLine += line.slice(lastIdx);
|
|
151
|
+
line = newLine;
|
|
152
|
+
}
|
|
153
|
+
fixedLines[i] = line;
|
|
154
|
+
}
|
|
155
|
+
return fixedLines;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Rule implementation for MD044
|
|
159
|
+
*/
|
|
160
|
+
export const rule = {
|
|
161
|
+
name,
|
|
162
|
+
description,
|
|
163
|
+
validate,
|
|
164
|
+
fix,
|
|
165
|
+
};
|
|
166
|
+
export default rule;
|
|
167
|
+
//# sourceMappingURL=md044.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"md044.js","sourceRoot":"","sources":["../../src/rules/md044.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC;AAC5B,MAAM,CAAC,MAAM,WAAW,GAAG,qDAAqD,CAAC;AAEjF;;;;;GAKG;AACH,SAAS,aAAa,CAAC,KAAe,EAAE,S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B,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI;IACJ,WAAW;IACX,QAAQ;IACR,GAAG;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Rule } from './rule-interface';
|
|
2
|
+
/**
|
|
3
|
+
* MD045: Images should have alternate text (alt text)
|
|
4
|
+
*
|
|
5
|
+
* This rule is triggered when an image is missing alternate text (alt text).
|
|
6
|
+
* Alternate text is important for accessibility and should always be provided
|
|
7
|
+
* for images.
|
|
8
|
+
*/
|
|
9
|
+
export declare const name = "MD045";
|
|
10
|
+
export declare const description = "Images should have alternate text (alt text)";
|
|
11
|
+
/**
|
|
12
|
+
* Fix images that are missing alternate text by adding empty alt text
|
|
13
|
+
* @param lines Array of string lines to fix
|
|
14
|
+
* @returns Fixed lines array with proper alt text for images
|
|
15
|
+
*/
|
|
16
|
+
export declare function fix(lines: string[]): string[];
|
|
17
|
+
/**
|
|
18
|
+
* Rule implementation for MD045
|
|
19
|
+
*/
|
|
20
|
+
export declare const rule: Rule;
|
|
21
|
+
export default rule;
|
|
22
|
+
//# sourceMappingURL=md045.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"md045.d.ts","sourceRoot":"","sources":["../../src/rules/md045.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,UAAU,CAAC;AAC5B,eAAO,MAAM,WAAW,iDAAiD,CAAC;AAQ1E;;;;GAIG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAmC7C;AAED;;GAEG;AACH,eAAO,MAAM,IAAI,EAAE,IAIlB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MD045: Images should have alternate text (alt text)
|
|
3
|
+
*
|
|
4
|
+
* This rule is triggered when an image is missing alternate text (alt text).
|
|
5
|
+
* Alternate text is important for accessibility and should always be provided
|
|
6
|
+
* for images.
|
|
7
|
+
*/
|
|
8
|
+
export const name = 'MD045';
|
|
9
|
+
export const description = 'Images should have alternate text (alt text)';
|
|
10
|
+
/**
|
|
11
|
+
* Regular expression to find image references
|
|
12
|
+
* Both inline images  and reference images ![alt][ref] are included
|
|
13
|
+
*/
|
|
14
|
+
const imageRegex = /!\[(.*?)\](?:\((.*?)\)|\[(.*?)\])/g;
|
|
15
|
+
/**
|
|
16
|
+
* Fix images that are missing alternate text by adding empty alt text
|
|
17
|
+
* @param lines Array of string lines to fix
|
|
18
|
+
* @returns Fixed lines array with proper alt text for images
|
|
19
|
+
*/
|
|
20
|
+
export function fix(lines) {
|
|
21
|
+
return lines.map(line => {
|
|
22
|
+
// Find all image references in the line
|
|
23
|
+
let result = line;
|
|
24
|
+
let match;
|
|
25
|
+
let offset = 0;
|
|
26
|
+
// Reset the regex lastIndex
|
|
27
|
+
imageRegex.lastIndex = 0;
|
|
28
|
+
// Process each image reference in the line
|
|
29
|
+
while ((match = imageRegex.exec(line)) !== null) {
|
|
30
|
+
const [fullMatch, altText] = match;
|
|
31
|
+
// If the alt text is empty, add an empty pair of brackets
|
|
32
|
+
if (!altText || altText.trim() === '') {
|
|
33
|
+
const newText = fullMatch.replace('![]', '![ ]');
|
|
34
|
+
// Replace at the correct position with the offset applied
|
|
35
|
+
const startPos = match.index + offset;
|
|
36
|
+
const endPos = startPos + fullMatch.length;
|
|
37
|
+
// Update the result string
|
|
38
|
+
result = result.substring(0, startPos) + newText + result.substring(endPos);
|
|
39
|
+
// Update the offset for subsequent replacements
|
|
40
|
+
offset += newText.length - fullMatch.length;
|
|
41
|
+
// Update the lastIndex to account for the change in string length
|
|
42
|
+
imageRegex.lastIndex += newText.length - fullMatch.length;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return result;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Rule implementation for MD045
|
|
50
|
+
*/
|
|
51
|
+
export const rule = {
|
|
52
|
+
name,
|
|
53
|
+
description,
|
|
54
|
+
fix,
|
|
55
|
+
};
|
|
56
|
+
export default rule;
|
|
57
|
+
//# sourceMappingURL=md045.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"md045.js","sourceRoot":"","sources":["../../src/rules/md045.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC;AAC5B,MAAM,CAAC,MAAM,WAAW,GAAG,8CAA8C,CAAC;AAE1E;;;GAGG;AACH,MAAM,UAAU,GAAG,oCAAoC,CAAC;AAExD;;;;GAIG;AACH,MAAM,UAAU,GAAG,CAAC,KAAe;IACjC,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACtB,wCAAwC;QACxC,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,IAAI,KAAK,CAAC;QACV,IAAI,MAAM,GAAG,CAAC,CAAC;QAEf,4BAA4B;QAC5B,UAAU,CAAC,SAAS,GAAG,CAAC,CAAC;QAEzB,2CAA2C;QAC3C,OAAO,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YAChD,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC;YAEnC,0DAA0D;YAC1D,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;gBACtC,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;gBAEjD,0DAA0D;gBAC1D,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;gBACtC,MAAM,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC,MAAM,CAAC;gBAE3C,2BAA2B;gBAC3B,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;gBAE5E,gDAAgD;gBAChD,MAAM,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;gBAE5C,kEAAkE;gBAClE,UAAU,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;YAC5D,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI;IACJ,WAAW;IACX,GAAG;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Rule } from './rule-interface';
|
|
2
|
+
/**
|
|
3
|
+
* MD046: Code block style
|
|
4
|
+
*
|
|
5
|
+
* This rule is triggered when code blocks don't use a consistent style
|
|
6
|
+
* throughout a document. Markdown supports two different code block styles:
|
|
7
|
+
* fenced code blocks using ``` or ~~~ delimiters, and indented code blocks
|
|
8
|
+
* using 4 spaces for indentation. This rule ensures a consistent style is used.
|
|
9
|
+
*/
|
|
10
|
+
export declare const name = "MD046";
|
|
11
|
+
export declare const description = "Code block style";
|
|
12
|
+
/**
|
|
13
|
+
* Fix code block style by ensuring a consistent style throughout the document
|
|
14
|
+
* @param lines Array of string lines to fix
|
|
15
|
+
* @returns Fixed lines array with consistent code block style
|
|
16
|
+
*/
|
|
17
|
+
export declare function fix(lines: string[]): string[];
|
|
18
|
+
/**
|
|
19
|
+
* Rule implementation for MD046
|
|
20
|
+
*/
|
|
21
|
+
export declare const rule: Rule;
|
|
22
|
+
export default rule;
|
|
23
|
+
//# sourceMappingURL=md046.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"md046.d.ts","sourceRoot":"","sources":["../../src/rules/md046.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,UAAU,CAAC;AAC5B,eAAO,MAAM,WAAW,qBAAqB,CAAC;AA+B9C;;;;GAIG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CA6I7C;AAED;;GAEG;AACH,eAAO,MAAM,IAAI,EAAE,IAIlB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|