markdownlint-cli2 0.9.2 → 0.11.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 ADDED
@@ -0,0 +1,161 @@
1
+ # Changelog
2
+
3
+ ## 0.11.0
4
+
5
+ - Add `modulePaths` configuration option
6
+ - Update dependencies (including `markdownlint`)
7
+ - Remove support for end-of-life Node 16
8
+
9
+ ## 0.10.0
10
+
11
+ - Add `showFound` configuration option
12
+ - Add `.markdownlint-cli2.jsonc` config schema
13
+ - Update dependencies (including `markdownlint`)
14
+
15
+ ## 0.9.2
16
+
17
+ - Remove `npm-shrinkwrap.json` entirely to avoid `npm` failures
18
+
19
+ ## 0.9.1
20
+
21
+ - Remove `devDependencies` from `npm-shrinkwrap.json` to avoid `npm` failures
22
+
23
+ ## 0.9.0
24
+
25
+ - Add support for Node.js's `package.json` as a configuration file source
26
+ - Add output formatter for Static Analysis Results Interchange Format/SARIF
27
+ - Bundle `npm-shrinkwrap.json` for reproducible/faster installs
28
+ - Update dependencies (including `markdownlint`)
29
+
30
+ ## 0.8.1
31
+
32
+ - Handle `--config` edge case
33
+
34
+ ## 0.8.0
35
+
36
+ - Add support for `--config` and `--fix` parameters
37
+ - Update dependencies (including `markdownlint`)
38
+ - Remove support for end-of-life Node 14
39
+
40
+ ## 0.7.1
41
+
42
+ - Update dependencies (including `markdownlint`)
43
+
44
+ ## 0.7.0
45
+
46
+ - Add support for `extends` in `config` property of `.markdownlint-cli2.*` files
47
+ - Build and publish `davidanson/markdownlint-cli2-rules` Docker container image
48
+ - Update dependencies (including `markdownlint`)
49
+
50
+ ## 0.6.0
51
+
52
+ - Update dependencies (including `markdownlint`)
53
+
54
+ ## 0.5.1
55
+
56
+ - Update dependencies
57
+
58
+ ## 0.5.0
59
+
60
+ - New rules
61
+ - Support modules (MJS) everywhere
62
+ - Include dotfiles
63
+
64
+ ## 0.4.0
65
+
66
+ - New rules
67
+ - Async custom rules
68
+ - Explicit config
69
+ - CJS (breaking)
70
+
71
+ ## 0.3.2
72
+
73
+ - Extensibility/Windows/consistency improvements
74
+
75
+ ## 0.3.1
76
+
77
+ - Extensibility tweaks
78
+
79
+ ## 0.3.0
80
+
81
+ - Add Docker container
82
+ - Update dependencies
83
+
84
+ ## 0.2.0
85
+
86
+ - Improve handling of Windows paths using backslash
87
+
88
+ ## 0.1.3
89
+
90
+ - Support rule collections
91
+
92
+ ## 0.1.2
93
+
94
+ - Update use of `require` to be more flexible
95
+
96
+ ## 0.1.1
97
+
98
+ - Restore previous use of `require`
99
+
100
+ ## 0.1.0
101
+
102
+ - Simplify use of `require`
103
+ - Increment minor version
104
+
105
+ ## 0.0.15
106
+
107
+ - Improve extensibility
108
+
109
+ ## 0.0.14
110
+
111
+ - Update dependencies (including `markdownlint`)
112
+
113
+ ## 0.0.13
114
+
115
+ - Add `markdownlint-cli2-fix` command
116
+
117
+ ## 0.0.12
118
+
119
+ - Update dependencies (including `markdownlint`)
120
+
121
+ ## 0.0.11
122
+
123
+ - Improve performance of `fix`
124
+ - Update banner
125
+
126
+ ## 0.0.10
127
+
128
+ - Improve performance and configuration
129
+
130
+ ## 0.0.9
131
+
132
+ - Improve configuration file handling
133
+
134
+ ## 0.0.8
135
+
136
+ - Support `.markdownlint-cli2.yaml`
137
+ - Add progress
138
+
139
+ ## 0.0.7
140
+
141
+ - Support `.markdownlint-cli2.js` and `.markdownlint.js`
142
+
143
+ ## 0.0.6
144
+
145
+ - Improve handling of very large directory trees
146
+
147
+ ## 0.0.5
148
+
149
+ - Improve support for ignoring files
150
+
151
+ ## 0.0.4
152
+
153
+ - Support output formatters and `markdown-it` plugins
154
+
155
+ ## 0.0.3
156
+
157
+ - Feature parity with `markdownlint-cli`
158
+
159
+ ## 0.0.2
160
+
161
+ - Initial release
package/README.md CHANGED
@@ -167,12 +167,12 @@ A container image [`davidanson/markdownlint-cli2`][docker-hub-markdownlint-cli2]
167
167
  can also be used (e.g., as part of a CI pipeline):
168
168
 
169
169
  ```bash
170
- docker run -v $PWD:/workdir davidanson/markdownlint-cli2:v0.9.2 "**/*.md" "#node_modules"
170
+ docker run -v $PWD:/workdir davidanson/markdownlint-cli2:v0.11.0 "**/*.md" "#node_modules"
171
171
  ```
172
172
 
173
173
  Notes:
174
174
 
175
- - As when using the [command line](#command-line), glob patterns are passed as
175
+ - As when using the [command line][command-line], glob patterns are passed as
176
176
  arguments.
177
177
  - This image is built on the official [Node.js Docker image][nodejs-docker].
178
178
  Per security best practices, the [default user `node`][nodejs-docker-non-root]
@@ -184,7 +184,7 @@ Notes:
184
184
  - A custom working directory can be specified with Docker's `-w` flag:
185
185
 
186
186
  ```bash
187
- docker run -w /myfolder -v $PWD:/myfolder davidanson/markdownlint-cli2:v0.9.2 "**/*.md" "#node_modules"
187
+ docker run -w /myfolder -v $PWD:/myfolder davidanson/markdownlint-cli2:v0.11.0 "**/*.md" "#node_modules"
188
188
  ```
189
189
 
190
190
  > **Deprecated**
@@ -193,7 +193,7 @@ Notes:
193
193
  > instead, use Docker's `--entrypoint` flag:
194
194
  >
195
195
  > ```bash
196
- > docker run -v $PWD:/workdir --entrypoint="markdownlint-cli2-fix" davidanson/markdownlint-cli2:v0.9.2 "**/*.md" "#node_modules"
196
+ > docker run -v $PWD:/workdir --entrypoint="markdownlint-cli2-fix" davidanson/markdownlint-cli2:v0.11.0 "**/*.md" "#node_modules"
197
197
  > ```
198
198
 
199
199
  For convenience, the container image
@@ -231,6 +231,8 @@ of the rules within.
231
231
  - When glob expressions match files *not* under the current directory,
232
232
  configuration for the current directory is applied to the closest common
233
233
  parent directory.
234
+ - Paths beginning with `~` are resolved relative to the user's home directory
235
+ (typically `$HOME` on UNIX and `%USERPROFILE%` on Windows)
234
236
  - There are two kinds of configuration file (both detailed below):
235
237
  - Configuration files like `.markdownlint-cli2.*` allow complete control of
236
238
  `markdownlint-cli2` behavior and are also used by `vscode-markdownlint`.
@@ -305,6 +307,8 @@ of the rules within.
305
307
  - Relative paths are resolved based on the location of the `JSONC` file
306
308
  - For example: `[ [ "plugin-name", param_0, param_1, ... ], ... ]`
307
309
  - Search [`markdown-it-plugins` on npm][markdown-it-plugins]
310
+ - `modulePaths`: `Array` of `String`s providing additional paths to use when
311
+ resolving module references (e.g., alternate locations for `node_modules`)
308
312
  - `noInlineConfig`: `Boolean` value to disable the support of
309
313
  [HTML comments][html-comment] within Markdown content
310
314
  - For example: `<!-- markdownlint-disable some-rule -->`
@@ -320,6 +324,9 @@ of the rules within.
320
324
  - This top-level setting is valid **only** in the directory from which
321
325
  `markdownlint-cli2` is run
322
326
  - Search [`markdownlint-cli2-formatter` on npm][markdownlint-cli2-formatter]
327
+ - `showFound`: `Boolean` value to display the list of found files on `stdout`
328
+ - This top-level setting is valid **only** in the directory from which
329
+ `markdownlint-cli2` is run and **only** when `noProgress` has not been set
323
330
  - When referencing a module via the `customRules`, `markdownItPlugins`, or
324
331
  `outputFormatters` properties, each `String` identifier is passed to Node's
325
332
  [`require` function][nodejs-require] then (if that failed) its
@@ -345,7 +352,7 @@ of the rules within.
345
352
 
346
353
  - The format of this file is a [CommonJS module][commonjs-module] (`.cjs`) or
347
354
  [ECMAScript module][ecmascript-module] (`.mjs`) that exports the object
348
- described above for `.markdownlint-cli2.jsonc`.
355
+ described above for `.markdownlint-cli2.jsonc` (directly or from a `Promise`).
349
356
  - Instead of passing a `String` to identify the module name/path to load for
350
357
  `customRules`, `markdownItPlugins`, and `outputFormatters`, the corresponding
351
358
  `Object` or `Function` can be provided directly.
@@ -385,7 +392,8 @@ of the rules within.
385
392
 
386
393
  - The format of this file is a [CommonJS module][commonjs-module] (`.cjs`) or
387
394
  [ECMAScript module][ecmascript-module] (`.mjs`) that exports the
388
- [`markdownlint` `config` object][markdownlint-config].
395
+ [`markdownlint` `config` object][markdownlint-config] (directly or from a
396
+ `Promise`).
389
397
  - Other details are the same as for `jsonc`/`json` files described above.
390
398
  - For example: [`.markdownlint.cjs`][markdownlint-cjs] or
391
399
  [`.markdownlint.mjs`][markdownlint-mjs]
@@ -412,7 +420,7 @@ reference to the `repos` list in that project's `.pre-commit-config.yaml` like:
412
420
 
413
421
  ```yaml
414
422
  - repo: https://github.com/DavidAnson/markdownlint-cli2
415
- rev: v0.9.2
423
+ rev: v0.11.0
416
424
  hooks:
417
425
  - id: markdownlint-cli2
418
426
  ```
@@ -422,8 +430,10 @@ reference to the `repos` list in that project's `.pre-commit-config.yaml` like:
422
430
 
423
431
  ## History
424
432
 
425
- See [CHANGELOG.md](CHANGELOG.md).
433
+ See [CHANGELOG.md][changelog].
426
434
 
435
+ [changelog]: CHANGELOG.md
436
+ [command-line]: #command-line
427
437
  [commonmark]: https://commonmark.org/
428
438
  [commonjs-module]: https://nodejs.org/api/modules.html#modules_modules_commonjs_modules
429
439
  [ecmascript-module]: https://nodejs.org/api/esm.html#modules-ecmascript-modules