markdownlint-cli2 0.16.0 → 0.17.1
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 +10 -0
- package/README.md +3 -3
- package/{append-to-array.js → append-to-array.mjs} +1 -4
- package/export-markdownlint-helpers.mjs +3 -0
- package/export-markdownlint-promise.mjs +3 -0
- package/export-markdownlint.mjs +3 -0
- package/markdownlint-cli2-bin.mjs +16 -0
- package/{markdownlint-cli2.js → markdownlint-cli2.mjs} +114 -171
- package/{merge-options.js → merge-options.mjs} +1 -3
- package/package.json +39 -35
- package/parsers/{jsonc-parse.js → jsonc-parse.mjs} +2 -4
- package/parsers/parsers.mjs +14 -0
- package/parsers/{yaml-parse.js → yaml-parse.mjs} +2 -4
- package/resolve-module.mjs +16 -0
- package/schema/markdownlint-cli2-config-schema.json +17 -17
- package/schema/markdownlint-config-schema.json +106 -106
- package/export-markdownlint-helpers.js +0 -5
- package/export-markdownlint.js +0 -5
- package/parsers/parsers.js +0 -16
- package/resolve-and-require.js +0 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.17.1
|
|
4
|
+
|
|
5
|
+
- Update dependencies (including `markdownlint`)
|
|
6
|
+
|
|
7
|
+
## 0.17.0
|
|
8
|
+
|
|
9
|
+
- Convert to ECMAScript modules
|
|
10
|
+
- Use import() when loading modules
|
|
11
|
+
- Update dependencies (including `markdownlint`)
|
|
12
|
+
|
|
3
13
|
## 0.16.0
|
|
4
14
|
|
|
5
15
|
- Try not to use require for modules (due to Node 22.12)
|
package/README.md
CHANGED
|
@@ -149,7 +149,7 @@ A container image [`davidanson/markdownlint-cli2`][docker-hub-markdownlint-cli2]
|
|
|
149
149
|
can also be used (e.g., as part of a CI pipeline):
|
|
150
150
|
|
|
151
151
|
```bash
|
|
152
|
-
docker run -v $PWD:/workdir davidanson/markdownlint-cli2:v0.
|
|
152
|
+
docker run -v $PWD:/workdir davidanson/markdownlint-cli2:v0.17.1 "**/*.md" "#node_modules"
|
|
153
153
|
```
|
|
154
154
|
|
|
155
155
|
Notes:
|
|
@@ -166,7 +166,7 @@ Notes:
|
|
|
166
166
|
- A custom working directory can be specified with Docker's `-w` flag:
|
|
167
167
|
|
|
168
168
|
```bash
|
|
169
|
-
docker run -w /myfolder -v $PWD:/myfolder davidanson/markdownlint-cli2:v0.
|
|
169
|
+
docker run -w /myfolder -v $PWD:/myfolder davidanson/markdownlint-cli2:v0.17.1 "**/*.md" "#node_modules"
|
|
170
170
|
```
|
|
171
171
|
|
|
172
172
|
For convenience, the container image
|
|
@@ -413,7 +413,7 @@ reference to the `repos` list in that project's `.pre-commit-config.yaml` like:
|
|
|
413
413
|
|
|
414
414
|
```yaml
|
|
415
415
|
- repo: https://github.com/DavidAnson/markdownlint-cli2
|
|
416
|
-
rev: v0.
|
|
416
|
+
rev: v0.17.1
|
|
417
417
|
hooks:
|
|
418
418
|
- id: markdownlint-cli2
|
|
419
419
|
```
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
3
|
const sliceSize = 1000;
|
|
6
4
|
|
|
7
5
|
/**
|
|
@@ -21,5 +19,4 @@ const appendToArray = (destination, source) => {
|
|
|
21
19
|
}
|
|
22
20
|
};
|
|
23
21
|
|
|
24
|
-
appendToArray
|
|
25
|
-
module.exports = appendToArray;
|
|
22
|
+
export { appendToArray as default, sliceSize };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { "main" as markdownlintCli2 } from "./markdownlint-cli2.mjs";
|
|
4
|
+
|
|
5
|
+
const params = {
|
|
6
|
+
"argv": process.argv.slice(2),
|
|
7
|
+
"logMessage": console.log,
|
|
8
|
+
"logError": console.error,
|
|
9
|
+
"allowStdin": true
|
|
10
|
+
};
|
|
11
|
+
try {
|
|
12
|
+
process.exitCode = await markdownlintCli2(params);
|
|
13
|
+
} catch (error) {
|
|
14
|
+
console.error(error);
|
|
15
|
+
process.exitCode = 2;
|
|
16
|
+
}
|