Skip to content

Commit 3436417

Browse files
committed
Switched markdownlint config to stable MD rule IDs
1 parent 11f986f commit 3436417

File tree

2 files changed

+43
-155
lines changed

2 files changed

+43
-155
lines changed

linters/.markdownlint.json

Lines changed: 40 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,42 @@
11
{
2-
"comment": "Be explicit by listing every available rule. https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md",
3-
"comment": "Note that there will be numeric gaps, not every MD number is implemented in markdownlint.",
4-
5-
"comment": "MD001: Header levels should only increment by one level at a time.",
6-
"header-increment": true,
7-
8-
"comment": "MD002: First header should be a top level header.",
9-
"first-header-h1": true,
10-
11-
"comment": "MD003: Header style: start with hashes.",
12-
"header-style": {
13-
"style": "atx"
14-
},
15-
16-
"comment": "MD004: Unordered list style",
17-
"ul-style": {
18-
"style": "dash"
19-
},
20-
21-
"comment": "MD005: Consistent indentation for list items at the same level.",
22-
"list-indent": true,
23-
24-
"comment": "MD006: Consider starting bulleted lists at the beginning of the line.",
25-
"ul-start-left": false,
26-
27-
"comment": "MD007: Unordered list indentation: 2 spaces.",
28-
"ul-indent": {
29-
"indent": 2,
30-
"start_indented": true
31-
},
32-
33-
"comment": "MD009: Disallow trailing spaces!",
34-
"no-trailing-spaces": {
35-
"br_spaces": 0,
36-
"comment": "Empty lines inside list items should not be indented.",
37-
"list_item_empty_lines": false
38-
},
39-
40-
"comment": "MD010: No hard tabs, not even in code blocks.",
41-
"no-hard-tabs": {
42-
"code_blocks": true
43-
},
44-
45-
"comment": "MD011: Prevent reversed link syntax",
46-
"no-reversed-links": true,
47-
48-
"comment": "MD012: Disallow multiple consecutive blank lines.",
49-
"no-multiple-blanks": {
50-
"maximum": 1
51-
},
52-
53-
"comment": "MD013: Line length",
54-
"line-length": false,
55-
56-
"comment": "MD014: Disallow use of dollar signs($) before commands without showing output.",
57-
"commands-show-output": true,
58-
59-
"comment": "MD018: Disallow space after hash on atx style header.",
60-
"no-missing-space-atx": true,
61-
62-
"comment": "MD019: Disallow multiple spaces after hash on atx style header.",
63-
"no-multiple-space-atx": true,
64-
65-
"comment": "MD020: No space should be inside hashes on closed atx style header.",
66-
"no-missing-space-closed-atx": true,
67-
68-
"comment": "MD021: Disallow multiple spaces inside hashes on closed atx style header.",
69-
"no-multiple-space-closed-atx": true,
70-
71-
"comment": "MD022: Headers should be surrounded by blank lines.",
72-
"comment": "Some headers have preceding HTML anchors. Unfortunate that we have to disable this, as it otherwise catches a real problem that trips up some Markdown renderers",
73-
"blanks-around-headers": false,
74-
75-
"comment": "MD023: Headers must start at the beginning of the line.",
76-
"header-start-left": true,
77-
78-
"comment": "MD024: Disallow multiple headers with the same content.",
79-
"no-duplicate-header": true,
80-
81-
"comment": "MD025: Disallow multiple top level headers in the same document.",
82-
"comment": "Gotta have a matching closing brace at the end.",
83-
"single-h1": false,
84-
85-
"comment": "MD026: Disallow trailing punctuation in header.",
86-
"comment": "You must have a semicolon after the ending closing brace.",
87-
"no-trailing-punctuation": {
88-
"punctuation" : ".,:!?"
89-
},
90-
"comment": "MD027: Dissalow multiple spaces after blockquote symbol",
91-
"no-multiple-space-blockquote": true,
92-
93-
"comment": "MD028: Blank line inside blockquote",
94-
"comment": "Some 'Why?' and 'Why not?' blocks are separated by a blank line",
95-
"no-blanks-blockquote": false,
96-
97-
"comment": "MD029: Ordered list item prefix",
98-
"ol-prefix": {
99-
"style": "one"
100-
},
101-
102-
"comment": "MD030: Spaces after list markers",
103-
"list-marker-space": {
104-
"ul_single": 1,
105-
"ol_single": 1,
106-
"ul_multi": 1,
107-
"ol_multi": 1
108-
},
109-
110-
"comment": "MD031: Fenced code blocks should be surrounded by blank lines",
111-
"blanks-around-fences": true,
112-
113-
"comment": "MD032: Lists should be surrounded by blank lines",
114-
"comment": "Some lists have preceding HTML anchors. Unfortunate that we have to disable this, as it otherwise catches a real problem that trips up some Markdown renderers",
115-
"blanks-around-lists": false,
116-
117-
"comment": "MD033: Disallow inline HTML",
118-
"comment": "HTML is needed for explicit anchors",
119-
"no-inline-html": false,
120-
121-
"comment": "MD034: No bare URLs should be used",
122-
"no-bare-urls": true,
123-
124-
"comment": "MD035: Horizontal rule style",
125-
"hr-style": {
126-
"style": "consistent"
127-
},
128-
129-
"comment": "MD036: Do not use emphasis instead of a header.",
130-
"no-emphasis-as-header": false,
131-
132-
"comment": "MD037: Disallow spaces inside emphasis markers.",
133-
"no-space-in-emphasis": true,
134-
135-
"comment": "MD038: Disallow spaces inside code span elements.",
136-
"no-space-in-code": true,
137-
138-
"comment": "MD039: Disallow spaces inside link text.",
139-
"no-space-in-links": true,
140-
141-
"comment": "MD040: Fenced code blocks should have a language specified.",
142-
"fenced-code-language": true,
143-
144-
"comment": "MD041: First line in file should be a top level header.",
145-
"first-line-h1": true,
146-
147-
"comment": "MD042: No empty links",
148-
"no-empty-links": true,
149-
150-
"comment": "MD043: Required header structure.",
151-
"required-headers": false,
152-
153-
"comment": "MD044: Proper names should have the correct capitalization.",
154-
"proper-names": false
2+
"MD001": true,
3+
"MD002": true,
4+
"MD003": { "style": "atx" },
5+
"MD004": { "style": "dash" },
6+
"MD005": true,
7+
"MD006": false,
8+
"MD007": { "indent": 2, "start_indented": true },
9+
"MD009": { "br_spaces": 0, "list_item_empty_lines": false },
10+
"MD010": { "code_blocks": true },
11+
"MD011": true,
12+
"MD012": { "maximum": 1 },
13+
"MD013": false,
14+
"MD014": true,
15+
"MD018": true,
16+
"MD019": true,
17+
"MD020": true,
18+
"MD021": true,
19+
"MD022": false,
20+
"MD023": true,
21+
"MD024": true,
22+
"MD025": false,
23+
"MD026": { "punctuation": ".,:!?" },
24+
"MD027": true,
25+
"MD028": false,
26+
"MD029": { "style": "one" },
27+
"MD030": { "ul_single": 1, "ol_single": 1, "ul_multi": 1, "ol_multi": 1 },
28+
"MD031": true,
29+
"MD032": false,
30+
"MD033": false,
31+
"MD034": true,
32+
"MD035": { "style": "consistent" },
33+
"MD036": false,
34+
"MD037": true,
35+
"MD038": true,
36+
"MD039": true,
37+
"MD040": true,
38+
"MD041": true,
39+
"MD042": true,
40+
"MD043": false,
41+
"MD044": false
15542
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "A mostly reasonable approach to JavaScript.",
55
"scripts": {
66
"preinstall": "npm run install:config && npm run install:config:base",
7-
"postinstall": "rm -rf node_modules/markdownlint-cli/node_modules/markdownlint",
7+
"postinstall": "rimraf node_modules/markdownlint-cli/node_modules/markdownlint",
88
"install:config": "cd packages/eslint-config-airbnb && npm prune && npm install",
99
"install:config:base": "cd packages/eslint-config-airbnb-base && npm prune && npm install",
1010
"lint": "markdownlint --config linters/.markdownlint.json README.md */README.md",
@@ -41,6 +41,7 @@
4141
"homepage": "https://github.com/airbnb/javascript",
4242
"devDependencies": {
4343
"markdownlint": "^0.29.0",
44-
"markdownlint-cli": "^0.35.0"
44+
"markdownlint-cli": "^0.35.0",
45+
"rimraf": "^5.0.5"
4546
}
4647
}

0 commit comments

Comments
 (0)