markdownlint 0.24.0 → 0.25.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/CONTRIBUTING.md +13 -3
- package/README.md +17 -7
- package/demo/markdownlint-browser.js +584 -367
- package/doc/CustomRules.md +15 -4
- package/doc/Rules.md +86 -13
- package/helpers/helpers.js +168 -50
- package/helpers/package.json +1 -1
- package/lib/cache.js +9 -9
- package/lib/constants.js +7 -0
- package/lib/markdownlint.d.ts +6 -2
- package/lib/markdownlint.js +216 -213
- package/lib/md007.js +4 -2
- package/lib/md010.js +21 -16
- package/lib/md011.js +2 -2
- package/lib/md033.js +12 -8
- package/lib/md035.js +4 -4
- package/lib/md037.js +5 -3
- package/lib/md039.js +2 -1
- package/lib/md043.js +0 -1
- package/lib/md044.js +2 -2
- package/lib/md049.js +45 -0
- package/lib/md050.js +45 -0
- package/lib/rules.js +4 -4
- package/package.json +25 -23
- package/schema/.markdownlint.jsonc +15 -1
- package/schema/.markdownlint.yaml +12 -0
- package/schema/markdownlint-config-schema.json +95 -1
package/CONTRIBUTING.md
CHANGED
|
@@ -23,7 +23,7 @@ Try to break the new code now, or else it will get broken later.
|
|
|
23
23
|
|
|
24
24
|
Run tests before sending a pull request via `npm test` in the [usual manner](https://docs.npmjs.com/misc/scripts).
|
|
25
25
|
Tests should all pass on all platforms.
|
|
26
|
-
The test runner is [
|
|
26
|
+
The test runner is [AVA](https://github.com/avajs/ava) and test cases are located in `test/markdownlint-test*.js`.
|
|
27
27
|
When running tests, `test/*.md` files are enumerated, linted, and fail if any violations are missing a corresponding `{MD###}` marker in the test file.
|
|
28
28
|
For example, the line `### Heading {MD001}` is expected to trigger the rule `MD001`.
|
|
29
29
|
For cases where the marker text can not be present on the same line, the syntax `{MD###:#}` can be used to include a line number.
|
|
@@ -33,7 +33,8 @@ Lint before sending a pull request by running `npm run lint`.
|
|
|
33
33
|
There should be no issues.
|
|
34
34
|
|
|
35
35
|
Run a full continuous integration pass before sending a pull request via `npm run ci`.
|
|
36
|
-
Code coverage should
|
|
36
|
+
Code coverage should always be 100%.
|
|
37
|
+
As part of a continuous integration run, generated files may get updated and fail the run - commit them to the repository and rerun continuous integration.
|
|
37
38
|
|
|
38
39
|
Pull requests should contain a single commit.
|
|
39
40
|
If necessary, squash multiple commits before creating the pull request and when making changes.
|
|
@@ -43,9 +44,18 @@ Open pull requests against the `next` branch.
|
|
|
43
44
|
That's where the latest changes are staged for the next release.
|
|
44
45
|
Include the text "(fixes #??)" at the end of the commit message so the pull request will be associated with the relevant issue.
|
|
45
46
|
End commit messages with a period (`.`).
|
|
46
|
-
Do not include `package-lock.json` in the pull request.
|
|
47
47
|
Once accepted, the tag `fixed in next` will be added to the issue.
|
|
48
48
|
When the commit is merged to the main branch during the release process, the issue will be closed automatically.
|
|
49
49
|
(See [Closing issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/) for details.)
|
|
50
50
|
|
|
51
|
+
Please refrain from using slang or meaningless placeholder words.
|
|
52
|
+
Sample content can be "text", "code", "heading", or the like.
|
|
53
|
+
Sample URLs should use [example.com](https://en.wikipedia.org/wiki/Example.com) which is safe for this purpose.
|
|
54
|
+
Profanity is not allowed.
|
|
55
|
+
|
|
56
|
+
In order to maintain the permissive MIT license this project uses, all contributions must be your own and released under that license.
|
|
57
|
+
Code you add should be an original work and should not be copied from elsewhere.
|
|
58
|
+
Taking code from a different project, Stack Overflow, or the like is not allowed.
|
|
59
|
+
The use of tools such as GitHub Copilot that generate code from other projects is not allowed.
|
|
60
|
+
|
|
51
61
|
Thank you!
|
package/README.md
CHANGED
|
@@ -33,8 +33,10 @@ and test cases came directly from that project.
|
|
|
33
33
|
### Related
|
|
34
34
|
|
|
35
35
|
* CLI
|
|
36
|
-
* [markdownlint-cli
|
|
37
|
-
|
|
36
|
+
* [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)
|
|
37
|
+
command-line interface for Node.js ([works with pre-commit](https://github.com/igorshubovych/markdownlint-cli#use-with-pre-commit))
|
|
38
|
+
* [markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2)
|
|
39
|
+
command-line interface for Node.js ([works with pre-commit](https://github.com/DavidAnson/markdownlint-cli2#pre-commit))
|
|
38
40
|
* GitHub
|
|
39
41
|
* [GitHub Super-Linter Action](https://github.com/github/super-linter)
|
|
40
42
|
* [GitHub Actions problem matcher for markdownlint-cli](https://github.com/xt0rted/markdownlint-problem-matcher)
|
|
@@ -102,6 +104,8 @@ playground for learning and exploring.
|
|
|
102
104
|
* **[MD046](doc/Rules.md#md046)** *code-block-style* - Code block style
|
|
103
105
|
* **[MD047](doc/Rules.md#md047)** *single-trailing-newline* - Files should end with a single newline character
|
|
104
106
|
* **[MD048](doc/Rules.md#md048)** *code-fence-style* - Code fence style
|
|
107
|
+
* **[MD049](doc/Rules.md#md049)** *emphasis-style* - Emphasis style should be consistent
|
|
108
|
+
* **[MD050](doc/Rules.md#md050)** *strong-style* - Strong style should be consistent
|
|
105
109
|
|
|
106
110
|
<!-- markdownlint-restore -->
|
|
107
111
|
|
|
@@ -125,7 +129,7 @@ rules at once.
|
|
|
125
129
|
* **blockquote** - MD027, MD028
|
|
126
130
|
* **bullet** - MD004, MD005, MD006, MD007, MD032
|
|
127
131
|
* **code** - MD014, MD031, MD038, MD040, MD046, MD048
|
|
128
|
-
* **emphasis** - MD036, MD037
|
|
132
|
+
* **emphasis** - MD036, MD037, MD049, MD050
|
|
129
133
|
* **hard_tab** - MD010
|
|
130
134
|
* **headers** - MD001, MD002, MD003, MD018, MD019, MD020, MD021, MD022,
|
|
131
135
|
MD023, MD024, MD025, MD026, MD036, MD041, MD043
|
|
@@ -163,10 +167,12 @@ appear in the final markup):
|
|
|
163
167
|
|
|
164
168
|
* Disable all rules: `<!-- markdownlint-disable -->`
|
|
165
169
|
* Enable all rules: `<!-- markdownlint-enable -->`
|
|
166
|
-
* Disable all rules for the next line only:
|
|
170
|
+
* Disable all rules for the next line only:
|
|
171
|
+
`<!-- markdownlint-disable-next-line -->`
|
|
167
172
|
* Disable one or more rules by name: `<!-- markdownlint-disable MD001 MD005 -->`
|
|
168
173
|
* Enable one or more rules by name: `<!-- markdownlint-enable MD001 MD005 -->`
|
|
169
|
-
* Disable one or more rules by name for the next line only:
|
|
174
|
+
* Disable one or more rules by name for the next line only:
|
|
175
|
+
`<!-- markdownlint-disable-next-line MD001 MD005 -->`
|
|
170
176
|
* Capture the current rule configuration: `<!-- markdownlint-capture -->`
|
|
171
177
|
* Restore the captured rule configuration: `<!-- markdownlint-restore -->`
|
|
172
178
|
|
|
@@ -229,7 +235,7 @@ more rules for a file, the following more advanced syntax is supported:
|
|
|
229
235
|
For example:
|
|
230
236
|
|
|
231
237
|
```markdown
|
|
232
|
-
<!-- markdownlint-configure-file { "MD013": { "
|
|
238
|
+
<!-- markdownlint-configure-file { "MD013": { "code_blocks": false } } -->
|
|
233
239
|
```
|
|
234
240
|
|
|
235
241
|
or
|
|
@@ -859,7 +865,7 @@ const results = window.markdownlint.sync(options).toString();
|
|
|
859
865
|
## Examples
|
|
860
866
|
|
|
861
867
|
For ideas how to integrate `markdownlint` into your workflow, refer to the
|
|
862
|
-
following projects or one of the tools in the [Related section](#
|
|
868
|
+
following projects or one of the tools in the [Related section](#related):
|
|
863
869
|
|
|
864
870
|
* [.NET Documentation](https://docs.microsoft.com/en-us/dotnet/) ([Search repository](https://github.com/dotnet/docs/search?q=markdownlint))
|
|
865
871
|
* [ally.js](https://allyjs.io/) ([Search repository](https://github.com/medialize/ally.js/search?q=markdownlint))
|
|
@@ -870,6 +876,7 @@ following projects or one of the tools in the [Related section](#Related):
|
|
|
870
876
|
* [MDN Web Docs](https://developer.mozilla.org/) ([Search repository](https://github.com/mdn/content/search?q=markdownlint))
|
|
871
877
|
* [MkDocs](https://www.mkdocs.org/) ([Search repository](https://github.com/mkdocs/mkdocs/search?q=markdownlint))
|
|
872
878
|
* [Mocha](https://mochajs.org/) ([Search repository](https://github.com/mochajs/mocha/search?q=markdownlint))
|
|
879
|
+
* [Pi-hole documentation](https://docs.pi-hole.net) ([Search repository](https://github.com/pi-hole/docs/search?q=markdownlint))
|
|
873
880
|
* [Reactable](https://glittershark.github.io/reactable/) ([Search repository](https://github.com/glittershark/reactable/search?q=markdownlint))
|
|
874
881
|
* [Sinon.JS](https://sinonjs.org/) ([Search repository](https://github.com/sinonjs/sinon/search?q=markdownlint))
|
|
875
882
|
* [TestCafe](https://devexpress.github.io/testcafe/) ([Search repository](https://github.com/DevExpress/testcafe/search?q=markdownlint))
|
|
@@ -968,6 +975,9 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
|
|
|
968
975
|
* 0.24.0 - Remove support for end-of-life Node version 10, add support for custom file system
|
|
969
976
|
module, improve MD010/MD011/MD037/MD043/MD044, improve TypeScript declaration file
|
|
970
977
|
and JSON schema, update dependencies.
|
|
978
|
+
* 0.25.0 - Add MD049/MD050 for consistent emphasis/strong style (both auto-fixable), improve
|
|
979
|
+
MD007/MD010/MD032/MD033/MD035/MD037/MD039, support asynchronous custom rules,
|
|
980
|
+
improve performance, improve CI process, reduce dependencies, update dependencies.
|
|
971
981
|
|
|
972
982
|
[npm-image]: https://img.shields.io/npm/v/markdownlint.svg
|
|
973
983
|
[npm-url]: https://www.npmjs.com/package/markdownlint
|