markdownlint-cli 0.44.0 → 0.45.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 CHANGED
@@ -142,7 +142,7 @@ To run `markdownlint-cli` as part of a [pre-commit][pre-commit] workflow, add so
142
142
 
143
143
  ```yaml
144
144
  - repo: https://github.com/igorshubovych/markdownlint-cli
145
- rev: v0.44.0
145
+ rev: v0.45.0
146
146
  hooks:
147
147
  - id: markdownlint
148
148
  ```
package/markdownlint.js CHANGED
@@ -16,9 +16,13 @@ import jsonpointer from 'jsonpointer';
16
16
  const require = Module.createRequire(import.meta.url);
17
17
  const options = program.opts();
18
18
  // The following two values are copied from package.json (and validated by tests)
19
- const version = '0.44.0';
19
+ const version = '0.45.0';
20
20
  const description = 'MarkdownLint Command Line Interface';
21
21
 
22
+ function markdownItFactory() {
23
+ return require('markdown-it')({html: true});
24
+ }
25
+
22
26
  function posixPath(p) {
23
27
  return p.split(path.sep).join(path.posix.sep);
24
28
  }
@@ -61,7 +65,7 @@ function readConfiguration(userConfigFile) {
61
65
  let config = rc('markdownlint', {});
62
66
  for (const projectConfigFile of projectConfigFiles) {
63
67
  try {
64
- fs.accessSync(projectConfigFile, fs.R_OK);
68
+ fs.accessSync(projectConfigFile);
65
69
  const projectConfig = readConfig(projectConfigFile, configParsers);
66
70
  config = {...config, ...projectConfig};
67
71
  break;
@@ -291,6 +295,7 @@ function lintAndPrint(stdin, files) {
291
295
  }
292
296
 
293
297
  const lintOptions = {
298
+ markdownItFactory,
294
299
  config,
295
300
  configParsers,
296
301
  customRules,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markdownlint-cli",
3
- "version": "0.44.0",
3
+ "version": "0.45.0",
4
4
  "description": "MarkdownLint Command Line Interface",
5
5
  "type": "module",
6
6
  "main": "markdownlint.js",
@@ -8,7 +8,7 @@
8
8
  "markdownlint": "markdownlint.js"
9
9
  },
10
10
  "engines": {
11
- "node": ">=18"
11
+ "node": ">=20"
12
12
  },
13
13
  "scripts": {
14
14
  "invalid": "node ./markdownlint.js --config test/test-config.json -- test/incorrect.md",
@@ -39,20 +39,21 @@
39
39
  "homepage": "https://github.com/igorshubovych/markdownlint-cli#readme",
40
40
  "dependencies": {
41
41
  "commander": "~13.1.0",
42
- "glob": "~10.4.5",
43
- "ignore": "~7.0.3",
42
+ "glob": "~11.0.2",
43
+ "ignore": "~7.0.4",
44
44
  "js-yaml": "~4.1.0",
45
45
  "jsonc-parser": "~3.3.1",
46
46
  "jsonpointer": "~5.0.1",
47
- "markdownlint": "~0.37.4",
48
- "minimatch": "~9.0.5",
47
+ "markdownlint": "~0.38.0",
48
+ "markdown-it": "~14.1.0",
49
+ "minimatch": "~10.0.1",
49
50
  "run-con": "~1.3.2",
50
- "smol-toml": "~1.3.1"
51
+ "smol-toml": "~1.3.4"
51
52
  },
52
53
  "devDependencies": {
53
54
  "ava": "^6.2.0",
54
55
  "markdownlint-cli-local-test-rule": "./test/custom-rules/markdownlint-cli-local-test-rule",
55
- "nano-spawn": "^0.2.0",
56
+ "nano-spawn": "^1.0.1",
56
57
  "xo": "^0.60.0"
57
58
  },
58
59
  "xo": {