markdownlint 0.32.1 → 0.34.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 +18 -0
- package/CONTRIBUTING.md +4 -3
- package/README.md +6 -0
- package/demo/markdownlint-browser.js +3866 -3564
- package/doc/CustomRules.md +14 -7
- package/doc/Rules.md +139 -12
- package/doc/md013.md +8 -7
- package/doc/md024.md +2 -5
- package/doc/md049.md +3 -0
- package/doc/md050.md +3 -0
- package/doc/md051.md +26 -0
- package/doc/md055.md +54 -0
- package/doc/md056.md +37 -0
- package/helpers/README.md +5 -3
- package/helpers/helpers.js +5 -5
- package/helpers/micromark.cjs +46 -27
- package/helpers/package.json +2 -2
- package/lib/configuration.d.ts +136 -110
- package/lib/constants.js +1 -1
- package/lib/markdownlint.d.ts +79 -6
- package/lib/markdownlint.js +95 -21
- package/lib/md001.js +3 -0
- package/lib/md003.js +3 -0
- package/lib/md004.js +3 -0
- package/lib/md005.js +12 -4
- package/lib/md007.js +17 -11
- package/lib/md009.js +3 -0
- package/lib/md010.js +4 -1
- package/lib/md011.js +3 -0
- package/lib/md012.js +3 -0
- package/lib/md013.js +3 -0
- package/lib/md014.js +4 -0
- package/lib/md018.js +4 -0
- package/lib/md019.js +3 -0
- package/lib/md020.js +3 -0
- package/lib/md021.js +3 -0
- package/lib/md022.js +10 -2
- package/lib/md023.js +3 -0
- package/lib/md024.js +11 -4
- package/lib/md025.js +3 -0
- package/lib/md026.js +11 -7
- package/lib/md027.js +29 -43
- package/lib/md028.js +31 -14
- package/lib/md029.js +3 -0
- package/lib/md030.js +9 -4
- package/lib/md031.js +3 -0
- package/lib/md032.js +12 -14
- package/lib/md033.js +9 -2
- package/lib/md034.js +31 -5
- package/lib/md035.js +9 -2
- package/lib/md036.js +33 -39
- package/lib/md037.js +10 -2
- package/lib/md038.js +27 -18
- package/lib/md039.js +4 -0
- package/lib/md040.js +26 -21
- package/lib/md041.js +21 -26
- package/lib/md042.js +4 -0
- package/lib/md043.js +3 -0
- package/lib/md044.js +9 -1
- package/lib/md045.js +10 -3
- package/lib/md046.js +14 -7
- package/lib/md047.js +5 -2
- package/lib/md048.js +26 -13
- package/lib/md049-md050.js +26 -7
- package/lib/md051.js +20 -16
- package/lib/md052.js +3 -0
- package/lib/md053.js +3 -0
- package/lib/md054.js +10 -5
- package/lib/md055.js +80 -0
- package/lib/md056.js +52 -0
- package/lib/rules.js +5 -3
- package/package.json +26 -32
- package/schema/.markdownlint.jsonc +58 -51
- package/schema/.markdownlint.yaml +56 -50
- package/schema/ValidatingConfiguration.md +28 -0
- package/schema/markdownlint-config-schema.json +165 -113
package/lib/md051.js
CHANGED
|
@@ -11,22 +11,19 @@ const { filterByPredicate, filterByTypes, getHtmlTagInfo } =
|
|
|
11
11
|
const idRe = getHtmlAttributeRe("id");
|
|
12
12
|
const nameRe = getHtmlAttributeRe("name");
|
|
13
13
|
const anchorRe = /\{(#[a-z\d]+(?:[-_][a-z\d]+)*)\}/gu;
|
|
14
|
+
const lineFragmentRe = /^#(?:L\d+(?:C\d+)?-L\d+(?:C\d+)?|L\d+)$/;
|
|
14
15
|
|
|
15
16
|
// Sets for filtering heading tokens during conversion
|
|
16
17
|
const childrenExclude = new Set([ "image", "reference", "resource" ]);
|
|
17
18
|
const tokensInclude = new Set(
|
|
18
|
-
[ "characterEscapeValue", "codeTextData", "data" ]
|
|
19
|
+
[ "characterEscapeValue", "codeTextData", "data", "mathTextData" ]
|
|
19
20
|
);
|
|
20
21
|
|
|
21
|
-
/**
|
|
22
|
-
* @typedef {import("../helpers/micromark.cjs").Token} Token
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
22
|
/**
|
|
26
23
|
* Converts a Markdown heading into an HTML fragment according to the rules
|
|
27
24
|
* used by GitHub.
|
|
28
25
|
*
|
|
29
|
-
* @param {Token} headingText Heading text token.
|
|
26
|
+
* @param {import("../helpers/micromark.cjs").Token} headingText Heading text token.
|
|
30
27
|
* @returns {string} Fragment string for heading.
|
|
31
28
|
*/
|
|
32
29
|
function convertHeadingToHTMLFragment(headingText) {
|
|
@@ -55,7 +52,7 @@ function convertHeadingToHTMLFragment(headingText) {
|
|
|
55
52
|
/**
|
|
56
53
|
* Unescapes the text of a String-type micromark Token.
|
|
57
54
|
*
|
|
58
|
-
* @param {Token} token String-type micromark Token.
|
|
55
|
+
* @param {import("../helpers/micromark.cjs").Token} token String-type micromark Token.
|
|
59
56
|
* @returns {string} Unescaped token text.
|
|
60
57
|
*/
|
|
61
58
|
function unescapeStringTokenText(token) {
|
|
@@ -64,19 +61,23 @@ function unescapeStringTokenText(token) {
|
|
|
64
61
|
.join("");
|
|
65
62
|
}
|
|
66
63
|
|
|
64
|
+
// eslint-disable-next-line jsdoc/valid-types
|
|
65
|
+
/** @type import("./markdownlint").Rule */
|
|
67
66
|
module.exports = {
|
|
68
67
|
"names": [ "MD051", "link-fragments" ],
|
|
69
68
|
"description": "Link fragments should be valid",
|
|
70
69
|
"tags": [ "links" ],
|
|
70
|
+
"parser": "micromark",
|
|
71
71
|
"function": function MD051(params, onError) {
|
|
72
|
-
|
|
72
|
+
// eslint-disable-next-line jsdoc/valid-types
|
|
73
|
+
/** @type import("../helpers/micromark.cjs").Token[] */
|
|
74
|
+
const micromarkTokens =
|
|
75
|
+
// @ts-ignore
|
|
76
|
+
params.parsers.micromark.tokens;
|
|
73
77
|
const fragments = new Map();
|
|
74
78
|
|
|
75
79
|
// Process headings
|
|
76
|
-
const headingTexts = filterByTypes(
|
|
77
|
-
tokens,
|
|
78
|
-
[ "atxHeadingText", "setextHeadingText" ]
|
|
79
|
-
);
|
|
80
|
+
const headingTexts = filterByTypes(micromarkTokens, [ "atxHeadingText", "setextHeadingText" ]);
|
|
80
81
|
for (const headingText of headingTexts) {
|
|
81
82
|
const fragment = convertHeadingToHTMLFragment(headingText);
|
|
82
83
|
if (fragment !== "#") {
|
|
@@ -96,7 +97,7 @@ module.exports = {
|
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
// Process HTML anchors
|
|
99
|
-
for (const token of filterByTypes(
|
|
100
|
+
for (const token of filterByTypes(micromarkTokens, [ "htmlText" ])) {
|
|
100
101
|
const htmlTagInfo = getHtmlTagInfo(token);
|
|
101
102
|
if (htmlTagInfo && !htmlTagInfo.close) {
|
|
102
103
|
const anchorMatch = idRe.exec(token.text) ||
|
|
@@ -108,22 +109,25 @@ module.exports = {
|
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
// Process link and definition fragments
|
|
112
|
+
// eslint-disable-next-line jsdoc/valid-types
|
|
113
|
+
/** @type import("../helpers/micromark.cjs").TokenType[][] */
|
|
111
114
|
const parentChilds = [
|
|
112
115
|
[ "link", "resourceDestinationString" ],
|
|
113
116
|
[ "definition", "definitionDestinationString" ]
|
|
114
117
|
];
|
|
115
118
|
for (const [ parentType, definitionType ] of parentChilds) {
|
|
116
|
-
const links = filterByTypes(
|
|
119
|
+
const links = filterByTypes(micromarkTokens, [ parentType ]);
|
|
117
120
|
for (const link of links) {
|
|
118
121
|
const definitions = filterByTypes(link.children, [ definitionType ]);
|
|
119
122
|
for (const definition of definitions) {
|
|
120
123
|
const { endColumn, startColumn } = definition;
|
|
121
124
|
const text = unescapeStringTokenText(definition);
|
|
125
|
+
const encodedText = `#${encodeURIComponent(text.slice(1))}`;
|
|
122
126
|
if (
|
|
123
127
|
(text.length > 1) &&
|
|
124
128
|
text.startsWith("#") &&
|
|
125
|
-
!fragments.has(
|
|
126
|
-
!
|
|
129
|
+
!fragments.has(encodedText) &&
|
|
130
|
+
!lineFragmentRe.test(encodedText)
|
|
127
131
|
) {
|
|
128
132
|
// eslint-disable-next-line no-undef-init
|
|
129
133
|
let context = undefined;
|
package/lib/md052.js
CHANGED
|
@@ -5,11 +5,14 @@
|
|
|
5
5
|
const { addError } = require("../helpers");
|
|
6
6
|
const { referenceLinkImageData } = require("./cache");
|
|
7
7
|
|
|
8
|
+
// eslint-disable-next-line jsdoc/valid-types
|
|
9
|
+
/** @type import("./markdownlint").Rule */
|
|
8
10
|
module.exports = {
|
|
9
11
|
"names": [ "MD052", "reference-links-images" ],
|
|
10
12
|
"description":
|
|
11
13
|
"Reference links and images should use a label that is defined",
|
|
12
14
|
"tags": [ "images", "links" ],
|
|
15
|
+
"parser": "none",
|
|
13
16
|
"function": function MD052(params, onError) {
|
|
14
17
|
const { config, lines } = params;
|
|
15
18
|
const shortcutSyntax = config.shortcut_syntax || false;
|
package/lib/md053.js
CHANGED
|
@@ -6,10 +6,13 @@ const { addError, ellipsify, linkReferenceDefinitionRe } =
|
|
|
6
6
|
require("../helpers");
|
|
7
7
|
const { referenceLinkImageData } = require("./cache");
|
|
8
8
|
|
|
9
|
+
// eslint-disable-next-line jsdoc/valid-types
|
|
10
|
+
/** @type import("./markdownlint").Rule */
|
|
9
11
|
module.exports = {
|
|
10
12
|
"names": [ "MD053", "link-image-reference-definitions" ],
|
|
11
13
|
"description": "Link and image reference definitions should be needed",
|
|
12
14
|
"tags": [ "images", "links" ],
|
|
15
|
+
"parser": "none",
|
|
13
16
|
"function": function MD053(params, onError) {
|
|
14
17
|
const ignored = new Set(params.config.ignored_definitions || [ "//" ]);
|
|
15
18
|
const lines = params.lines;
|
package/lib/md054.js
CHANGED
|
@@ -21,12 +21,15 @@ const autolinkAble = (destination) => {
|
|
|
21
21
|
return !autolinkDisallowedRe.test(destination);
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
+
// eslint-disable-next-line jsdoc/valid-types
|
|
25
|
+
/** @type import("./markdownlint").Rule */
|
|
24
26
|
module.exports = {
|
|
25
27
|
"names": [ "MD054", "link-image-style" ],
|
|
26
28
|
"description": "Link and image style",
|
|
27
29
|
"tags": [ "images", "links" ],
|
|
30
|
+
"parser": "micromark",
|
|
28
31
|
"function": (params, onError) => {
|
|
29
|
-
const
|
|
32
|
+
const config = params.config;
|
|
30
33
|
const autolink = (config.autolink === undefined) || !!config.autolink;
|
|
31
34
|
const inline = (config.inline === undefined) || !!config.inline;
|
|
32
35
|
const full = (config.full === undefined) || !!config.full;
|
|
@@ -37,11 +40,13 @@ module.exports = {
|
|
|
37
40
|
// Everything allowed, nothing to check
|
|
38
41
|
return;
|
|
39
42
|
}
|
|
43
|
+
// eslint-disable-next-line jsdoc/valid-types
|
|
44
|
+
/** @type import("../helpers/micromark.cjs").Token[] */
|
|
45
|
+
const micromarkTokens =
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
params.parsers.micromark.tokens;
|
|
40
48
|
const { definitions } = referenceLinkImageData();
|
|
41
|
-
const links = filterByTypes(
|
|
42
|
-
parsers.micromark.tokens,
|
|
43
|
-
[ "autolink", "image", "link" ]
|
|
44
|
-
);
|
|
49
|
+
const links = filterByTypes(micromarkTokens, [ "autolink", "image", "link" ]);
|
|
45
50
|
for (const link of links) {
|
|
46
51
|
let label = null;
|
|
47
52
|
let destination = null;
|
package/lib/md055.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
|
|
5
|
+
const { addErrorDetailIf } = require("../helpers");
|
|
6
|
+
const { filterByTypes } = require("../helpers/micromark.cjs");
|
|
7
|
+
|
|
8
|
+
const whitespaceTypes = new Set([ "linePrefix", "whitespace" ]);
|
|
9
|
+
const ignoreWhitespace = (tokens) => tokens.filter(
|
|
10
|
+
(token) => !whitespaceTypes.has(token.type)
|
|
11
|
+
);
|
|
12
|
+
const firstOrNothing = (items) => items[0];
|
|
13
|
+
const lastOrNothing = (items) => items[items.length - 1];
|
|
14
|
+
const makeRange = (start, end) => [ start, end - start + 1 ];
|
|
15
|
+
|
|
16
|
+
// eslint-disable-next-line jsdoc/valid-types
|
|
17
|
+
/** @type import("./markdownlint").Rule */
|
|
18
|
+
module.exports = {
|
|
19
|
+
"names": [ "MD055", "table-pipe-style" ],
|
|
20
|
+
"description": "Table pipe style",
|
|
21
|
+
"tags": [ "table" ],
|
|
22
|
+
"parser": "micromark",
|
|
23
|
+
"function": function MD055(params, onError) {
|
|
24
|
+
const style = String(params.config.style || "consistent");
|
|
25
|
+
let expectedStyle = style;
|
|
26
|
+
let expectedLeadingPipe =
|
|
27
|
+
((expectedStyle !== "no_leading_or_trailing") && (expectedStyle !== "trailing_only"));
|
|
28
|
+
let expectedTrailingPipe =
|
|
29
|
+
((expectedStyle !== "no_leading_or_trailing") && (expectedStyle !== "leading_only"));
|
|
30
|
+
// eslint-disable-next-line jsdoc/valid-types
|
|
31
|
+
/** @type import("../helpers/micromark.cjs").Token[] */
|
|
32
|
+
const micromarkTokens =
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
params.parsers.micromark.tokens;
|
|
35
|
+
const tables = filterByTypes(micromarkTokens, [ "table" ]);
|
|
36
|
+
for (const table of tables) {
|
|
37
|
+
const rows = filterByTypes(table.children, [ "tableDelimiterRow", "tableRow" ]);
|
|
38
|
+
for (const row of rows) {
|
|
39
|
+
// The following uses of first/lastOrNothing lack fallback handling
|
|
40
|
+
// because it seems not to be possible (i.e., 0% coverage)
|
|
41
|
+
const firstCell = firstOrNothing(row.children);
|
|
42
|
+
const leadingToken = firstOrNothing(ignoreWhitespace(firstCell.children));
|
|
43
|
+
const actualLeadingPipe = (leadingToken.type === "tableCellDivider");
|
|
44
|
+
const lastCell = lastOrNothing(row.children);
|
|
45
|
+
const trailingToken = lastOrNothing(ignoreWhitespace(lastCell.children));
|
|
46
|
+
const actualTrailingPipe = (trailingToken.type === "tableCellDivider");
|
|
47
|
+
const actualStyle = actualLeadingPipe ?
|
|
48
|
+
(actualTrailingPipe ? "leading_and_trailing" : "leading_only") :
|
|
49
|
+
(actualTrailingPipe ? "trailing_only" : "no_leading_or_trailing");
|
|
50
|
+
if (expectedStyle === "consistent") {
|
|
51
|
+
expectedStyle = actualStyle;
|
|
52
|
+
expectedLeadingPipe = actualLeadingPipe;
|
|
53
|
+
expectedTrailingPipe = actualTrailingPipe;
|
|
54
|
+
}
|
|
55
|
+
if (actualLeadingPipe !== expectedLeadingPipe) {
|
|
56
|
+
addErrorDetailIf(
|
|
57
|
+
onError,
|
|
58
|
+
firstCell.startLine,
|
|
59
|
+
expectedStyle,
|
|
60
|
+
actualStyle,
|
|
61
|
+
`${expectedLeadingPipe ? "Missing" : "Unexpected"} leading pipe`,
|
|
62
|
+
undefined,
|
|
63
|
+
makeRange(row.startColumn, firstCell.startColumn)
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
if (actualTrailingPipe !== expectedTrailingPipe) {
|
|
67
|
+
addErrorDetailIf(
|
|
68
|
+
onError,
|
|
69
|
+
lastCell.endLine,
|
|
70
|
+
expectedStyle,
|
|
71
|
+
actualStyle,
|
|
72
|
+
`${expectedTrailingPipe ? "Missing" : "Unexpected"} trailing pipe`,
|
|
73
|
+
undefined,
|
|
74
|
+
makeRange(lastCell.endColumn - 1, row.endColumn - 1)
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
package/lib/md056.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
|
|
5
|
+
const { addErrorDetailIf } = require("../helpers");
|
|
6
|
+
const { filterByTypes } = require("../helpers/micromark.cjs");
|
|
7
|
+
|
|
8
|
+
const makeRange = (start, end) => [ start, end - start + 1 ];
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line jsdoc/valid-types
|
|
11
|
+
/** @type import("./markdownlint").Rule */
|
|
12
|
+
module.exports = {
|
|
13
|
+
"names": [ "MD056", "table-column-count" ],
|
|
14
|
+
"description": "Table column count",
|
|
15
|
+
"tags": [ "table" ],
|
|
16
|
+
"parser": "micromark",
|
|
17
|
+
"function": function MD056(params, onError) {
|
|
18
|
+
// eslint-disable-next-line jsdoc/valid-types
|
|
19
|
+
/** @type import("../helpers/micromark.cjs").Token[] */
|
|
20
|
+
const micromarkTokens =
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
params.parsers.micromark.tokens;
|
|
23
|
+
const tables = filterByTypes(micromarkTokens, [ "table" ]);
|
|
24
|
+
for (const table of tables) {
|
|
25
|
+
const rows = filterByTypes(table.children, [ "tableDelimiterRow", "tableRow" ]);
|
|
26
|
+
let expectedCount = 0;
|
|
27
|
+
for (const row of rows) {
|
|
28
|
+
const cells = filterByTypes(row.children, [ "tableData", "tableDelimiter", "tableHeader" ]);
|
|
29
|
+
const actualCount = cells.length;
|
|
30
|
+
expectedCount ||= actualCount;
|
|
31
|
+
let detail = null;
|
|
32
|
+
let range = null;
|
|
33
|
+
if (actualCount < expectedCount) {
|
|
34
|
+
detail = "Too few cells, row will be missing data";
|
|
35
|
+
range = [ row.endColumn - 1, 1 ];
|
|
36
|
+
} else if (expectedCount < actualCount) {
|
|
37
|
+
detail = "Too many cells, extra data will be missing";
|
|
38
|
+
range = makeRange(cells[expectedCount].startColumn, row.endColumn - 1);
|
|
39
|
+
}
|
|
40
|
+
addErrorDetailIf(
|
|
41
|
+
onError,
|
|
42
|
+
row.endLine,
|
|
43
|
+
expectedCount,
|
|
44
|
+
actualCount,
|
|
45
|
+
detail,
|
|
46
|
+
null,
|
|
47
|
+
range
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
package/lib/rules.js
CHANGED
|
@@ -6,9 +6,11 @@ const { homepage, version } = require("./constants");
|
|
|
6
6
|
|
|
7
7
|
const rules = [
|
|
8
8
|
require("./md001"),
|
|
9
|
+
// md002: Deprecated and removed
|
|
9
10
|
require("./md003"),
|
|
10
11
|
require("./md004"),
|
|
11
12
|
require("./md005"),
|
|
13
|
+
// md006: Deprecated and removed
|
|
12
14
|
require("./md007"),
|
|
13
15
|
require("./md009"),
|
|
14
16
|
require("./md010"),
|
|
@@ -51,9 +53,9 @@ const rules = [
|
|
|
51
53
|
require("./md051"),
|
|
52
54
|
require("./md052"),
|
|
53
55
|
require("./md053"),
|
|
54
|
-
require("./md054")
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
require("./md054"),
|
|
57
|
+
require("./md055"),
|
|
58
|
+
require("./md056")
|
|
57
59
|
// md057: See https://github.com/markdownlint/markdownlint
|
|
58
60
|
];
|
|
59
61
|
for (const rule of rules) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markdownlint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"description": "A Node.js style checker and lint tool for Markdown/CommonMark files.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./lib/markdownlint.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"build-config": "npm run build-config-schema && npm run build-config-example",
|
|
27
27
|
"build-config-example": "node schema/build-config-example.js",
|
|
28
28
|
"build-config-schema": "node schema/build-config-schema.js",
|
|
29
|
-
"build-declaration": "tsc --allowJs --declaration --emitDeclarationOnly --module commonjs --resolveJsonModule --target es2015 lib/markdownlint.js && node scripts
|
|
29
|
+
"build-declaration": "tsc --allowJs --declaration --emitDeclarationOnly --module commonjs --outDir dts --resolveJsonModule --target es2015 lib/markdownlint.js && node scripts copy dts/lib/markdownlint.d.ts lib/markdownlint.d.ts && node scripts remove dts",
|
|
30
30
|
"build-demo": "node scripts copy node_modules/markdown-it/dist/markdown-it.min.js demo/markdown-it.min.js && node scripts copy node_modules/markdownlint-micromark/micromark-browser.js demo/micromark-browser.js && node scripts copy node_modules/markdownlint-micromark/micromark-html-browser.js demo/micromark-html-browser.js && cd demo && webpack --no-stats",
|
|
31
31
|
"build-docs": "node doc-build/build-rules.mjs",
|
|
32
32
|
"build-example": "npm install --no-save --ignore-scripts grunt grunt-cli gulp through2",
|
|
@@ -48,56 +48,50 @@
|
|
|
48
48
|
"example": "cd example && node standalone.js && grunt markdownlint --force && gulp markdownlint",
|
|
49
49
|
"docker-npm-install": "docker run --rm --tty --name npm-install --volume $PWD:/home/workdir --workdir /home/workdir --user node node:latest npm install",
|
|
50
50
|
"docker-npm-run-upgrade": "docker run --rm --tty --name npm-run-upgrade --volume $PWD:/home/workdir --workdir /home/workdir --user node node:latest npm run upgrade",
|
|
51
|
-
"install-micromark": "cd micromark && npm install
|
|
51
|
+
"install-micromark": "cd micromark && npm install",
|
|
52
52
|
"lint": "eslint --ext .js,.cjs,.mjs --max-warnings 0 .",
|
|
53
|
-
"lint-test-repos": "ava --timeout=10m test/markdownlint-test-repos
|
|
53
|
+
"lint-test-repos": "ava --timeout=10m test/markdownlint-test-repos-*.js",
|
|
54
54
|
"serial-config-docs": "npm run build-config && npm run build-docs",
|
|
55
55
|
"serial-declaration-demo": "npm run build-declaration && npm-run-all --continue-on-error --parallel build-demo test-declaration",
|
|
56
56
|
"test": "ava --timeout=30s test/markdownlint-test.js test/markdownlint-test-config.js test/markdownlint-test-custom-rules.js test/markdownlint-test-helpers.js test/markdownlint-test-micromark.mjs test/markdownlint-test-result-object.js test/markdownlint-test-scenarios.js",
|
|
57
57
|
"test-cover": "c8 --100 npm test",
|
|
58
58
|
"test-declaration": "cd example/typescript && tsc && node type-check.js",
|
|
59
|
-
"test-extra": "ava --timeout=
|
|
59
|
+
"test-extra": "ava --timeout=10m test/markdownlint-test-extra-parse.js test/markdownlint-test-extra-type.js",
|
|
60
60
|
"update-snapshots": "ava --update-snapshots test/markdownlint-test-micromark.mjs test/markdownlint-test-scenarios.js",
|
|
61
|
-
"update-snapshots-test-repos": "ava --timeout=10m --update-snapshots test/markdownlint-test-repos
|
|
61
|
+
"update-snapshots-test-repos": "ava --timeout=10m --update-snapshots test/markdownlint-test-repos-*.js",
|
|
62
62
|
"upgrade": "npx --yes npm-check-updates --upgrade"
|
|
63
63
|
},
|
|
64
64
|
"engines": {
|
|
65
65
|
"node": ">=18"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"markdown-it": "
|
|
69
|
-
"markdownlint-micromark": "0.1.
|
|
68
|
+
"markdown-it": "14.1.0",
|
|
69
|
+
"markdownlint-micromark": "0.1.9"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"ava": "5.3.1",
|
|
76
|
-
"babel-loader": "9.1.3",
|
|
77
|
-
"c8": "8.0.1",
|
|
72
|
+
"ajv": "8.12.0",
|
|
73
|
+
"ava": "6.1.2",
|
|
74
|
+
"c8": "9.1.0",
|
|
78
75
|
"character-entities": "2.0.2",
|
|
79
|
-
"eslint": "8.
|
|
80
|
-
"eslint-plugin-
|
|
81
|
-
"eslint-plugin-
|
|
82
|
-
"eslint-plugin-
|
|
83
|
-
"eslint-plugin-
|
|
84
|
-
"eslint-plugin-unicorn": "49.0.0",
|
|
76
|
+
"eslint": "8.57.0",
|
|
77
|
+
"eslint-plugin-jsdoc": "48.2.1",
|
|
78
|
+
"eslint-plugin-n": "16.6.2",
|
|
79
|
+
"eslint-plugin-regexp": "2.3.0",
|
|
80
|
+
"eslint-plugin-unicorn": "51.0.1",
|
|
85
81
|
"gemoji": "8.1.0",
|
|
86
|
-
"globby": "14.0.
|
|
82
|
+
"globby": "14.0.1",
|
|
87
83
|
"js-yaml": "4.1.0",
|
|
88
|
-
"json-schema-to-typescript": "13.1.
|
|
89
|
-
"
|
|
90
|
-
"markdown-it-
|
|
91
|
-
"markdown-it-
|
|
92
|
-
"
|
|
84
|
+
"json-schema-to-typescript": "13.1.2",
|
|
85
|
+
"jsonc-parser": "3.2.1",
|
|
86
|
+
"markdown-it-for-inline": "2.0.1",
|
|
87
|
+
"markdown-it-sub": "2.0.0",
|
|
88
|
+
"markdown-it-sup": "2.0.0",
|
|
93
89
|
"npm-run-all": "4.1.5",
|
|
94
|
-
"
|
|
95
|
-
"terser-webpack-plugin": "5.3.9",
|
|
90
|
+
"terser-webpack-plugin": "5.3.10",
|
|
96
91
|
"toml": "3.0.0",
|
|
97
|
-
"typescript": "5.
|
|
98
|
-
"webpack": "5.
|
|
99
|
-
"webpack-cli": "5.1.4"
|
|
100
|
-
"yaml": "2.3.4"
|
|
92
|
+
"typescript": "5.4.3",
|
|
93
|
+
"webpack": "5.91.0",
|
|
94
|
+
"webpack-cli": "5.1.4"
|
|
101
95
|
},
|
|
102
96
|
"keywords": [
|
|
103
97
|
"markdown",
|