markdownlint-cli2 0.16.0 → 0.17.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.17.0
4
+
5
+ - Convert to ECMAScript modules
6
+ - Use import() when loading modules
7
+ - Update dependencies (including `markdownlint`)
8
+
3
9
  ## 0.16.0
4
10
 
5
11
  - 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.16.0 "**/*.md" "#node_modules"
152
+ docker run -v $PWD:/workdir davidanson/markdownlint-cli2:v0.17.0 "**/*.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.16.0 "**/*.md" "#node_modules"
169
+ docker run -w /myfolder -v $PWD:/myfolder davidanson/markdownlint-cli2:v0.17.0 "**/*.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.16.0
416
+ rev: v0.17.0
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.sliceSize = sliceSize;
25
- module.exports = appendToArray;
22
+ export { appendToArray as default, sliceSize };
@@ -0,0 +1,3 @@
1
+ // @ts-check
2
+
3
+ export { default } from "markdownlint/helpers";
@@ -0,0 +1,3 @@
1
+ // @ts-check
2
+
3
+ export * from "markdownlint/promise";
@@ -0,0 +1,3 @@
1
+ // @ts-check
2
+
3
+ export * from "markdownlint";
@@ -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
+ }