markdownlint 0.37.0 → 0.37.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/helpers/README.md +2 -2
- package/helpers/helpers.cjs +3 -3
- package/helpers/micromark-helpers.cjs +7 -4
- package/helpers/package.json +1 -1
- package/lib/configuration-strict.d.ts +104 -104
- package/lib/constants.mjs +1 -1
- package/lib/markdownlint.mjs +3 -5
- package/lib/md032.mjs +7 -6
- package/lib/node-imports-browser-module.cjs +7 -0
- package/lib/node-imports-browser.mjs +22 -0
- package/lib/node-imports-node.mjs +14 -0
- package/lib/types.d.mts +1 -0
- package/package.json +17 -8
- package/schema/.markdownlint.jsonc +51 -51
- package/schema/.markdownlint.yaml +51 -51
- package/schema/markdownlint-config-schema-strict.json +106 -106
- package/schema/markdownlint-config-schema.json +106 -106
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.37.2
|
|
4
|
+
|
|
5
|
+
- Add subpath imports for overriding default bundler behavior
|
|
6
|
+
- Improve MD032
|
|
7
|
+
|
|
8
|
+
## 0.37.1
|
|
9
|
+
|
|
10
|
+
- Add support for "browser" condition (as used by webpack)
|
|
11
|
+
|
|
3
12
|
## 0.37.0
|
|
4
13
|
|
|
5
14
|
- Convert module to ECMAScript (breaking change)
|
package/helpers/README.md
CHANGED
|
@@ -22,8 +22,8 @@ be useful to custom rule authors and may avoid duplicating code.
|
|
|
22
22
|
*None* - The entire body of code is tested to 100% coverage by the core
|
|
23
23
|
`markdownlint` project, so there are no additional tests here.
|
|
24
24
|
|
|
25
|
-
[custom-rules]: https://github.com/DavidAnson/markdownlint/blob/v0.37.
|
|
25
|
+
[custom-rules]: https://github.com/DavidAnson/markdownlint/blob/v0.37.2/doc/CustomRules.md
|
|
26
26
|
[jsdoc]: https://en.m.wikipedia.org/wiki/JSDoc
|
|
27
27
|
[markdown]: https://en.wikipedia.org/wiki/Markdown
|
|
28
28
|
[markdownlint]: https://github.com/DavidAnson/markdownlint
|
|
29
|
-
[rules]: https://github.com/DavidAnson/markdownlint/blob/v0.37.
|
|
29
|
+
[rules]: https://github.com/DavidAnson/markdownlint/blob/v0.37.2/doc/Rules.md
|
package/helpers/helpers.cjs
CHANGED
|
@@ -10,11 +10,11 @@ module.exports.newLineRe = newLineRe;
|
|
|
10
10
|
module.exports.nextLinesRe = nextLinesRe;
|
|
11
11
|
|
|
12
12
|
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/52529
|
|
13
|
-
/** @typedef {import("
|
|
13
|
+
/** @typedef {import("../lib/exports.mjs").RuleOnError} RuleOnError */
|
|
14
14
|
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/52529
|
|
15
|
-
/** @typedef {import("
|
|
15
|
+
/** @typedef {import("../lib/exports.mjs").RuleOnErrorFixInfo} RuleOnErrorFixInfo */
|
|
16
16
|
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/52529
|
|
17
|
-
/** @typedef {import("
|
|
17
|
+
/** @typedef {import("../lib/exports.mjs").MicromarkToken} MicromarkToken */
|
|
18
18
|
// eslint-disable-next-line jsdoc/valid-types
|
|
19
19
|
/** @typedef {import("micromark-extension-gfm-footnote", { with: { "resolution-mode": "import" } })} */
|
|
20
20
|
// eslint-disable-next-line jsdoc/valid-types
|
|
@@ -7,7 +7,7 @@ const { flatTokensSymbol, htmlFlowSymbol } = require("./shared.cjs");
|
|
|
7
7
|
// eslint-disable-next-line jsdoc/valid-types
|
|
8
8
|
/** @typedef {import("micromark-util-types", { with: { "resolution-mode": "import" } }).TokenType} TokenType */
|
|
9
9
|
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/52529
|
|
10
|
-
/** @typedef {import("
|
|
10
|
+
/** @typedef {import("../lib/exports.mjs").MicromarkToken} Token */
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Determines if a Micromark token is within an htmlFlow type.
|
|
@@ -78,12 +78,11 @@ function addRangeToSet(set, start, end) {
|
|
|
78
78
|
* Filter a list of Micromark tokens by predicate.
|
|
79
79
|
*
|
|
80
80
|
* @param {Token[]} tokens Micromark tokens.
|
|
81
|
-
* @param {AllowedPredicate}
|
|
81
|
+
* @param {AllowedPredicate} allowed Allowed token predicate.
|
|
82
82
|
* @param {TransformPredicate} [transformChildren] Transform predicate.
|
|
83
83
|
* @returns {Token[]} Filtered tokens.
|
|
84
84
|
*/
|
|
85
85
|
function filterByPredicate(tokens, allowed, transformChildren) {
|
|
86
|
-
allowed = allowed || (() => true);
|
|
87
86
|
const result = [];
|
|
88
87
|
const queue = [
|
|
89
88
|
{
|
|
@@ -278,7 +277,11 @@ const nonContentTokens = new Set([
|
|
|
278
277
|
"lineEnding",
|
|
279
278
|
"lineEndingBlank",
|
|
280
279
|
"linePrefix",
|
|
281
|
-
"listItemIndent"
|
|
280
|
+
"listItemIndent",
|
|
281
|
+
"undefinedReference",
|
|
282
|
+
"undefinedReferenceCollapsed",
|
|
283
|
+
"undefinedReferenceFull",
|
|
284
|
+
"undefinedReferenceShortcut"
|
|
282
285
|
]);
|
|
283
286
|
|
|
284
287
|
module.exports = {
|