markdownlint 0.37.3 → 0.38.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/CONTRIBUTING.md +2 -3
  3. package/README.md +39 -21
  4. package/doc/Rules.md +158 -35
  5. package/doc/md027.md +8 -0
  6. package/doc/md038.md +23 -11
  7. package/doc/md041.md +31 -16
  8. package/doc/md043.md +22 -4
  9. package/doc/md045.md +9 -1
  10. package/doc/md051.md +17 -0
  11. package/doc/md052.md +12 -0
  12. package/doc/md053.md +3 -3
  13. package/doc/md059.md +30 -0
  14. package/helpers/README.md +2 -2
  15. package/helpers/helpers.cjs +4 -6
  16. package/helpers/micromark-helpers.cjs +29 -3
  17. package/helpers/package.json +1 -1
  18. package/lib/cache.mjs +19 -5
  19. package/lib/configuration-strict.d.ts +190 -126
  20. package/lib/constants.mjs +1 -1
  21. package/lib/defer-require.cjs +16 -0
  22. package/lib/exports.d.mts +2 -0
  23. package/lib/exports.mjs +2 -0
  24. package/lib/markdownit.cjs +6 -13
  25. package/lib/markdownlint.d.mts +36 -2
  26. package/lib/markdownlint.mjs +314 -292
  27. package/lib/md025.mjs +23 -15
  28. package/lib/md027.mjs +11 -1
  29. package/lib/md036.mjs +12 -2
  30. package/lib/md038.mjs +52 -71
  31. package/lib/md039.mjs +3 -22
  32. package/lib/md041.mjs +54 -16
  33. package/lib/md043.mjs +2 -0
  34. package/lib/md045.mjs +3 -1
  35. package/lib/md051.mjs +13 -5
  36. package/lib/md052.mjs +2 -1
  37. package/lib/md059.mjs +71 -0
  38. package/lib/micromark-parse.mjs +14 -3
  39. package/lib/node-imports-browser.mjs +0 -2
  40. package/lib/node-imports-node.mjs +0 -3
  41. package/lib/parse-configuration.mjs +46 -0
  42. package/lib/resolve-module.cjs +52 -0
  43. package/lib/resolve-module.d.cts +34 -0
  44. package/lib/rules.mjs +3 -1
  45. package/package.json +30 -27
  46. package/schema/.markdownlint.jsonc +82 -60
  47. package/schema/.markdownlint.yaml +74 -56
  48. package/schema/markdownlint-config-schema-strict.json +259 -144
  49. package/schema/markdownlint-config-schema.json +259 -144
  50. package/lib/node-imports-browser-module.cjs +0 -7
@@ -0,0 +1,46 @@
1
+ // @ts-check
2
+
3
+ /**
4
+ * Result of a call to parseConfiguration.
5
+ *
6
+ * @typedef {Object} ParseConfigurationResult
7
+ * @property {Object | null} config Configuration object if successful.
8
+ * @property {string | null} message Error message if an error occurred.
9
+ */
10
+
11
+ /**
12
+ * Parse the content of a configuration file.
13
+ *
14
+ * @param {string} name Name of the configuration file.
15
+ * @param {string} content Configuration content.
16
+ * @param {import("./markdownlint.mjs").ConfigurationParser[]} [parsers] Parsing function(s).
17
+ * @returns {ParseConfigurationResult} Parse configuration result.
18
+ */
19
+ export default function parseConfiguration(name, content, parsers) {
20
+ let config = null;
21
+ let message = null;
22
+ const errors = [];
23
+ let index = 0;
24
+ // Try each parser
25
+ const failed = (parsers || [ JSON.parse ]).every((parser) => {
26
+ try {
27
+ const result = parser(content);
28
+ config = (result && (typeof result === "object") && !Array.isArray(result)) ? result : {};
29
+ // Succeeded
30
+ return false;
31
+ } catch (error) {
32
+ errors.push(`Parser ${index++}: ${error.message}`);
33
+ }
34
+ // Failed, try the next parser
35
+ return true;
36
+ });
37
+ // Message if unable to parse
38
+ if (failed) {
39
+ errors.unshift(`Unable to parse '${name}'`);
40
+ message = errors.join("; ");
41
+ }
42
+ return {
43
+ config,
44
+ message
45
+ };
46
+ }
@@ -0,0 +1,52 @@
1
+ // @ts-check
2
+
3
+ "use strict";
4
+
5
+ // @ts-ignore
6
+ // eslint-disable-next-line camelcase, no-inline-comments, no-undef
7
+ const nativeRequire = (typeof __non_webpack_require__ === "undefined") ? require : /* c8 ignore next */ __non_webpack_require__;
8
+ // Captures the native require implementation (even under webpack).
9
+
10
+ /**
11
+ * @typedef RequireResolveOptions
12
+ * @property {string[]} [paths] Additional paths to resolve from.
13
+ */
14
+
15
+ /**
16
+ * @callback RequireResolve
17
+ * @param {string} id Module name or path.
18
+ * @param {RequireResolveOptions} options Options to apply.
19
+ * @returns {string} Resolved module path.
20
+ */
21
+
22
+ /**
23
+ * Resolves modules according to Node's resolution rules.
24
+ *
25
+ * @param {RequireResolve} resolve Node-like require.resolve implementation.
26
+ * @param {string} id Module name or path.
27
+ * @param {string[]} [paths] Additional paths to resolve from.
28
+ * @returns {string} Resolved module path.
29
+ */
30
+ const resolveModuleCustomResolve = (resolve, id, paths = []) => {
31
+ // resolve.paths is sometimes not present under webpack or VS Code
32
+ // @ts-ignore
33
+ const resolvePaths = resolve.paths?.("") || [];
34
+ const allPaths = [ ...paths, ...resolvePaths ];
35
+ return resolve(id, { "paths": allPaths });
36
+ };
37
+
38
+ /**
39
+ * Resolves modules according to Node's resolution rules.
40
+ *
41
+ * @param {string} id Module name or path.
42
+ * @param {string[]} [paths] Additional paths to resolve from.
43
+ * @returns {string} Resolved module path.
44
+ */
45
+ const resolveModule = (id, paths) => (
46
+ resolveModuleCustomResolve(nativeRequire.resolve, id, paths)
47
+ );
48
+
49
+ module.exports = {
50
+ resolveModule,
51
+ resolveModuleCustomResolve
52
+ };
@@ -0,0 +1,34 @@
1
+ export type RequireResolveOptions = {
2
+ /**
3
+ * Additional paths to resolve from.
4
+ */
5
+ paths?: string[];
6
+ };
7
+ export type RequireResolve = (id: string, options: RequireResolveOptions) => string;
8
+ /**
9
+ * Resolves modules according to Node's resolution rules.
10
+ *
11
+ * @param {string} id Module name or path.
12
+ * @param {string[]} [paths] Additional paths to resolve from.
13
+ * @returns {string} Resolved module path.
14
+ */
15
+ export function resolveModule(id: string, paths?: string[]): string;
16
+ /**
17
+ * @typedef RequireResolveOptions
18
+ * @property {string[]} [paths] Additional paths to resolve from.
19
+ */
20
+ /**
21
+ * @callback RequireResolve
22
+ * @param {string} id Module name or path.
23
+ * @param {RequireResolveOptions} options Options to apply.
24
+ * @returns {string} Resolved module path.
25
+ */
26
+ /**
27
+ * Resolves modules according to Node's resolution rules.
28
+ *
29
+ * @param {RequireResolve} resolve Node-like require.resolve implementation.
30
+ * @param {string} id Module name or path.
31
+ * @param {string[]} [paths] Additional paths to resolve from.
32
+ * @returns {string} Resolved module path.
33
+ */
34
+ export function resolveModuleCustomResolve(resolve: RequireResolve, id: string, paths?: string[]): string;
package/lib/rules.mjs CHANGED
@@ -53,6 +53,7 @@ import md054 from "./md054.mjs";
53
53
  import md055 from "./md055.mjs";
54
54
  import md056 from "./md056.mjs";
55
55
  import md058 from "./md058.mjs";
56
+ import md059 from "./md059.mjs";
56
57
 
57
58
  const rules = [
58
59
  md001,
@@ -108,7 +109,8 @@ const rules = [
108
109
  md055,
109
110
  md056,
110
111
  // md057: See https://github.com/markdownlint/markdownlint
111
- md058
112
+ md058,
113
+ md059
112
114
  ];
113
115
  for (const rule of rules) {
114
116
  const name = rule.names[0].toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markdownlint",
3
- "version": "0.37.3",
3
+ "version": "0.38.0",
4
4
  "description": "A Node.js style checker and lint tool for Markdown/CommonMark files.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -36,11 +36,11 @@
36
36
  "build-config": "npm run build-config-schema && npm run build-config-example",
37
37
  "build-config-example": "node schema/build-config-example.mjs",
38
38
  "build-config-schema": "node schema/build-config-schema.mjs",
39
- "build-declaration": "tsc --allowJs --checkJs --declaration --emitDeclarationOnly --module nodenext --outDir dts --rootDir . --target es2015 lib/exports.mjs lib/exports-async.mjs lib/exports-promise.mjs lib/exports-sync.mjs lib/markdownlint.mjs && node scripts/index.mjs copy dts/lib/exports.d.mts lib/exports.d.mts && node scripts/index.mjs copy dts/lib/exports-async.d.mts lib/exports-async.d.mts && node scripts/index.mjs copy dts/lib/exports-promise.d.mts lib/exports-promise.d.mts && node scripts/index.mjs copy dts/lib/exports-sync.d.mts lib/exports-sync.d.mts && node scripts/index.mjs copy dts/lib/markdownlint.d.mts lib/markdownlint.d.mts && node scripts/index.mjs remove dts",
39
+ "build-declaration": "tsc --allowJs --checkJs --declaration --emitDeclarationOnly --module nodenext --outDir dts --rootDir . --target es2015 lib/exports.mjs lib/exports-async.mjs lib/exports-promise.mjs lib/exports-sync.mjs lib/markdownlint.mjs lib/resolve-module.cjs && node scripts/index.mjs copy dts/lib/exports.d.mts lib/exports.d.mts && node scripts/index.mjs copy dts/lib/exports-async.d.mts lib/exports-async.d.mts && node scripts/index.mjs copy dts/lib/exports-promise.d.mts lib/exports-promise.d.mts && node scripts/index.mjs copy dts/lib/exports-sync.d.mts lib/exports-sync.d.mts && node scripts/index.mjs copy dts/lib/markdownlint.d.mts lib/markdownlint.d.mts && node scripts/index.mjs copy dts/lib/resolve-module.d.cts lib/resolve-module.d.cts && node scripts/index.mjs remove dts",
40
40
  "build-demo": "node scripts/index.mjs copy node_modules/markdown-it/dist/markdown-it.min.js demo/markdown-it.min.js && cd demo && webpack --no-stats",
41
41
  "build-docs": "node doc-build/build-rules.mjs",
42
42
  "build-example": "npm install --no-save --ignore-scripts grunt grunt-cli gulp through2",
43
- "ci": "npm-run-all --continue-on-error --parallel lint serial-config-docs serial-declaration-demo test-cover && git diff --exit-code",
43
+ "ci": "npm-run-all --continue-on-error --parallel build-demo lint serial-config-docs serial-declaration test-cover && git diff --exit-code",
44
44
  "clone-test-repos-apache-airflow": "cd test-repos && git clone https://github.com/apache/airflow apache-airflow --depth 1 --no-tags --quiet",
45
45
  "clone-test-repos-dotnet-docs": "cd test-repos && git clone https://github.com/dotnet/docs dotnet-docs --depth 1 --no-tags --quiet",
46
46
  "clone-test-repos-electron-electron": "cd test-repos && git clone https://github.com/electron/electron electron-electron --depth 1 --no-tags --quiet && cd electron-electron && npm install --ignore-scripts @electron/lint-roller typescript@4",
@@ -58,56 +58,59 @@
58
58
  "lint": "eslint --max-warnings 0",
59
59
  "lint-test-repos": "ava --timeout=10m test/markdownlint-test-repos-*.mjs",
60
60
  "serial-config-docs": "npm run build-config && npm run build-docs",
61
- "serial-declaration-demo": "npm run build-declaration && npm-run-all --continue-on-error --parallel build-demo test-declaration",
62
- "test": "ava --timeout=30s test/markdownlint-test.mjs test/markdownlint-test-config.mjs test/markdownlint-test-custom-rules.mjs test/markdownlint-test-fixes.mjs test/markdownlint-test-helpers.mjs test/markdownlint-test-micromark.mjs test/markdownlint-test-result-object.mjs test/markdownlint-test-scenarios.mjs helpers/test.cjs",
61
+ "serial-declaration": "npm run build-declaration && npm run test-declaration",
62
+ "test": "ava --timeout=30s test/markdownlint-test.mjs test/markdownlint-test-config.mjs test/markdownlint-test-custom-rules.mjs test/markdownlint-test-exports.mjs test/markdownlint-test-fixes.mjs test/markdownlint-test-helpers.mjs test/markdownlint-test-micromark.mjs test/markdownlint-test-project.mjs test/markdownlint-test-result-object.mjs test/markdownlint-test-scenarios.mjs test/parse-configuration-test.mjs test/resolve-module-test.mjs helpers/test.cjs",
63
63
  "test-cover": "c8 --100 npm test",
64
- "test-declaration": "cd example/typescript && tsc --module commonjs && tsc --module nodenext && node type-check.js",
64
+ "test-declaration": "npm-run-all --continue-on-error --parallel test-declaration-cts test-declaration-mts",
65
+ "test-declaration-cts": "cd example/typescript && node ../../scripts/index.mjs copy type-check.ts type-check-commonjs.cts && tsc --module commonjs --esModuleInterop type-check-commonjs.cts",
66
+ "test-declaration-mts": "cd example/typescript && node ../../scripts/index.mjs copy type-check.ts type-check-nodenext.mts && tsc --module nodenext type-check-nodenext.mts && node type-check-nodenext.mjs",
65
67
  "test-extra": "ava --timeout=10m test/markdownlint-test-extra-parse.mjs test/markdownlint-test-extra-type.mjs",
66
- "update-snapshots": "ava --update-snapshots test/markdownlint-test-custom-rules.mjs test/markdownlint-test-micromark.mjs test/markdownlint-test-scenarios.mjs",
68
+ "update-snapshots": "ava --update-snapshots test/markdownlint-test-custom-rules.mjs test/markdownlint-test-exports.mjs test/markdownlint-test-micromark.mjs test/markdownlint-test-scenarios.mjs",
67
69
  "update-snapshots-test-repos": "ava --timeout=10m --update-snapshots test/markdownlint-test-repos-*.mjs",
70
+ "update-test-repos": "node scripts/index.mjs remove ./test-repos && npm run clone-test-repos && npm run update-snapshots-test-repos",
68
71
  "upgrade": "npx --yes npm-check-updates --upgrade"
69
72
  },
70
73
  "engines": {
71
- "node": ">=18"
74
+ "node": ">=20"
72
75
  },
73
76
  "dependencies": {
74
- "markdown-it": "14.1.0",
75
- "micromark": "4.0.1",
76
- "micromark-core-commonmark": "2.0.2",
77
- "micromark-extension-directive": "3.0.2",
77
+ "micromark": "4.0.2",
78
+ "micromark-core-commonmark": "2.0.3",
79
+ "micromark-extension-directive": "4.0.0",
78
80
  "micromark-extension-gfm-autolink-literal": "2.1.0",
79
81
  "micromark-extension-gfm-footnote": "2.1.0",
80
- "micromark-extension-gfm-table": "2.1.0",
82
+ "micromark-extension-gfm-table": "2.1.1",
81
83
  "micromark-extension-math": "3.1.0",
82
- "micromark-util-types": "2.0.1"
84
+ "micromark-util-types": "2.0.2"
83
85
  },
84
86
  "devDependencies": {
85
- "@eslint/js": "9.17.0",
86
- "@stylistic/eslint-plugin": "2.12.1",
87
+ "@eslint/js": "9.26.0",
88
+ "@stylistic/eslint-plugin": "4.2.0",
87
89
  "ajv": "8.17.1",
88
- "ava": "6.2.0",
90
+ "ava": "6.3.0",
89
91
  "c8": "10.1.3",
90
92
  "character-entities": "2.0.2",
91
- "eslint": "9.17.0",
92
- "eslint-plugin-jsdoc": "50.6.1",
93
- "eslint-plugin-n": "17.15.1",
93
+ "eslint": "9.26.0",
94
+ "eslint-plugin-jsdoc": "50.6.11",
95
+ "eslint-plugin-n": "17.17.0",
94
96
  "eslint-plugin-regexp": "2.7.0",
95
- "eslint-plugin-unicorn": "56.0.1",
97
+ "eslint-plugin-unicorn": "59.0.0",
96
98
  "gemoji": "8.1.0",
97
- "globby": "14.0.2",
99
+ "globby": "14.1.0",
98
100
  "js-yaml": "4.1.0",
99
- "json-schema-to-typescript": "15.0.3",
101
+ "json-schema-to-typescript": "15.0.4",
100
102
  "jsonc-parser": "3.3.1",
103
+ "markdown-it": "14.1.0",
101
104
  "markdown-it-for-inline": "2.0.1",
102
105
  "markdown-it-sub": "2.0.0",
103
106
  "markdown-it-sup": "2.0.0",
104
- "markdownlint-rule-extended-ascii": "0.1.0",
107
+ "markdownlint-rule-extended-ascii": "0.2.1",
105
108
  "nano-spawn": "0.2.0",
106
109
  "npm-run-all": "4.1.5",
107
- "terser-webpack-plugin": "5.3.11",
110
+ "terser-webpack-plugin": "5.3.14",
108
111
  "toml": "3.0.0",
109
- "typescript": "5.7.2",
110
- "webpack": "5.97.1",
112
+ "typescript": "5.8.3",
113
+ "webpack": "5.99.7",
111
114
  "webpack-cli": "6.0.1"
112
115
  },
113
116
  "keywords": [
@@ -7,25 +7,25 @@
7
7
  // Path to configuration file to extend
8
8
  "extends": null,
9
9
 
10
- // MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md001.md
10
+ // MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md001.md
11
11
  "MD001": true,
12
12
 
13
- // MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md003.md
13
+ // MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md003.md
14
14
  "MD003": {
15
15
  // Heading style
16
16
  "style": "consistent"
17
17
  },
18
18
 
19
- // MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md004.md
19
+ // MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md004.md
20
20
  "MD004": {
21
21
  // List style
22
22
  "style": "consistent"
23
23
  },
24
24
 
25
- // MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md005.md
25
+ // MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md005.md
26
26
  "MD005": true,
27
27
 
28
- // MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md007.md
28
+ // MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md007.md
29
29
  "MD007": {
30
30
  // Spaces for indent
31
31
  "indent": 2,
@@ -35,7 +35,7 @@
35
35
  "start_indent": 2
36
36
  },
37
37
 
38
- // MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md009.md
38
+ // MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md
39
39
  "MD009": {
40
40
  // Spaces for line break
41
41
  "br_spaces": 2,
@@ -45,7 +45,7 @@
45
45
  "strict": false
46
46
  },
47
47
 
48
- // MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md010.md
48
+ // MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md010.md
49
49
  "MD010": {
50
50
  // Include code blocks
51
51
  "code_blocks": true,
@@ -55,16 +55,16 @@
55
55
  "spaces_per_tab": 1
56
56
  },
57
57
 
58
- // MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md011.md
58
+ // MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md011.md
59
59
  "MD011": true,
60
60
 
61
- // MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md012.md
61
+ // MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
62
62
  "MD012": {
63
63
  // Consecutive blank lines
64
64
  "maximum": 1
65
65
  },
66
66
 
67
- // MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md013.md
67
+ // MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md013.md
68
68
  "MD013": {
69
69
  // Number of characters
70
70
  "line_length": 80,
@@ -84,22 +84,22 @@
84
84
  "stern": false
85
85
  },
86
86
 
87
- // MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md014.md
87
+ // MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md014.md
88
88
  "MD014": true,
89
89
 
90
- // MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md018.md
90
+ // MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md018.md
91
91
  "MD018": true,
92
92
 
93
- // MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md019.md
93
+ // MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md019.md
94
94
  "MD019": true,
95
95
 
96
- // MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md020.md
96
+ // MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md020.md
97
97
  "MD020": true,
98
98
 
99
- // MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md021.md
99
+ // MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md021.md
100
100
  "MD021": true,
101
101
 
102
- // MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md022.md
102
+ // MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md022.md
103
103
  "MD022": {
104
104
  // Blank lines above heading
105
105
  "lines_above": 1,
@@ -107,42 +107,45 @@
107
107
  "lines_below": 1
108
108
  },
109
109
 
110
- // MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md023.md
110
+ // MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md023.md
111
111
  "MD023": true,
112
112
 
113
- // MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md024.md
113
+ // MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md024.md
114
114
  "MD024": {
115
115
  // Only check sibling headings
116
116
  "siblings_only": false
117
117
  },
118
118
 
119
- // MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md025.md
119
+ // MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md025.md
120
120
  "MD025": {
121
- // Heading level
122
- "level": 1,
123
121
  // RegExp for matching title in front matter
124
- "front_matter_title": "^\\s*title\\s*[:=]"
122
+ "front_matter_title": "^\\s*title\\s*[:=]",
123
+ // Heading level
124
+ "level": 1
125
125
  },
126
126
 
127
- // MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md026.md
127
+ // MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md026.md
128
128
  "MD026": {
129
129
  // Punctuation characters
130
130
  "punctuation": ".,;:!。,;:!"
131
131
  },
132
132
 
133
- // MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md027.md
134
- "MD027": true,
133
+ // MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md027.md
134
+ "MD027": {
135
+ // Include list items
136
+ "list_items": true
137
+ },
135
138
 
136
- // MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md028.md
139
+ // MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md028.md
137
140
  "MD028": true,
138
141
 
139
- // MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md029.md
142
+ // MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md029.md
140
143
  "MD029": {
141
144
  // List style
142
145
  "style": "one_or_ordered"
143
146
  },
144
147
 
145
- // MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md030.md
148
+ // MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md030.md
146
149
  "MD030": {
147
150
  // Spaces for single-line unordered list items
148
151
  "ul_single": 1,
@@ -154,46 +157,46 @@
154
157
  "ol_multi": 1
155
158
  },
156
159
 
157
- // MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md031.md
160
+ // MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md
158
161
  "MD031": {
159
162
  // Include list items
160
163
  "list_items": true
161
164
  },
162
165
 
163
- // MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md032.md
166
+ // MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
164
167
  "MD032": true,
165
168
 
166
- // MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md033.md
169
+ // MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md033.md
167
170
  "MD033": {
168
171
  // Allowed elements
169
172
  "allowed_elements": []
170
173
  },
171
174
 
172
- // MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md034.md
175
+ // MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md034.md
173
176
  "MD034": true,
174
177
 
175
- // MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md035.md
178
+ // MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md035.md
176
179
  "MD035": {
177
180
  // Horizontal rule style
178
181
  "style": "consistent"
179
182
  },
180
183
 
181
- // MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md036.md
184
+ // MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md036.md
182
185
  "MD036": {
183
186
  // Punctuation characters
184
187
  "punctuation": ".,;:!?。,;:!?"
185
188
  },
186
189
 
187
- // MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md037.md
190
+ // MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md037.md
188
191
  "MD037": true,
189
192
 
190
- // MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md038.md
193
+ // MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md038.md
191
194
  "MD038": true,
192
195
 
193
- // MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md039.md
196
+ // MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md039.md
194
197
  "MD039": true,
195
198
 
196
- // MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md040.md
199
+ // MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md
197
200
  "MD040": {
198
201
  // List of languages
199
202
  "allowed_languages": [],
@@ -201,18 +204,20 @@
201
204
  "language_only": false
202
205
  },
203
206
 
204
- // MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md041.md
207
+ // MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md041.md
205
208
  "MD041": {
206
- // Heading level
207
- "level": 1,
209
+ // Allow content before first heading
210
+ "allow_preamble": false,
208
211
  // RegExp for matching title in front matter
209
- "front_matter_title": "^\\s*title\\s*[:=]"
212
+ "front_matter_title": "^\\s*title\\s*[:=]",
213
+ // Heading level
214
+ "level": 1
210
215
  },
211
216
 
212
- // MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md042.md
217
+ // MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md042.md
213
218
  "MD042": true,
214
219
 
215
- // MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md043.md
220
+ // MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md043.md
216
221
  "MD043": {
217
222
  // List of headings
218
223
  "headings": [],
@@ -220,7 +225,7 @@
220
225
  "match_case": false
221
226
  },
222
227
 
223
- // MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md044.md
228
+ // MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md044.md
224
229
  "MD044": {
225
230
  // List of proper names
226
231
  "names": [],
@@ -230,49 +235,55 @@
230
235
  "html_elements": true
231
236
  },
232
237
 
233
- // MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md045.md
238
+ // MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md045.md
234
239
  "MD045": true,
235
240
 
236
- // MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md046.md
241
+ // MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md046.md
237
242
  "MD046": {
238
243
  // Block style
239
244
  "style": "consistent"
240
245
  },
241
246
 
242
- // MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md047.md
247
+ // MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md047.md
243
248
  "MD047": true,
244
249
 
245
- // MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md048.md
250
+ // MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md048.md
246
251
  "MD048": {
247
252
  // Code fence style
248
253
  "style": "consistent"
249
254
  },
250
255
 
251
- // MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md049.md
256
+ // MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md049.md
252
257
  "MD049": {
253
258
  // Emphasis style
254
259
  "style": "consistent"
255
260
  },
256
261
 
257
- // MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md050.md
262
+ // MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md050.md
258
263
  "MD050": {
259
264
  // Strong style
260
265
  "style": "consistent"
261
266
  },
262
267
 
263
- // MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md051.md
268
+ // MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md051.md
264
269
  "MD051": {
265
270
  // Ignore case of fragments
266
- "ignore_case": false
271
+ "ignore_case": false,
272
+ // Pattern for ignoring additional fragments
273
+ "ignored_pattern": ""
267
274
  },
268
275
 
269
- // MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md052.md
276
+ // MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md052.md
270
277
  "MD052": {
278
+ // Ignored link labels
279
+ "ignored_labels": [
280
+ "x"
281
+ ],
271
282
  // Include shortcut syntax
272
283
  "shortcut_syntax": false
273
284
  },
274
285
 
275
- // MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md053.md
286
+ // MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md053.md
276
287
  "MD053": {
277
288
  // Ignored definitions
278
289
  "ignored_definitions": [
@@ -280,7 +291,7 @@
280
291
  ]
281
292
  },
282
293
 
283
- // MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md054.md
294
+ // MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md054.md
284
295
  "MD054": {
285
296
  // Allow autolinks
286
297
  "autolink": true,
@@ -296,15 +307,26 @@
296
307
  "url_inline": true
297
308
  },
298
309
 
299
- // MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md055.md
310
+ // MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md055.md
300
311
  "MD055": {
301
312
  // Table pipe style
302
313
  "style": "consistent"
303
314
  },
304
315
 
305
- // MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md056.md
316
+ // MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md056.md
306
317
  "MD056": true,
307
318
 
308
- // MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md058.md
309
- "MD058": true
319
+ // MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md058.md
320
+ "MD058": true,
321
+
322
+ // MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md059.md
323
+ "MD059": {
324
+ // Prohibited link texts
325
+ "prohibited_texts": [
326
+ "click here",
327
+ "here",
328
+ "link",
329
+ "more"
330
+ ]
331
+ }
310
332
  }