markdownlint-cli 0.41.0 → 0.43.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/README.md +1 -1
- package/markdownlint.js +2 -3
- package/package.json +10 -11
package/README.md
CHANGED
package/markdownlint.js
CHANGED
|
@@ -309,14 +309,13 @@ function lintAndPrint(stdin, files) {
|
|
|
309
309
|
...lintOptions,
|
|
310
310
|
resultVersion: 3
|
|
311
311
|
};
|
|
312
|
-
const markdownlintRuleHelpers = require('markdownlint/helpers');
|
|
313
312
|
for (const file of files) {
|
|
314
313
|
fixOptions.files = [file];
|
|
315
314
|
const fixResult = markdownlint.sync(fixOptions);
|
|
316
315
|
const fixes = fixResult[file].filter(error => error.fixInfo);
|
|
317
316
|
if (fixes.length > 0) {
|
|
318
317
|
const originalText = fs.readFileSync(file, fsOptions);
|
|
319
|
-
const fixedText =
|
|
318
|
+
const fixedText = markdownlint.applyFixes(originalText, fixes);
|
|
320
319
|
if (originalText !== fixedText) {
|
|
321
320
|
fs.writeFileSync(file, fixedText, fsOptions);
|
|
322
321
|
}
|
|
@@ -332,7 +331,7 @@ try {
|
|
|
332
331
|
if (files.length > 0 && !options.stdin) {
|
|
333
332
|
lintAndPrint(null, diff);
|
|
334
333
|
} else if (files.length === 0 && options.stdin && !options.fix) {
|
|
335
|
-
import('
|
|
334
|
+
import('node:stream/consumers').then(module => module.text(process.stdin)).then(lintAndPrint);
|
|
336
335
|
} else {
|
|
337
336
|
program.help();
|
|
338
337
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markdownlint-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"description": "MarkdownLint Command Line Interface",
|
|
5
5
|
"main": "markdownlint.js",
|
|
6
6
|
"bin": {
|
|
@@ -38,22 +38,21 @@
|
|
|
38
38
|
"homepage": "https://github.com/igorshubovych/markdownlint-cli#readme",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"commander": "~12.1.0",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"ignore": "~5.3.1",
|
|
41
|
+
"glob": "~11.0.0",
|
|
42
|
+
"ignore": "~6.0.2",
|
|
44
43
|
"js-yaml": "^4.1.0",
|
|
45
|
-
"jsonc-parser": "~3.
|
|
44
|
+
"jsonc-parser": "~3.3.1",
|
|
46
45
|
"jsonpointer": "5.0.1",
|
|
47
|
-
"markdownlint": "~0.
|
|
48
|
-
"minimatch": "~
|
|
46
|
+
"markdownlint": "~0.36.1",
|
|
47
|
+
"minimatch": "~10.0.1",
|
|
49
48
|
"run-con": "~1.3.2",
|
|
50
|
-
"smol-toml": "~1.
|
|
49
|
+
"smol-toml": "~1.3.1"
|
|
51
50
|
},
|
|
52
51
|
"devDependencies": {
|
|
53
|
-
"ava": "^6.
|
|
54
|
-
"execa": "^9.1.0",
|
|
52
|
+
"ava": "^6.2.0",
|
|
55
53
|
"markdownlint-cli-local-test-rule": "./test/custom-rules/markdownlint-cli-local-test-rule",
|
|
56
|
-
"
|
|
54
|
+
"nano-spawn": "^0.2.0",
|
|
55
|
+
"xo": "^0.59.3"
|
|
57
56
|
},
|
|
58
57
|
"xo": {
|
|
59
58
|
"prettier": true,
|