|
15 | 15 | "MD046": false, // code-block-style (unsupported admonitions)
|
16 | 16 | "MD049": {"style": "underscore"}, // emphasis-style
|
17 | 17 | "MD050": {"style": "asterisk"}, // strong-style
|
18 |
| - "MD055": {"style": "leading_and_trailing"} // table-pipe-style |
| 18 | + "MD055": {"style": "leading_and_trailing"}, // table-pipe-style |
19 | 19 | "search-replace": {
|
20 | 20 | "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 |
| - // }, |
29 | 21 | {
|
30 | 22 | "name": "curly-double-quotes",
|
31 | 23 | "message": "Do not use curly double quotes.",
|
32 | 24 | "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" |
34 | 41 | },
|
35 | 42 | {
|
36 | 43 | "name": "gender-neutrality",
|
|
39 | 46 | "replace": ""
|
40 | 47 | },
|
41 | 48 | {
|
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 | + }, |
48 | 62 | // {
|
49 | 63 | // "name": "correct-noun-forms",
|
50 | 64 | // "message": "Use the correct form for specific terms.",
|
|
105 | 119 | // "white box"
|
106 | 120 | // ],
|
107 | 121 | // "searchScope": "text"
|
108 |
| - // } |
| 122 | + // }, |
109 | 123 | // {
|
110 | 124 | // "name": "contractions",
|
111 | 125 | // "message": "Use contractions where appropriate",
|
|
155 | 169 | // ],
|
156 | 170 | // "searchScope": "text"
|
157 | 171 | // },
|
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 |
| - |
173 | 172 | ]
|
174 | 173 | }
|
175 | 174 | }
|
0 commit comments