|
7 | 7 | "language": "en-US", |
8 | 8 | "dictionaryDefinitions": [ |
9 | 9 | { |
| 10 | + // Allowed words |
10 | 11 | "name": "main-list", |
11 | 12 | "path": "resources/dictionaries/custom.txt", |
12 | 13 | "addWords": true, |
13 | 14 | }, |
14 | 15 | { |
| 16 | + // Banned words with no clear or correct replacements |
| 17 | + // For a few words with those, see the flagWords property later in this file |
15 | 18 | "name": "deny-list", |
16 | 19 | "path": "resources/dictionaries/ban.txt" |
17 | 20 | }, |
| 21 | + { |
| 22 | + "name": "2lw-deny-list", |
| 23 | + "path": "resources/dictionaries/two-letter-words-ban.txt" |
| 24 | + }, |
18 | 25 | { |
19 | 26 | "name": "tvm-instructions", |
20 | 27 | "path": "resources/dictionaries/tvm-instructions.txt" |
|
23 | 30 | "dictionaries": [ |
24 | 31 | "main-list", |
25 | 32 | "deny-list", |
| 33 | + "2lw-deny-list", |
26 | 34 | "tvm-instructions", |
27 | 35 | ], |
28 | 36 | "useGitignore": true, |
29 | 37 | "files": [ |
30 | 38 | "**/*.{md,mdx}", |
31 | | - "**/*.{js,jsx}", |
| 39 | + "**/*.{js,jsx,mjs}", |
32 | 40 | ], |
33 | 41 | "minWordLength": 3, |
34 | 42 | "overrides": [ |
35 | 43 | // Enable case sensitivity for Markdown and MDX files only |
36 | 44 | { |
37 | 45 | "filename": "**/*.{md,mdx}", |
38 | | - "caseSensitive": true |
| 46 | + "caseSensitive": true, |
| 47 | + // Known incorrect spellings and correct suggestions |
| 48 | + "flagWords": [ |
| 49 | + "AccountChain->accountchain", |
| 50 | + "BaseChain->basechain", |
| 51 | + "boc->BoC", |
| 52 | + "BOC->BoC", |
| 53 | + "Github->GitHub", |
| 54 | + "MasterChain->masterchain", |
| 55 | + "ShardChain->shardchain", |
| 56 | + "Toncenter->TON Center", |
| 57 | + "toncoins->Toncoin", |
| 58 | + "Toncoins->Toncoin", |
| 59 | + "WorkChain->workchain", |
| 60 | + ], |
39 | 61 | }, |
40 | | - // Do not check for banned words (denylist) in certain files |
| 62 | + // Do not check for banned words (denylists or flagWords) in certain files |
41 | 63 | { |
42 | 64 | "filename": "contribute/style-guide*.mdx", |
43 | 65 | "ignoreWords": [ |
44 | 66 | "tos", |
45 | 67 | "DOI", |
| 68 | + "boc", |
46 | 69 | "BOC", |
47 | 70 | ], |
| 71 | + "ignoreRegExpList": [ |
| 72 | + "\\b[tT]on[a-zA-Z]+\\b", // ton or Ton-prefixed words |
| 73 | + "\\b[a-zA-Z]+Chain\\b", // Chain-suffixed words |
| 74 | + ], |
48 | 75 | "dictionaries": [ |
49 | | - "!deny-list" |
| 76 | + "!deny-list", // turns off the dictionary |
| 77 | + "!2lw-deny-list", // turns off the dictionary |
50 | 78 | ] |
51 | 79 | }, |
52 | 80 | { |
53 | | - "filename": "**/api/**/v*", |
| 81 | + "filename": "**/api/**/*.{json,yml,yaml}", |
| 82 | + "ignoreWords": [ |
| 83 | + "smc", |
| 84 | + ], |
54 | 85 | "dictionaries": [ |
55 | | - "!deny-list" |
| 86 | + "!deny-list", // turns off the dictionary |
| 87 | + "!2lw-deny-list", // turns off the dictionary |
56 | 88 | ] |
57 | 89 | }, |
| 90 | + { |
| 91 | + "filename": "**/*.{js,jsx,mjs}", |
| 92 | + "ignoreWords": [ |
| 93 | + "Dests", |
| 94 | + ], |
| 95 | + "dictionaries": [ |
| 96 | + "!deny-list", // turns off the dictionary |
| 97 | + "!2lw-deny-list", // turns off the dictionary |
| 98 | + ] |
| 99 | + } |
58 | 100 | ], |
59 | 101 | "ignorePaths": [ |
60 | 102 | // Some whitepapers |
61 | 103 | "foundations/whitepapers/tblkch.mdx", |
62 | 104 | "foundations/whitepapers/ton.mdx", |
| 105 | + "foundations/whitepapers/tvm.mdx", |
| 106 | + "languages/fift/whitepaper.mdx", |
63 | 107 | // Generated files |
64 | 108 | "tvm/instructions.mdx", |
65 | 109 | // Binaries |
|
80 | 124 | "**/*.svg", |
81 | 125 | "**/*.txt", |
82 | 126 | "CODEOWNERS", |
| 127 | + "LICENSE-*", |
83 | 128 | "snippets/tvm-instruction-table.jsx", |
84 | 129 | ], |
85 | 130 | "ignoreRegExpList": [ |
|
110 | 155 | "=\\s*\".*?\"", // ="..." |
111 | 156 | "(?<!\\\\)\\$(?:\\\\.|[^$\\\\])*?\\$", // inline math |
112 | 157 | "/(?<!\\\\)\\$\\$[\\s\\S]*?\\$\\$/g", // block math |
| 158 | + "(?<!\\\\)``.*?``", // inline code with double backticks |
113 | 159 | "(?<!\\\\)`.*?`", // inline code |
114 | 160 | "/^([ \\t]*```).*([\\s\\S]*?)^\\1$/gmx", // block code |
115 | 161 | "^import[ \\t].+$", // import ... |
116 | 162 | "/^export[ \\t].+?(?=\\r?\\n\\r?\\n)/gms", // export ... |
117 | 163 | "(?<!\\\\)\\{(?:[^{}]|\\{(?:[^{}]|\\{[^{}]*\\})*\\})*\\}", // jsx expressions in {} |
118 | | - "/\\bton-?[a-z]+/gi", // ton-prefixed product names |
119 | 164 | ], |
120 | 165 | } |
0 commit comments