markdownlint 0.20.2 → 0.21.1

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.
Files changed (64) hide show
  1. package/CONTRIBUTING.md +50 -47
  2. package/LICENSE +21 -21
  3. package/README.md +915 -871
  4. package/demo/markdownlint-browser.js +4693 -5400
  5. package/doc/CustomRules.md +315 -313
  6. package/doc/Rules.md +1868 -1795
  7. package/helpers/LICENSE +21 -21
  8. package/helpers/README.md +50 -50
  9. package/helpers/helpers.js +690 -671
  10. package/helpers/package.json +18 -18
  11. package/lib/cache.js +24 -24
  12. package/lib/markdownlint.d.ts +365 -352
  13. package/lib/markdownlint.js +1186 -1101
  14. package/lib/md001.js +22 -22
  15. package/lib/md002.js +22 -22
  16. package/lib/md003.js +42 -42
  17. package/lib/md004.js +43 -43
  18. package/lib/md005.js +69 -69
  19. package/lib/md006.js +34 -34
  20. package/lib/md007.js +47 -47
  21. package/lib/md009.js +77 -77
  22. package/lib/md010.js +38 -38
  23. package/lib/md011.js +42 -38
  24. package/lib/md012.js +32 -32
  25. package/lib/md013.js +99 -99
  26. package/lib/md014.js +53 -53
  27. package/lib/md018.js +34 -34
  28. package/lib/md019.js +39 -39
  29. package/lib/md020.js +62 -62
  30. package/lib/md021.js +60 -60
  31. package/lib/md022.js +56 -56
  32. package/lib/md023.js +38 -38
  33. package/lib/md024.js +38 -38
  34. package/lib/md025.js +32 -32
  35. package/lib/md026.js +40 -40
  36. package/lib/md027.js +56 -56
  37. package/lib/md028.js +38 -38
  38. package/lib/md029.js +66 -66
  39. package/lib/md030.js +50 -50
  40. package/lib/md031.js +40 -39
  41. package/lib/md032.js +50 -50
  42. package/lib/md033.js +45 -45
  43. package/lib/md034.js +61 -61
  44. package/lib/md035.js +21 -21
  45. package/lib/md036.js +56 -56
  46. package/lib/md037.js +150 -141
  47. package/lib/md038.js +68 -68
  48. package/lib/md039.js +64 -64
  49. package/lib/md040.js +18 -18
  50. package/lib/md041.js +31 -31
  51. package/lib/md042.js +42 -41
  52. package/lib/md043.js +45 -45
  53. package/lib/md044.js +94 -71
  54. package/lib/md045.js +18 -18
  55. package/lib/md046.js +32 -32
  56. package/lib/md047.js +28 -28
  57. package/lib/md048.js +29 -29
  58. package/lib/rules.js +60 -61
  59. package/package.json +74 -67
  60. package/schema/build-config-schema.js +409 -405
  61. package/schema/markdownlint-config-schema.json +7 -2
  62. package/style/all.json +5 -5
  63. package/style/cirosantilli.json +22 -22
  64. package/style/relaxed.json +13 -13
package/helpers/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015-2020 David Anson
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015-2020 David Anson
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/helpers/README.md CHANGED
@@ -1,50 +1,50 @@
1
- # markdownlint-rule-helpers
2
-
3
- > A collection of `markdownlint` helper functions for custom rules
4
-
5
- ## Overview
6
-
7
- The [Markdown](https://en.wikipedia.org/wiki/Markdown) linter
8
- [`markdownlint`](https://github.com/DavidAnson/markdownlint) offers a variety of built-in validation
9
- [rules](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md) and supports the
10
- creation of [custom rules](https://github.com/DavidAnson/markdownlint/blob/master/doc/CustomRules.md).
11
- The internal rules share various helper functions; this package exposes those for reuse by custom rules.
12
-
13
- ## API
14
-
15
- _Undocumented_ - This package exports the internal functions as-is. The APIs were not originally meant
16
- to be public, are not officially supported, and may change from release to release. There are brief
17
- descriptive comments above each function, but no [JSDoc](https://en.m.wikipedia.org/wiki/JSDoc)
18
- annotations. That said, some of what's here will be useful to custom rule authors and may avoid
19
- duplicating code.
20
-
21
- ## Example
22
-
23
- ```js
24
- const { forEachLine, getLineMetadata } = require("markdownlint-rule-helpers");
25
-
26
- module.exports = {
27
- "names": [ "every-n-lines" ],
28
- "description": "Rule that reports an error every N lines",
29
- "tags": [ "test" ],
30
- "function": (params, onError) => {
31
- const n = params.config.n || 2;
32
- forEachLine(getLineMetadata(params), (line, lineIndex) => {
33
- const lineNumber = lineIndex + 1;
34
- if ((lineNumber % n) === 0) {
35
- onError({
36
- "lineNumber": lineNumber,
37
- "detail": "Line number " + lineNumber
38
- });
39
- }
40
- });
41
- }
42
- };
43
- ```
44
-
45
- See also: [`markdownlint` built-in rule implementations](https://github.com/DavidAnson/markdownlint/tree/master/lib).
46
-
47
- ## Tests
48
-
49
- _None_ - The entire body of code is tested to 100% coverage by the core `markdownlint` project,
50
- so there are no additional tests here.
1
+ # markdownlint-rule-helpers
2
+
3
+ > A collection of `markdownlint` helper functions for custom rules
4
+
5
+ ## Overview
6
+
7
+ The [Markdown](https://en.wikipedia.org/wiki/Markdown) linter
8
+ [`markdownlint`](https://github.com/DavidAnson/markdownlint) offers a variety of built-in validation
9
+ [rules](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md) and supports the
10
+ creation of [custom rules](https://github.com/DavidAnson/markdownlint/blob/main/doc/CustomRules.md).
11
+ The internal rules share various helper functions; this package exposes those for reuse by custom rules.
12
+
13
+ ## API
14
+
15
+ _Undocumented_ - This package exports the internal functions as-is. The APIs were not originally meant
16
+ to be public, are not officially supported, and may change from release to release. There are brief
17
+ descriptive comments above each function, but no [JSDoc](https://en.m.wikipedia.org/wiki/JSDoc)
18
+ annotations. That said, some of what's here will be useful to custom rule authors and may avoid
19
+ duplicating code.
20
+
21
+ ## Example
22
+
23
+ ```js
24
+ const { forEachLine, getLineMetadata } = require("markdownlint-rule-helpers");
25
+
26
+ module.exports = {
27
+ "names": [ "every-n-lines" ],
28
+ "description": "Rule that reports an error every N lines",
29
+ "tags": [ "test" ],
30
+ "function": (params, onError) => {
31
+ const n = params.config.n || 2;
32
+ forEachLine(getLineMetadata(params), (line, lineIndex) => {
33
+ const lineNumber = lineIndex + 1;
34
+ if ((lineNumber % n) === 0) {
35
+ onError({
36
+ "lineNumber": lineNumber,
37
+ "detail": "Line number " + lineNumber
38
+ });
39
+ }
40
+ });
41
+ }
42
+ };
43
+ ```
44
+
45
+ See also: [`markdownlint` built-in rule implementations](https://github.com/DavidAnson/markdownlint/tree/main/lib).
46
+
47
+ ## Tests
48
+
49
+ _None_ - The entire body of code is tested to 100% coverage by the core `markdownlint` project,
50
+ so there are no additional tests here.