Skip to content

Commit 4485655

Browse files
committed
add reviewed custom rules
1 parent bd4a412 commit 4485655

File tree

2 files changed

+41
-42
lines changed

2 files changed

+41
-42
lines changed

.markdownlint-cli2.jsonc

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"config": {
3-
"extends": "./.markdownlint.jsonc"
4-
},
5-
"globs": [
6-
"**/*.md"
7-
],
8-
"customRules": ["markdownlint-rule-search-replace"],
9-
"ignores": ["node_modules", ".git", ".github", "src", "Crackmes", "Samples", "docs/contributing/5_Style_Guide.md", "venv", "playground"],
10-
"gitignore": true
11-
}
2+
"config": {
3+
"extends": "./.markdownlint.jsonc"
4+
},
5+
"globs": [
6+
"**/*.md"
7+
],
8+
"customRules": ["markdownlint-rule-search-replace"],
9+
"ignores": ["node_modules", ".git", ".github", "src", "Crackmes", "Samples", "docs/contributing/5_Style_Guide.md", "venv", "playground"],
10+
"gitignore": true
11+
}

.markdownlint.jsonc

+31-32
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,29 @@
1515
"MD046": false, // code-block-style (unsupported admonitions)
1616
"MD049": {"style": "underscore"}, // emphasis-style
1717
"MD050": {"style": "asterisk"}, // strong-style
18-
"MD055": {"style": "leading_and_trailing"} // table-pipe-style
18+
"MD055": {"style": "leading_and_trailing"}, // table-pipe-style
1919
"search-replace": {
2020
"rules": [
21-
// {
22-
// "name": "ellipsis",
23-
// "message": "Do not use three dots '...' for ellipsis.",
24-
// "information": "https://example.com/rules/ellipsis",
25-
// "search": "...",
26-
// "replace": "…",
27-
// "searchScope": "text"
28-
// },
2921
{
3022
"name": "curly-double-quotes",
3123
"message": "Do not use curly double quotes.",
3224
"searchPattern": "/“|”/g",
33-
"replace": "\""
25+
"replace": "\"",
26+
"searchScope": "text"
27+
},
28+
{
29+
"name": "nbsp",
30+
"message": "Don't use no-break spaces",
31+
"searchPattern": "/ /g",
32+
"replace": " ",
33+
"searchScope": "all"
34+
},
35+
{
36+
"name": "curly-single-quotes",
37+
"message": "Don't use curly single quotes",
38+
"searchPattern": "/‘|’/g",
39+
"replace": "'",
40+
"searchScope": "text"
3441
},
3542
{
3643
"name": "gender-neutrality",
@@ -39,12 +46,19 @@
3946
"replace": ""
4047
},
4148
{
42-
"name": "bad-spellings",
43-
"message": "Incorrect spelling",
44-
"search": ["e-mail", "wtf", "web site"],
45-
"replace": ["email", null, "website"],
46-
"searchScope": "all"
47-
}
49+
"name": "trailing-spaces",
50+
"message": "Avoid trailing spaces",
51+
"searchPattern": "/ +$/gm",
52+
"replace": "",
53+
"searchScope": "all",
54+
},
55+
{
56+
"name": "double-spaces",
57+
"message": "Avoid double spaces",
58+
"searchPattern": "/([^\\s>]) ([^\\s|])/g",
59+
"replace": "$1 $2",
60+
"searchScope": "text"
61+
},
4862
// {
4963
// "name": "correct-noun-forms",
5064
// "message": "Use the correct form for specific terms.",
@@ -105,7 +119,7 @@
105119
// "white box"
106120
// ],
107121
// "searchScope": "text"
108-
// }
122+
// },
109123
// {
110124
// "name": "contractions",
111125
// "message": "Use contractions where appropriate",
@@ -155,21 +169,6 @@
155169
// ],
156170
// "searchScope": "text"
157171
// },
158-
// {
159-
// "name": "file-format-extensions",
160-
// "message": "File formats for APK, IPA, or ZIP must not be written as '.apk', '.ipa' or '.zip' unless referring to the file extension.",
161-
// "searchPattern": "/\\.(apk|ipa|zip)/g",
162-
// "replace": null,
163-
// "searchScope": "text"
164-
// },
165-
// {
166-
// "name": "android-version-format",
167-
// "message": "Use the format 'Android X (API level YY)' when referring to Android versions. Usage of the descriptive name or just the version number is not allowed.",
168-
// "searchPattern": "/\\bAndroid\\s+((1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20)(?!\\s*\\(API\\s*level\\s*\\d+\\))|Cupcake|Donut|Eclair|Froyo|Gingerbread|Honeycomb|Ice Cream Sandwich|Jelly Bean|KitKat|Lollipop|Marshmallow|Nougat|Oreo|Pie|Q|R|S|Tiramisu)/g",
169-
// "replace": null,
170-
// "searchScope": "text"
171-
// }
172-
173172
]
174173
}
175174
}

0 commit comments

Comments
 (0)