markdownlint 0.26.2 → 0.27.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 +81 -59
- package/README.md +424 -303
- package/demo/markdownlint-browser.js +374 -144
- package/doc/CustomRules.md +101 -50
- package/doc/Prettier.md +14 -10
- package/doc/ReleaseProcess.md +20 -0
- package/doc/Rules.md +453 -296
- package/doc/md001.md +37 -0
- package/doc/md002.md +37 -0
- package/doc/md003.md +59 -0
- package/doc/md004.md +49 -0
- package/doc/md005.md +53 -0
- package/doc/md006.md +46 -0
- package/doc/md007.md +55 -0
- package/doc/md009.md +51 -0
- package/doc/md010.md +56 -0
- package/doc/md011.md +30 -0
- package/doc/md012.md +38 -0
- package/doc/md013.md +60 -0
- package/doc/md014.md +54 -0
- package/doc/md018.md +27 -0
- package/doc/md019.md +28 -0
- package/doc/md020.md +29 -0
- package/doc/md021.md +31 -0
- package/doc/md022.md +46 -0
- package/doc/md023.md +26 -0
- package/doc/md024.md +47 -0
- package/doc/md025.md +49 -0
- package/doc/md026.md +41 -0
- package/doc/md027.md +24 -0
- package/doc/md028.md +40 -0
- package/doc/md029.md +98 -0
- package/doc/md030.md +82 -0
- package/doc/md031.md +50 -0
- package/doc/md032.md +38 -0
- package/doc/md033.md +27 -0
- package/doc/md034.md +44 -0
- package/doc/md035.md +42 -0
- package/doc/md036.md +45 -0
- package/doc/md037.md +37 -0
- package/doc/md038.md +40 -0
- package/doc/md039.md +21 -0
- package/doc/md040.md +52 -0
- package/doc/md041.md +49 -0
- package/doc/md042.md +32 -0
- package/doc/md043.md +72 -0
- package/doc/md044.md +35 -0
- package/doc/md045.md +34 -0
- package/doc/md046.md +40 -0
- package/doc/md047.md +34 -0
- package/doc/md048.md +41 -0
- package/doc/md049.md +32 -0
- package/doc/md050.md +32 -0
- package/doc/md051.md +50 -0
- package/doc/md052.md +33 -0
- package/doc/md053.md +38 -0
- package/helpers/README.md +35 -15
- package/helpers/helpers.js +204 -42
- package/helpers/package.json +2 -2
- package/lib/constants.js +8 -1
- package/lib/markdownlint.js +7 -7
- package/lib/md011.js +2 -2
- package/lib/md013.js +7 -6
- package/lib/md019.js +1 -1
- package/lib/md022.js +15 -3
- package/lib/md023.js +1 -1
- package/lib/md026.js +1 -1
- package/lib/md033.js +15 -4
- package/lib/md034.js +70 -45
- package/lib/md035.js +1 -1
- package/lib/md037.js +2 -2
- package/lib/md038.js +1 -1
- package/lib/md039.js +1 -1
- package/lib/md040.js +21 -2
- package/lib/md043.js +4 -2
- package/lib/md044.js +4 -3
- package/lib/md051.js +37 -5
- package/lib/rules.js +1 -1
- package/package.json +31 -21
- package/schema/.markdownlint.jsonc +10 -3
- package/schema/.markdownlint.yaml +8 -2
- package/schema/markdownlint-config-schema.json +27 -3
- package/style/prettier.json +26 -0
package/CONTRIBUTING.md
CHANGED
|
@@ -1,63 +1,85 @@
|
|
|
1
1
|
# Contributing
|
|
2
2
|
|
|
3
|
-
Interested in contributing? Great! Here are some suggestions to make it a good
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
3
|
+
Interested in contributing? Great! Here are some suggestions to make it a good
|
|
4
|
+
experience:
|
|
5
|
+
|
|
6
|
+
Start by [opening an issue](https://github.com/DavidAnson/markdownlint/issues),
|
|
7
|
+
whether to identify a problem or outline a change. That issue should be used to
|
|
8
|
+
discuss the situation and agree on a plan of action before writing code or
|
|
9
|
+
sending a pull request. Maybe the problem isn't really a problem, or maybe there
|
|
10
|
+
are more things to consider. If so, it's best to realize that before spending
|
|
11
|
+
time and effort writing code that may not get used.
|
|
12
|
+
|
|
13
|
+
Match the coding style of the files you edit. Although everyone has their own
|
|
14
|
+
preferences and opinions, a pull request is not the right forum to debate them.
|
|
15
|
+
|
|
16
|
+
Do not add new [`dependencies` to `package.json`][dependencies]. The excellent
|
|
17
|
+
Markdown parser [markdown-it][markdown-it] is this project's one and only
|
|
18
|
+
dependency.
|
|
19
|
+
|
|
20
|
+
If developing a new rule, start by creating a [custom rule][custom-rules] in its
|
|
21
|
+
own project. Once written, published, and tested in real world scenarios, open
|
|
22
|
+
an issue to consider adding it to this project. For rule ideas, see [issues
|
|
23
|
+
tagged with the `new rule` label][new-rule].
|
|
24
|
+
|
|
25
|
+
Add tests for all new/changed functionality. Test positive and negative
|
|
26
|
+
scenarios. Try to break the new code now, or else it will get broken later.
|
|
27
|
+
|
|
28
|
+
Run tests before sending a pull request via `npm test` in the [usual
|
|
29
|
+
manner][npm-scripts]. Tests should all pass on all platforms. The test runner is
|
|
30
|
+
[AVA][ava] and test cases are located in `test/markdownlint-test*.js`. When
|
|
31
|
+
running tests, `test/*.md` files are enumerated, linted, and fail if any
|
|
32
|
+
violations are missing a corresponding `{MD###}` marker in the test file. For
|
|
33
|
+
example, the line `### Heading {MD001}` is expected to trigger the rule `MD001`.
|
|
34
|
+
For cases where the marker text can not be present on the same line, the syntax
|
|
35
|
+
`{MD###:#}` can be used to include a line number. If `some-test.md` needs custom
|
|
36
|
+
configuration, a `some-test.json` is used to provide a custom `options.config`
|
|
37
|
+
for that scenario. Tests run by `markdownlint-test-scenarios.js` use [AVA's
|
|
38
|
+
snapshot feature][ava-snapshots]. To update snapshots (for example, after
|
|
39
|
+
modifying a test file), run `npm run update-snapshots` and include the updated
|
|
40
|
+
files with the pull request.
|
|
41
|
+
|
|
42
|
+
Lint before sending a pull request by running `npm run lint`. There should be no
|
|
43
|
+
issues.
|
|
44
|
+
|
|
45
|
+
Run a full continuous integration pass before sending a pull request via `npm
|
|
46
|
+
run ci`. Code coverage should always be 100%. As part of a continuous
|
|
47
|
+
integration run, generated files may get updated and fail the run - commit them
|
|
48
|
+
to the repository and rerun continuous integration.
|
|
49
|
+
|
|
50
|
+
Pull requests should contain a single commit. If necessary, squash multiple
|
|
51
|
+
commits before creating the pull request and when making changes. (See [Git
|
|
52
|
+
Tools - Rewriting History][rewriting-history] for details.)
|
|
53
|
+
|
|
54
|
+
Open pull requests against the `next` branch. That's where the latest changes
|
|
55
|
+
are staged for the next release. Include the text "(fixes #??)" at the end of
|
|
56
|
+
the commit message so the pull request will be associated with the relevant
|
|
57
|
+
issue. End commit messages with a period (`.`). Once accepted, the tag `fixed in
|
|
58
|
+
next` will be added to the issue. When the commit is merged to the main branch
|
|
59
|
+
during the release process, the issue will be closed automatically. (See
|
|
60
|
+
[Closing issues using keywords][closing-keywords] for details.)
|
|
61
|
+
|
|
62
|
+
Please refrain from using slang or meaningless placeholder words. Sample content
|
|
63
|
+
can be "text", "code", "heading", or the like. Sample URLs should use
|
|
64
|
+
[example.com][example-com] which is safe for this purpose. Profanity is not
|
|
65
|
+
allowed.
|
|
66
|
+
|
|
67
|
+
In order to maintain the permissive MIT license this project uses, all
|
|
68
|
+
contributions must be your own and released under that license. Code you add
|
|
69
|
+
should be an original work and should not be copied from elsewhere. Taking code
|
|
70
|
+
from a different project, Stack Overflow, or the like is not allowed. The use of
|
|
71
|
+
tools such as GitHub Copilot that generate code from other projects is not
|
|
72
|
+
allowed.
|
|
62
73
|
|
|
63
74
|
Thank you!
|
|
75
|
+
|
|
76
|
+
[ava]: https://github.com/avajs/ava
|
|
77
|
+
[ava-snapshots]: https://github.com/avajs/ava/blob/main/docs/04-snapshot-testing.md
|
|
78
|
+
[closing-keywords]: https://help.github.com/articles/closing-issues-using-keywords/
|
|
79
|
+
[custom-rules]: doc/CustomRules.md
|
|
80
|
+
[dependencies]: https://docs.npmjs.com/files/package.json#dependencies
|
|
81
|
+
[example-com]: https://en.wikipedia.org/wiki/Example.com
|
|
82
|
+
[markdown-it]: https://www.npmjs.com/package/markdown-it
|
|
83
|
+
[new-rule]: https://github.com/DavidAnson/markdownlint/labels/new%20rule
|
|
84
|
+
[npm-scripts]: https://docs.npmjs.com/misc/scripts
|
|
85
|
+
[rewriting-history]: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History
|