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.
- package/CONTRIBUTING.md +50 -47
- package/LICENSE +21 -21
- package/README.md +915 -871
- package/demo/markdownlint-browser.js +4693 -5400
- package/doc/CustomRules.md +315 -313
- package/doc/Rules.md +1868 -1795
- package/helpers/LICENSE +21 -21
- package/helpers/README.md +50 -50
- package/helpers/helpers.js +690 -671
- package/helpers/package.json +18 -18
- package/lib/cache.js +24 -24
- package/lib/markdownlint.d.ts +365 -352
- package/lib/markdownlint.js +1186 -1101
- package/lib/md001.js +22 -22
- package/lib/md002.js +22 -22
- package/lib/md003.js +42 -42
- package/lib/md004.js +43 -43
- package/lib/md005.js +69 -69
- package/lib/md006.js +34 -34
- package/lib/md007.js +47 -47
- package/lib/md009.js +77 -77
- package/lib/md010.js +38 -38
- package/lib/md011.js +42 -38
- package/lib/md012.js +32 -32
- package/lib/md013.js +99 -99
- package/lib/md014.js +53 -53
- package/lib/md018.js +34 -34
- package/lib/md019.js +39 -39
- package/lib/md020.js +62 -62
- package/lib/md021.js +60 -60
- package/lib/md022.js +56 -56
- package/lib/md023.js +38 -38
- package/lib/md024.js +38 -38
- package/lib/md025.js +32 -32
- package/lib/md026.js +40 -40
- package/lib/md027.js +56 -56
- package/lib/md028.js +38 -38
- package/lib/md029.js +66 -66
- package/lib/md030.js +50 -50
- package/lib/md031.js +40 -39
- package/lib/md032.js +50 -50
- package/lib/md033.js +45 -45
- package/lib/md034.js +61 -61
- package/lib/md035.js +21 -21
- package/lib/md036.js +56 -56
- package/lib/md037.js +150 -141
- package/lib/md038.js +68 -68
- package/lib/md039.js +64 -64
- package/lib/md040.js +18 -18
- package/lib/md041.js +31 -31
- package/lib/md042.js +42 -41
- package/lib/md043.js +45 -45
- package/lib/md044.js +94 -71
- package/lib/md045.js +18 -18
- package/lib/md046.js +32 -32
- package/lib/md047.js +28 -28
- package/lib/md048.js +29 -29
- package/lib/rules.js +60 -61
- package/package.json +74 -67
- package/schema/build-config-schema.js +409 -405
- package/schema/markdownlint-config-schema.json +7 -2
- package/style/all.json +5 -5
- package/style/cirosantilli.json +22 -22
- package/style/relaxed.json +13 -13
package/lib/rules.js
CHANGED
|
@@ -1,61 +1,60 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
require("./
|
|
12
|
-
require("./
|
|
13
|
-
require("./
|
|
14
|
-
require("./
|
|
15
|
-
require("./
|
|
16
|
-
require("./
|
|
17
|
-
require("./
|
|
18
|
-
require("./
|
|
19
|
-
require("./
|
|
20
|
-
require("./
|
|
21
|
-
require("./
|
|
22
|
-
require("./
|
|
23
|
-
require("./
|
|
24
|
-
require("./
|
|
25
|
-
require("./
|
|
26
|
-
require("./
|
|
27
|
-
require("./
|
|
28
|
-
require("./
|
|
29
|
-
require("./
|
|
30
|
-
require("./
|
|
31
|
-
require("./
|
|
32
|
-
require("./
|
|
33
|
-
require("./
|
|
34
|
-
require("./
|
|
35
|
-
require("./
|
|
36
|
-
require("./
|
|
37
|
-
require("./
|
|
38
|
-
require("./
|
|
39
|
-
require("./
|
|
40
|
-
require("./
|
|
41
|
-
require("./
|
|
42
|
-
require("./
|
|
43
|
-
require("./
|
|
44
|
-
require("./
|
|
45
|
-
require("./
|
|
46
|
-
require("./
|
|
47
|
-
require("./
|
|
48
|
-
require("./
|
|
49
|
-
require("./
|
|
50
|
-
require("./
|
|
51
|
-
require("./
|
|
52
|
-
require("./
|
|
53
|
-
require("./
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
module.exports = rules;
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
|
|
5
|
+
const packageJson = require("../package.json");
|
|
6
|
+
const homepage = packageJson.homepage;
|
|
7
|
+
const version = packageJson.version;
|
|
8
|
+
|
|
9
|
+
const rules = [
|
|
10
|
+
require("./md001"),
|
|
11
|
+
require("./md002"),
|
|
12
|
+
require("./md003"),
|
|
13
|
+
require("./md004"),
|
|
14
|
+
require("./md005"),
|
|
15
|
+
require("./md006"),
|
|
16
|
+
require("./md007"),
|
|
17
|
+
require("./md009"),
|
|
18
|
+
require("./md010"),
|
|
19
|
+
require("./md011"),
|
|
20
|
+
require("./md012"),
|
|
21
|
+
require("./md013"),
|
|
22
|
+
require("./md014"),
|
|
23
|
+
require("./md018"),
|
|
24
|
+
require("./md019"),
|
|
25
|
+
require("./md020"),
|
|
26
|
+
require("./md021"),
|
|
27
|
+
require("./md022"),
|
|
28
|
+
require("./md023"),
|
|
29
|
+
require("./md024"),
|
|
30
|
+
require("./md025"),
|
|
31
|
+
require("./md026"),
|
|
32
|
+
require("./md027"),
|
|
33
|
+
require("./md028"),
|
|
34
|
+
require("./md029"),
|
|
35
|
+
require("./md030"),
|
|
36
|
+
require("./md031"),
|
|
37
|
+
require("./md032"),
|
|
38
|
+
require("./md033"),
|
|
39
|
+
require("./md034"),
|
|
40
|
+
require("./md035"),
|
|
41
|
+
require("./md036"),
|
|
42
|
+
require("./md037"),
|
|
43
|
+
require("./md038"),
|
|
44
|
+
require("./md039"),
|
|
45
|
+
require("./md040"),
|
|
46
|
+
require("./md041"),
|
|
47
|
+
require("./md042"),
|
|
48
|
+
require("./md043"),
|
|
49
|
+
require("./md044"),
|
|
50
|
+
require("./md045"),
|
|
51
|
+
require("./md046"),
|
|
52
|
+
require("./md047"),
|
|
53
|
+
require("./md048")
|
|
54
|
+
];
|
|
55
|
+
rules.forEach((rule) => {
|
|
56
|
+
const name = rule.names[0].toLowerCase();
|
|
57
|
+
rule.information =
|
|
58
|
+
new URL(`${homepage}/blob/v${version}/doc/Rules.md#${name}`);
|
|
59
|
+
});
|
|
60
|
+
module.exports = rules;
|
package/package.json
CHANGED
|
@@ -1,67 +1,74 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "markdownlint",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "A Node.js style checker and lint tool for Markdown/CommonMark files.",
|
|
5
|
-
"main": "lib/markdownlint.js",
|
|
6
|
-
"types": "lib/markdownlint.d.ts",
|
|
7
|
-
"author": "David Anson (https://dlaa.me/)",
|
|
8
|
-
"license": "MIT",
|
|
9
|
-
"homepage": "https://github.com/DavidAnson/markdownlint",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "https://github.com/DavidAnson/markdownlint.git"
|
|
13
|
-
},
|
|
14
|
-
"bugs": "https://github.com/DavidAnson/markdownlint/issues",
|
|
15
|
-
"scripts": {
|
|
16
|
-
"test": "
|
|
17
|
-
"test-cover": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100
|
|
18
|
-
"test-declaration": "cd example/typescript && tsc && node type-check.js",
|
|
19
|
-
"test-extra": "node test/markdownlint-test-extra.js",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"build-
|
|
24
|
-
"build-
|
|
25
|
-
"build-
|
|
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
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
"markdown
|
|
66
|
-
|
|
67
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "markdownlint",
|
|
3
|
+
"version": "0.21.1",
|
|
4
|
+
"description": "A Node.js style checker and lint tool for Markdown/CommonMark files.",
|
|
5
|
+
"main": "lib/markdownlint.js",
|
|
6
|
+
"types": "lib/markdownlint.d.ts",
|
|
7
|
+
"author": "David Anson (https://dlaa.me/)",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"homepage": "https://github.com/DavidAnson/markdownlint",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/DavidAnson/markdownlint.git"
|
|
13
|
+
},
|
|
14
|
+
"bugs": "https://github.com/DavidAnson/markdownlint/issues",
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "tape test/markdownlint-test.js test/markdownlint-test-custom-rules.js test/markdownlint-test-helpers.js test/markdownlint-test-result-object.js test/markdownlint-test-scenarios.js",
|
|
17
|
+
"test-cover": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 tape test/markdownlint-test.js test/markdownlint-test-custom-rules.js test/markdownlint-test-helpers.js test/markdownlint-test-result-object.js test/markdownlint-test-scenarios.js",
|
|
18
|
+
"test-declaration": "cd example/typescript && tsc && node type-check.js",
|
|
19
|
+
"test-extra": "node test/markdownlint-test-extra.js",
|
|
20
|
+
"lint": "eslint --max-warnings 0 lib helpers test schema && eslint --env browser --global markdownit --global markdownlint --rule \"no-unused-vars: 0, no-extend-native: 0, max-statements: 0, no-console: 0, no-var: 0, unicorn/prefer-add-event-listener: 0, unicorn/prefer-query-selector: 0, unicorn/prefer-replace-all: 0\" demo && eslint --rule \"no-console: 0, no-invalid-this: 0, no-shadow: 0, object-property-newline: 0, node/no-missing-require: 0, node/no-extraneous-require: 0\" example",
|
|
21
|
+
"ci": "npm run test-cover && npm run lint && npm run test-declaration",
|
|
22
|
+
"build-config-schema": "node schema/build-config-schema.js",
|
|
23
|
+
"build-declaration": "tsc --allowJs --declaration --emitDeclarationOnly --resolveJsonModule lib/markdownlint.js && rimraf 'lib/{c,md,r}*.d.ts' 'helpers/*.d.ts'",
|
|
24
|
+
"build-demo": "cpy node_modules/markdown-it/dist/markdown-it.min.js demo && cd demo && rimraf markdownlint-browser.* && cpy file-header.js . --rename=markdownlint-browser.js && tsc --allowJs --resolveJsonModule --outDir ../lib-es3 ../lib/markdownlint.js && cpy ../helpers/package.json ../lib-es3/helpers && browserify ../lib-es3/lib/markdownlint.js --standalone markdownlint >> markdownlint-browser.js && browserify ../lib-es3/helpers/helpers.js --standalone helpers >> markdownlint-rule-helpers-browser.js && uglifyjs markdownlint-browser.js markdownlint-rule-helpers-browser.js --compress --mangle --comments --output markdownlint-browser.min.js",
|
|
25
|
+
"build-example": "npm install --no-save --ignore-scripts grunt grunt-cli gulp through2",
|
|
26
|
+
"example": "cd example && node standalone.js && grunt markdownlint --force && gulp markdownlint",
|
|
27
|
+
"clone-test-repos": "make-dir test-repos && cd test-repos && git clone https://github.com/eslint/eslint eslint-eslint --depth 1 --no-tags --quiet && git clone https://github.com/mkdocs/mkdocs mkdocs-mkdocs --depth 1 --no-tags --quiet && git clone https://github.com/pi-hole/docs pi-hole-docs --depth 1 --no-tags --quiet",
|
|
28
|
+
"clone-test-repos-large": "npm run clone-test-repos && cd test-repos && git clone https://github.com/dotnet/docs dotnet-docs --depth 1 --no-tags --quiet",
|
|
29
|
+
"lint-test-repos": "node test/markdownlint-test-repos.js",
|
|
30
|
+
"clean-test-repos": "rimraf test-repos"
|
|
31
|
+
},
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=10"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"markdown-it": "11.0.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "~14.6.4",
|
|
40
|
+
"browserify": "~16.5.2",
|
|
41
|
+
"c8": "~7.3.0",
|
|
42
|
+
"cpy-cli": "~3.1.1",
|
|
43
|
+
"eslint": "~7.8.1",
|
|
44
|
+
"eslint-plugin-jsdoc": "~30.3.1",
|
|
45
|
+
"eslint-plugin-node": "~11.1.0",
|
|
46
|
+
"eslint-plugin-unicorn": "~21.0.0",
|
|
47
|
+
"globby": "~11.0.1",
|
|
48
|
+
"js-yaml": "~3.14.0",
|
|
49
|
+
"make-dir-cli": "~2.0.0",
|
|
50
|
+
"markdown-it-for-inline": "~0.1.1",
|
|
51
|
+
"markdown-it-sub": "~1.0.0",
|
|
52
|
+
"markdown-it-sup": "~1.0.0",
|
|
53
|
+
"markdown-it-texmath": "~0.8.0",
|
|
54
|
+
"markdownlint-rule-helpers": "~0.11.0",
|
|
55
|
+
"rimraf": "~3.0.2",
|
|
56
|
+
"strip-json-comments": "~3.1.1",
|
|
57
|
+
"tape": "~5.0.1",
|
|
58
|
+
"tape-player": "~0.1.1",
|
|
59
|
+
"toml": "~3.0.0",
|
|
60
|
+
"tv4": "~1.3.0",
|
|
61
|
+
"typescript": "~4.0.2",
|
|
62
|
+
"uglify-js": "~3.10.3"
|
|
63
|
+
},
|
|
64
|
+
"keywords": [
|
|
65
|
+
"markdown",
|
|
66
|
+
"lint",
|
|
67
|
+
"md",
|
|
68
|
+
"CommonMark",
|
|
69
|
+
"markdownlint"
|
|
70
|
+
],
|
|
71
|
+
"browser": {
|
|
72
|
+
"markdown-it": "../demo/markdown-it-stub.js"
|
|
73
|
+
}
|
|
74
|
+
}
|