@redocly/recheck 0.14.0 → 2.58.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 (1034) hide show
  1. package/README.md +71 -1869
  2. package/examples/appendices/google.appendix.yaml +1 -1
  3. package/examples/appendices/inclusive-language.appendix.yaml +1 -1
  4. package/examples/appendices/microsoft.appendix.yaml +1 -1
  5. package/examples/appendices/plain-language.appendix.yaml +1 -1
  6. package/examples/appendices/technical-english.appendix.yaml +1 -1
  7. package/examples/google.yaml +7 -7
  8. package/examples/inclusive-language.yaml +7 -7
  9. package/examples/microsoft.yaml +7 -7
  10. package/examples/plain-language.yaml +7 -7
  11. package/examples/technical-english.yaml +7 -7
  12. package/lib/actions/baseline.d.ts +15 -0
  13. package/lib/actions/baseline.d.ts.map +1 -0
  14. package/lib/actions/baseline.js +51 -0
  15. package/lib/actions/baseline.js.map +1 -0
  16. package/lib/actions/lint.d.ts +51 -0
  17. package/lib/actions/lint.d.ts.map +1 -0
  18. package/lib/actions/lint.js +123 -0
  19. package/lib/actions/lint.js.map +1 -0
  20. package/lib/actions/markdoc-schema.d.ts +34 -0
  21. package/lib/actions/markdoc-schema.d.ts.map +1 -0
  22. package/lib/actions/markdoc-schema.js +106 -0
  23. package/lib/actions/markdoc-schema.js.map +1 -0
  24. package/lib/actions/readability.d.ts +25 -0
  25. package/lib/actions/readability.d.ts.map +1 -0
  26. package/lib/actions/readability.js +47 -0
  27. package/lib/actions/readability.js.map +1 -0
  28. package/lib/actions/roots.d.ts +7 -0
  29. package/lib/actions/roots.d.ts.map +1 -0
  30. package/lib/actions/roots.js +36 -0
  31. package/lib/actions/roots.js.map +1 -0
  32. package/lib/config/presets/api-descriptions.d.ts +8 -0
  33. package/lib/config/presets/api-descriptions.d.ts.map +1 -0
  34. package/lib/config/presets/api-descriptions.js +24 -0
  35. package/lib/config/presets/api-descriptions.js.map +1 -0
  36. package/lib/config/presets/google.d.ts +3 -0
  37. package/lib/config/presets/google.d.ts.map +1 -0
  38. package/lib/config/presets/google.js +1086 -0
  39. package/lib/config/presets/google.js.map +1 -0
  40. package/lib/config/presets/inclusive-language.d.ts +3 -0
  41. package/lib/config/presets/inclusive-language.d.ts.map +1 -0
  42. package/lib/config/presets/inclusive-language.js +151 -0
  43. package/lib/config/presets/inclusive-language.js.map +1 -0
  44. package/lib/config/presets/index.d.ts +16 -0
  45. package/lib/config/presets/index.d.ts.map +1 -0
  46. package/lib/config/presets/index.js +38 -0
  47. package/lib/config/presets/index.js.map +1 -0
  48. package/lib/config/presets/markdoc.d.ts +3 -0
  49. package/lib/config/presets/markdoc.d.ts.map +1 -0
  50. package/lib/config/presets/markdoc.js +45 -0
  51. package/lib/config/presets/markdoc.js.map +1 -0
  52. package/lib/config/presets/markdown-relaxed.d.ts +3 -0
  53. package/lib/config/presets/markdown-relaxed.d.ts.map +1 -0
  54. package/lib/config/presets/markdown-relaxed.js +34 -0
  55. package/lib/config/presets/markdown-relaxed.js.map +1 -0
  56. package/lib/config/presets/markdown.d.ts +11 -0
  57. package/lib/config/presets/markdown.d.ts.map +1 -0
  58. package/lib/config/presets/markdown.js +73 -0
  59. package/lib/config/presets/markdown.js.map +1 -0
  60. package/lib/config/presets/microsoft.d.ts +3 -0
  61. package/lib/config/presets/microsoft.d.ts.map +1 -0
  62. package/lib/config/presets/microsoft.js +1260 -0
  63. package/lib/config/presets/microsoft.js.map +1 -0
  64. package/lib/config/presets/minimal.d.ts +3 -0
  65. package/lib/config/presets/minimal.d.ts.map +1 -0
  66. package/lib/config/presets/minimal.js +13 -0
  67. package/lib/config/presets/minimal.js.map +1 -0
  68. package/lib/config/presets/plain-language.d.ts +3 -0
  69. package/lib/config/presets/plain-language.d.ts.map +1 -0
  70. package/lib/config/presets/plain-language.js +175 -0
  71. package/lib/config/presets/plain-language.js.map +1 -0
  72. package/lib/config/presets/prose.d.ts +3 -0
  73. package/lib/config/presets/prose.d.ts.map +1 -0
  74. package/lib/config/presets/prose.js +60 -0
  75. package/lib/config/presets/prose.js.map +1 -0
  76. package/lib/config/presets/technical-english.d.ts +22 -0
  77. package/lib/config/presets/technical-english.d.ts.map +1 -0
  78. package/lib/config/presets/technical-english.js +61 -0
  79. package/lib/config/presets/technical-english.js.map +1 -0
  80. package/lib/config/resolve.d.ts +36 -0
  81. package/lib/config/resolve.d.ts.map +1 -0
  82. package/lib/config/resolve.js +106 -0
  83. package/lib/config/resolve.js.map +1 -0
  84. package/lib/config/schema.d.ts +215 -0
  85. package/lib/config/schema.d.ts.map +1 -0
  86. package/lib/config/schema.js +152 -0
  87. package/lib/config/schema.js.map +1 -0
  88. package/lib/config/validate.d.ts +19 -0
  89. package/lib/config/validate.d.ts.map +1 -0
  90. package/lib/config/validate.js +1049 -0
  91. package/lib/config/validate.js.map +1 -0
  92. package/lib/core/auto-fix.d.ts.map +1 -0
  93. package/lib/core/auto-fix.js +94 -0
  94. package/lib/core/auto-fix.js.map +1 -0
  95. package/lib/core/baseline.d.ts +43 -0
  96. package/lib/core/baseline.d.ts.map +1 -0
  97. package/lib/core/baseline.js +142 -0
  98. package/lib/core/baseline.js.map +1 -0
  99. package/lib/core/case-preserve.d.ts +11 -0
  100. package/lib/core/case-preserve.d.ts.map +1 -0
  101. package/lib/core/case-preserve.js +22 -0
  102. package/lib/core/case-preserve.js.map +1 -0
  103. package/lib/core/directives.d.ts.map +1 -0
  104. package/lib/core/directives.js +66 -0
  105. package/lib/core/directives.js.map +1 -0
  106. package/lib/core/files.d.ts +31 -0
  107. package/lib/core/files.d.ts.map +1 -0
  108. package/lib/core/files.js +184 -0
  109. package/lib/core/files.js.map +1 -0
  110. package/lib/core/inline-code.d.ts +33 -0
  111. package/lib/core/inline-code.d.ts.map +1 -0
  112. package/lib/core/inline-code.js +50 -0
  113. package/lib/core/inline-code.js.map +1 -0
  114. package/lib/core/line-endings.d.ts +13 -0
  115. package/lib/core/line-endings.d.ts.map +1 -0
  116. package/lib/core/line-endings.js +39 -0
  117. package/lib/core/line-endings.js.map +1 -0
  118. package/lib/core/markdoc-tags.d.ts +48 -0
  119. package/lib/core/markdoc-tags.d.ts.map +1 -0
  120. package/lib/core/markdoc-tags.js +102 -0
  121. package/lib/core/markdoc-tags.js.map +1 -0
  122. package/lib/core/prose-extract.d.ts +6 -0
  123. package/lib/core/prose-extract.d.ts.map +1 -0
  124. package/lib/core/prose-extract.js +71 -0
  125. package/lib/core/prose-extract.js.map +1 -0
  126. package/lib/core/readability.d.ts +17 -0
  127. package/lib/core/readability.d.ts.map +1 -0
  128. package/lib/core/readability.js +34 -0
  129. package/lib/core/readability.js.map +1 -0
  130. package/lib/core/rule-filters.d.ts +29 -0
  131. package/lib/core/rule-filters.d.ts.map +1 -0
  132. package/lib/core/rule-filters.js +88 -0
  133. package/lib/core/rule-filters.js.map +1 -0
  134. package/lib/core/runner.d.ts +60 -0
  135. package/lib/core/runner.d.ts.map +1 -0
  136. package/lib/core/runner.js +305 -0
  137. package/lib/core/runner.js.map +1 -0
  138. package/lib/core/summary.d.ts +4 -0
  139. package/lib/core/summary.d.ts.map +1 -0
  140. package/lib/core/summary.js +37 -0
  141. package/lib/core/summary.js.map +1 -0
  142. package/lib/core/timing.d.ts +9 -0
  143. package/lib/core/timing.d.ts.map +1 -0
  144. package/lib/core/timing.js +19 -0
  145. package/lib/core/timing.js.map +1 -0
  146. package/lib/data/markdoc-realm-schema.d.ts.map +1 -0
  147. package/lib/data/markdoc-realm-schema.js +782 -0
  148. package/lib/data/markdoc-realm-schema.js.map +1 -0
  149. package/lib/data/proper-nouns.d.ts.map +1 -0
  150. package/lib/data/proper-nouns.js +42 -0
  151. package/lib/data/proper-nouns.js.map +1 -0
  152. package/lib/data/realm-front-matter-schema.d.ts +12 -0
  153. package/lib/data/realm-front-matter-schema.d.ts.map +1 -0
  154. package/lib/data/realm-front-matter-schema.js +51 -0
  155. package/lib/data/realm-front-matter-schema.js.map +1 -0
  156. package/lib/index.d.ts +81 -0
  157. package/lib/index.d.ts.map +1 -0
  158. package/lib/index.js +114 -0
  159. package/lib/index.js.map +1 -0
  160. package/lib/metrics/formulas.d.ts +9 -0
  161. package/lib/metrics/formulas.d.ts.map +1 -0
  162. package/lib/metrics/formulas.js +59 -0
  163. package/lib/metrics/formulas.js.map +1 -0
  164. package/lib/metrics/statistics.d.ts +14 -0
  165. package/lib/metrics/statistics.d.ts.map +1 -0
  166. package/lib/metrics/statistics.js +35 -0
  167. package/lib/metrics/statistics.js.map +1 -0
  168. package/lib/parser/index.d.ts +13 -0
  169. package/lib/parser/index.d.ts.map +1 -0
  170. package/lib/parser/index.js +123 -0
  171. package/lib/parser/index.js.map +1 -0
  172. package/lib/parser/markdoc/extract-statics.d.ts +28 -0
  173. package/lib/parser/markdoc/extract-statics.d.ts.map +1 -0
  174. package/lib/parser/markdoc/extract-statics.js +80 -0
  175. package/lib/parser/markdoc/extract-statics.js.map +1 -0
  176. package/lib/parser/markdoc/pairing.d.ts +38 -0
  177. package/lib/parser/markdoc/pairing.d.ts.map +1 -0
  178. package/lib/parser/markdoc/pairing.js +77 -0
  179. package/lib/parser/markdoc/pairing.js.map +1 -0
  180. package/lib/parser/markdoc/schema.d.ts +56 -0
  181. package/lib/parser/markdoc/schema.d.ts.map +1 -0
  182. package/lib/parser/markdoc/schema.js +60 -0
  183. package/lib/parser/markdoc/schema.js.map +1 -0
  184. package/lib/parser/markdoc/span.d.ts +52 -0
  185. package/lib/parser/markdoc/span.d.ts.map +1 -0
  186. package/lib/parser/markdoc/span.js +577 -0
  187. package/lib/parser/markdoc/span.js.map +1 -0
  188. package/lib/parser/markdoc/structure.d.ts +17 -0
  189. package/lib/parser/markdoc/structure.d.ts.map +1 -0
  190. package/lib/parser/markdoc/structure.js +121 -0
  191. package/lib/parser/markdoc/structure.js.map +1 -0
  192. package/lib/parser/markdoc/syntax.d.ts +17 -0
  193. package/lib/parser/markdoc/syntax.d.ts.map +1 -0
  194. package/lib/parser/markdoc/syntax.js +262 -0
  195. package/lib/parser/markdoc/syntax.js.map +1 -0
  196. package/lib/parser/types.d.ts.map +1 -0
  197. package/lib/presets.d.ts +6 -0
  198. package/lib/presets.d.ts.map +1 -0
  199. package/lib/presets.js +12 -0
  200. package/lib/presets.js.map +1 -0
  201. package/lib/rules/registry.d.ts +13 -0
  202. package/lib/rules/registry.d.ts.map +1 -0
  203. package/lib/rules/registry.js +54 -0
  204. package/lib/rules/registry.js.map +1 -0
  205. package/lib/rules/scope/capitalization.d.ts.map +1 -0
  206. package/lib/rules/scope/capitalization.js +128 -0
  207. package/lib/rules/scope/capitalization.js.map +1 -0
  208. package/lib/rules/scope/conditional.d.ts.map +1 -0
  209. package/lib/rules/scope/conditional.js +93 -0
  210. package/lib/rules/scope/conditional.js.map +1 -0
  211. package/lib/rules/scope/consistency.d.ts.map +1 -0
  212. package/lib/rules/scope/consistency.js +118 -0
  213. package/lib/rules/scope/consistency.js.map +1 -0
  214. package/lib/rules/scope/length.d.ts.map +1 -0
  215. package/lib/rules/scope/length.js +50 -0
  216. package/lib/rules/scope/length.js.map +1 -0
  217. package/lib/rules/scope/max-image-size.d.ts.map +1 -0
  218. package/lib/rules/scope/max-image-size.js +55 -0
  219. package/lib/rules/scope/max-image-size.js.map +1 -0
  220. package/lib/rules/scope/metric.d.ts +3 -0
  221. package/lib/rules/scope/metric.d.ts.map +1 -0
  222. package/lib/rules/scope/metric.js +59 -0
  223. package/lib/rules/scope/metric.js.map +1 -0
  224. package/lib/rules/scope/occurrence.d.ts.map +1 -0
  225. package/lib/rules/scope/occurrence.js +41 -0
  226. package/lib/rules/scope/occurrence.js.map +1 -0
  227. package/lib/rules/scope/pattern.d.ts.map +1 -0
  228. package/lib/rules/scope/pattern.js +58 -0
  229. package/lib/rules/scope/pattern.js.map +1 -0
  230. package/lib/rules/scope/repetition.d.ts.map +1 -0
  231. package/lib/rules/scope/repetition.js +134 -0
  232. package/lib/rules/scope/repetition.js.map +1 -0
  233. package/lib/rules/scope/semantic-line-breaks.d.ts.map +1 -0
  234. package/lib/rules/scope/semantic-line-breaks.js +180 -0
  235. package/lib/rules/scope/semantic-line-breaks.js.map +1 -0
  236. package/lib/rules/scope/spelling.d.ts +11 -0
  237. package/lib/rules/scope/spelling.d.ts.map +1 -0
  238. package/lib/rules/scope/spelling.js +146 -0
  239. package/lib/rules/scope/spelling.js.map +1 -0
  240. package/lib/rules/scope/swap.d.ts.map +1 -0
  241. package/lib/rules/scope/swap.js +111 -0
  242. package/lib/rules/scope/swap.js.map +1 -0
  243. package/lib/rules/scope/title-case.d.ts +24 -0
  244. package/lib/rules/scope/title-case.d.ts.map +1 -0
  245. package/lib/rules/scope/title-case.js +216 -0
  246. package/lib/rules/scope/title-case.js.map +1 -0
  247. package/lib/rules/token/blanks-around-fences.d.ts.map +1 -0
  248. package/lib/rules/token/blanks-around-fences.js.map +1 -0
  249. package/lib/rules/token/blanks-around-headings.d.ts.map +1 -0
  250. package/lib/rules/token/blanks-around-headings.js +96 -0
  251. package/lib/rules/token/blanks-around-headings.js.map +1 -0
  252. package/lib/rules/token/blanks-around-lists.d.ts.map +1 -0
  253. package/lib/rules/token/blanks-around-lists.js +48 -0
  254. package/lib/rules/token/blanks-around-lists.js.map +1 -0
  255. package/lib/rules/token/blanks-around-tables.d.ts.map +1 -0
  256. package/lib/rules/token/blanks-around-tables.js +40 -0
  257. package/lib/rules/token/blanks-around-tables.js.map +1 -0
  258. package/lib/rules/token/code-block-style.d.ts.map +1 -0
  259. package/lib/rules/token/code-block-style.js.map +1 -0
  260. package/lib/rules/token/code-fence-style.d.ts.map +1 -0
  261. package/lib/rules/token/code-fence-style.js.map +1 -0
  262. package/lib/rules/token/commands-show-output.d.ts.map +1 -0
  263. package/lib/rules/token/commands-show-output.js.map +1 -0
  264. package/lib/rules/token/descriptive-link-text.d.ts.map +1 -0
  265. package/lib/rules/token/descriptive-link-text.js +46 -0
  266. package/lib/rules/token/descriptive-link-text.js.map +1 -0
  267. package/lib/rules/token/fenced-code-language.d.ts.map +1 -0
  268. package/lib/rules/token/fenced-code-language.js.map +1 -0
  269. package/lib/rules/token/first-line-h1.d.ts.map +1 -0
  270. package/lib/rules/token/first-line-h1.js +83 -0
  271. package/lib/rules/token/first-line-h1.js.map +1 -0
  272. package/lib/rules/token/front-matter.d.ts.map +1 -0
  273. package/lib/rules/token/front-matter.js +169 -0
  274. package/lib/rules/token/front-matter.js.map +1 -0
  275. package/lib/rules/token/heading-increment.d.ts.map +1 -0
  276. package/lib/rules/token/heading-increment.js +26 -0
  277. package/lib/rules/token/heading-increment.js.map +1 -0
  278. package/lib/rules/token/heading-start-left.d.ts.map +1 -0
  279. package/lib/rules/token/heading-start-left.js.map +1 -0
  280. package/lib/rules/token/heading-style.d.ts.map +1 -0
  281. package/lib/rules/token/heading-style.js.map +1 -0
  282. package/lib/rules/token/helpers.d.ts +115 -0
  283. package/lib/rules/token/helpers.d.ts.map +1 -0
  284. package/lib/rules/token/helpers.js +502 -0
  285. package/lib/rules/token/helpers.js.map +1 -0
  286. package/lib/rules/token/hr-style.d.ts.map +1 -0
  287. package/lib/rules/token/hr-style.js.map +1 -0
  288. package/lib/rules/token/index.d.ts +65 -0
  289. package/lib/rules/token/index.d.ts.map +1 -0
  290. package/lib/rules/token/index.js +157 -0
  291. package/lib/rules/token/index.js.map +1 -0
  292. package/lib/rules/token/line-length.d.ts.map +1 -0
  293. package/lib/rules/token/line-length.js +96 -0
  294. package/lib/rules/token/line-length.js.map +1 -0
  295. package/lib/rules/token/link-fragments.d.ts.map +1 -0
  296. package/lib/rules/token/link-fragments.js +398 -0
  297. package/lib/rules/token/link-fragments.js.map +1 -0
  298. package/lib/rules/token/link-image-reference-definitions.d.ts.map +1 -0
  299. package/lib/rules/token/link-image-reference-definitions.js.map +1 -0
  300. package/lib/rules/token/link-image-style.d.ts.map +1 -0
  301. package/lib/rules/token/link-image-style.js +138 -0
  302. package/lib/rules/token/link-image-style.js.map +1 -0
  303. package/lib/rules/token/list-indent.d.ts.map +1 -0
  304. package/lib/rules/token/list-indent.js.map +1 -0
  305. package/lib/rules/token/list-length.d.ts.map +1 -0
  306. package/lib/rules/token/list-length.js +31 -0
  307. package/lib/rules/token/list-length.js.map +1 -0
  308. package/lib/rules/token/list-marker-space.d.ts.map +1 -0
  309. package/lib/rules/token/list-marker-space.js.map +1 -0
  310. package/lib/rules/token/markdoc-attributes.d.ts.map +1 -0
  311. package/lib/rules/token/markdoc-attributes.js +198 -0
  312. package/lib/rules/token/markdoc-attributes.js.map +1 -0
  313. package/lib/rules/token/markdoc-pairing.d.ts.map +1 -0
  314. package/lib/rules/token/markdoc-pairing.js +65 -0
  315. package/lib/rules/token/markdoc-pairing.js.map +1 -0
  316. package/lib/rules/token/markdoc-syntax.d.ts.map +1 -0
  317. package/lib/rules/token/markdoc-syntax.js +84 -0
  318. package/lib/rules/token/markdoc-syntax.js.map +1 -0
  319. package/lib/rules/token/markdoc-unknown-tag.d.ts.map +1 -0
  320. package/lib/rules/token/markdoc-unknown-tag.js +44 -0
  321. package/lib/rules/token/markdoc-unknown-tag.js.map +1 -0
  322. package/lib/rules/token/no-alt-text.d.ts.map +1 -0
  323. package/lib/rules/token/no-alt-text.js +43 -0
  324. package/lib/rules/token/no-alt-text.js.map +1 -0
  325. package/lib/rules/token/no-bare-urls.d.ts.map +1 -0
  326. package/lib/rules/token/no-bare-urls.js +74 -0
  327. package/lib/rules/token/no-bare-urls.js.map +1 -0
  328. package/lib/rules/token/no-blanks-blockquote.d.ts.map +1 -0
  329. package/lib/rules/token/no-blanks-blockquote.js.map +1 -0
  330. package/lib/rules/token/no-duplicate-heading.d.ts.map +1 -0
  331. package/lib/rules/token/no-duplicate-heading.js +89 -0
  332. package/lib/rules/token/no-duplicate-heading.js.map +1 -0
  333. package/lib/rules/token/no-duplicate-link-destinations.d.ts.map +1 -0
  334. package/lib/rules/token/no-duplicate-link-destinations.js +54 -0
  335. package/lib/rules/token/no-duplicate-link-destinations.js.map +1 -0
  336. package/lib/rules/token/no-emphasis-as-heading.d.ts.map +1 -0
  337. package/lib/rules/token/no-emphasis-as-heading.js +39 -0
  338. package/lib/rules/token/no-emphasis-as-heading.js.map +1 -0
  339. package/lib/rules/token/no-empty-headings.d.ts.map +1 -0
  340. package/lib/rules/token/no-empty-headings.js +21 -0
  341. package/lib/rules/token/no-empty-headings.js.map +1 -0
  342. package/lib/rules/token/no-empty-links.d.ts.map +1 -0
  343. package/lib/rules/token/no-empty-links.js.map +1 -0
  344. package/lib/rules/token/no-hard-tabs.d.ts.map +1 -0
  345. package/lib/rules/token/no-hard-tabs.js.map +1 -0
  346. package/lib/rules/token/no-inline-html.d.ts.map +1 -0
  347. package/lib/rules/token/no-inline-html.js +41 -0
  348. package/lib/rules/token/no-inline-html.js.map +1 -0
  349. package/lib/rules/token/no-multiple-blanks.d.ts.map +1 -0
  350. package/lib/rules/token/no-multiple-blanks.js.map +1 -0
  351. package/lib/rules/token/no-multiple-space-atx.d.ts +9 -0
  352. package/lib/rules/token/no-multiple-space-atx.d.ts.map +1 -0
  353. package/lib/rules/token/no-multiple-space-atx.js +46 -0
  354. package/lib/rules/token/no-multiple-space-atx.js.map +1 -0
  355. package/lib/rules/token/no-multiple-space-closed-atx.d.ts.map +1 -0
  356. package/lib/rules/token/no-multiple-space-closed-atx.js.map +1 -0
  357. package/lib/rules/token/no-reversed-links.d.ts.map +1 -0
  358. package/lib/rules/token/no-reversed-links.js.map +1 -0
  359. package/lib/rules/token/no-space-in-code.d.ts.map +1 -0
  360. package/lib/rules/token/no-space-in-code.js.map +1 -0
  361. package/lib/rules/token/no-space-in-emphasis.d.ts.map +1 -0
  362. package/lib/rules/token/no-space-in-emphasis.js +72 -0
  363. package/lib/rules/token/no-space-in-emphasis.js.map +1 -0
  364. package/lib/rules/token/no-space-in-links.d.ts.map +1 -0
  365. package/lib/rules/token/no-space-in-links.js.map +1 -0
  366. package/lib/rules/token/no-trailing-punctuation.d.ts.map +1 -0
  367. package/lib/rules/token/no-trailing-punctuation.js.map +1 -0
  368. package/lib/rules/token/no-trailing-spaces.d.ts.map +1 -0
  369. package/lib/rules/token/no-trailing-spaces.js.map +1 -0
  370. package/lib/rules/token/ol-prefix.d.ts.map +1 -0
  371. package/lib/rules/token/ol-prefix.js.map +1 -0
  372. package/lib/rules/token/proper-names.d.ts.map +1 -0
  373. package/lib/rules/token/proper-names.js +87 -0
  374. package/lib/rules/token/proper-names.js.map +1 -0
  375. package/lib/rules/token/reference-links-images.d.ts.map +1 -0
  376. package/lib/rules/token/reference-links-images.js.map +1 -0
  377. package/lib/rules/token/required-headings.d.ts.map +1 -0
  378. package/lib/rules/token/required-headings.js +73 -0
  379. package/lib/rules/token/required-headings.js.map +1 -0
  380. package/lib/rules/token/single-h1.d.ts.map +1 -0
  381. package/lib/rules/token/single-h1.js +43 -0
  382. package/lib/rules/token/single-h1.js.map +1 -0
  383. package/lib/rules/token/table-column-count.d.ts.map +1 -0
  384. package/lib/rules/token/table-column-count.js.map +1 -0
  385. package/lib/rules/token/table-column-style.d.ts.map +1 -0
  386. package/lib/rules/token/table-column-style.js +162 -0
  387. package/lib/rules/token/table-column-style.js.map +1 -0
  388. package/lib/rules/token/table-pipe-style.d.ts.map +1 -0
  389. package/lib/rules/token/table-pipe-style.js.map +1 -0
  390. package/lib/rules/token/ul-indent.d.ts.map +1 -0
  391. package/lib/rules/token/ul-indent.js.map +1 -0
  392. package/lib/rules/token/ul-style.d.ts.map +1 -0
  393. package/lib/rules/token/ul-style.js +70 -0
  394. package/lib/rules/token/ul-style.js.map +1 -0
  395. package/lib/rules/types.d.ts +62 -0
  396. package/lib/rules/types.d.ts.map +1 -0
  397. package/lib/rules/utils.d.ts +18 -0
  398. package/lib/rules/utils.d.ts.map +1 -0
  399. package/lib/rules/utils.js +75 -0
  400. package/lib/rules/utils.js.map +1 -0
  401. package/lib/scopes/extractor.d.ts +6 -0
  402. package/lib/scopes/extractor.d.ts.map +1 -0
  403. package/lib/scopes/extractor.js +398 -0
  404. package/lib/scopes/extractor.js.map +1 -0
  405. package/lib/scopes/selector.d.ts +26 -0
  406. package/lib/scopes/selector.d.ts.map +1 -0
  407. package/lib/scopes/selector.js +78 -0
  408. package/lib/scopes/selector.js.map +1 -0
  409. package/lib/scopes/sentences.d.ts +13 -0
  410. package/lib/scopes/sentences.d.ts.map +1 -0
  411. package/lib/scopes/sentences.js +237 -0
  412. package/lib/scopes/sentences.js.map +1 -0
  413. package/lib/scopes/types.d.ts +35 -0
  414. package/lib/scopes/types.d.ts.map +1 -0
  415. package/lib/scopes/vocabulary.d.ts +12 -0
  416. package/lib/scopes/vocabulary.d.ts.map +1 -0
  417. package/lib/scopes/vocabulary.js +56 -0
  418. package/lib/scopes/vocabulary.js.map +1 -0
  419. package/lib/types/assertions.d.ts +97 -0
  420. package/lib/types/assertions.d.ts.map +1 -0
  421. package/lib/types/reporting.d.ts +23 -0
  422. package/lib/types/reporting.d.ts.map +1 -0
  423. package/lib/types/rules.d.ts +53 -0
  424. package/lib/types/rules.d.ts.map +1 -0
  425. package/lib/types/validation.d.ts +5 -0
  426. package/lib/types/validation.d.ts.map +1 -0
  427. package/lib/utils/is-plain-object.d.ts +2 -0
  428. package/lib/utils/is-plain-object.d.ts.map +1 -0
  429. package/lib/utils/is-plain-object.js +5 -0
  430. package/lib/utils/is-plain-object.js.map +1 -0
  431. package/package.json +58 -61
  432. package/presets/google/PROVENANCE.md +217 -221
  433. package/presets/inclusive-language/PROVENANCE.md +20 -19
  434. package/presets/microsoft/PROVENANCE.md +242 -243
  435. package/presets/plain-language/PROVENANCE.md +66 -60
  436. package/presets/technical-english/PROVENANCE.md +5 -5
  437. package/skills/recheck-config/SKILL.md +70 -20
  438. package/skills/recheck-lint/SKILL.md +37 -13
  439. package/dist/cli.d.ts +0 -3
  440. package/dist/cli.d.ts.map +0 -1
  441. package/dist/cli.js +0 -228
  442. package/dist/cli.js.map +0 -1
  443. package/dist/commands/baseline.d.ts +0 -10
  444. package/dist/commands/baseline.d.ts.map +0 -1
  445. package/dist/commands/baseline.js +0 -59
  446. package/dist/commands/baseline.js.map +0 -1
  447. package/dist/commands/markdoc-schema.d.ts +0 -17
  448. package/dist/commands/markdoc-schema.d.ts.map +0 -1
  449. package/dist/commands/markdoc-schema.js +0 -127
  450. package/dist/commands/markdoc-schema.js.map +0 -1
  451. package/dist/commands/readability.d.ts +0 -10
  452. package/dist/commands/readability.d.ts.map +0 -1
  453. package/dist/commands/readability.js +0 -90
  454. package/dist/commands/readability.js.map +0 -1
  455. package/dist/commands/run.d.ts +0 -21
  456. package/dist/commands/run.d.ts.map +0 -1
  457. package/dist/commands/run.js +0 -236
  458. package/dist/commands/run.js.map +0 -1
  459. package/dist/commands/validate.d.ts +0 -8
  460. package/dist/commands/validate.d.ts.map +0 -1
  461. package/dist/commands/validate.js +0 -43
  462. package/dist/commands/validate.js.map +0 -1
  463. package/dist/config/load.d.ts +0 -33
  464. package/dist/config/load.d.ts.map +0 -1
  465. package/dist/config/load.js +0 -98
  466. package/dist/config/load.js.map +0 -1
  467. package/dist/config/presets/api-descriptions.d.ts +0 -8
  468. package/dist/config/presets/api-descriptions.d.ts.map +0 -1
  469. package/dist/config/presets/api-descriptions.js +0 -24
  470. package/dist/config/presets/api-descriptions.js.map +0 -1
  471. package/dist/config/presets/google.d.ts +0 -3
  472. package/dist/config/presets/google.d.ts.map +0 -1
  473. package/dist/config/presets/google.js +0 -1671
  474. package/dist/config/presets/google.js.map +0 -1
  475. package/dist/config/presets/inclusive-language.d.ts +0 -3
  476. package/dist/config/presets/inclusive-language.d.ts.map +0 -1
  477. package/dist/config/presets/inclusive-language.js +0 -321
  478. package/dist/config/presets/inclusive-language.js.map +0 -1
  479. package/dist/config/presets/index.d.ts +0 -67
  480. package/dist/config/presets/index.d.ts.map +0 -1
  481. package/dist/config/presets/index.js +0 -141
  482. package/dist/config/presets/index.js.map +0 -1
  483. package/dist/config/presets/markdoc.d.ts +0 -21
  484. package/dist/config/presets/markdoc.d.ts.map +0 -1
  485. package/dist/config/presets/markdoc.js +0 -101
  486. package/dist/config/presets/markdoc.js.map +0 -1
  487. package/dist/config/presets/markdown-relaxed.d.ts +0 -3
  488. package/dist/config/presets/markdown-relaxed.d.ts.map +0 -1
  489. package/dist/config/presets/markdown-relaxed.js +0 -98
  490. package/dist/config/presets/markdown-relaxed.js.map +0 -1
  491. package/dist/config/presets/markdown.d.ts +0 -43
  492. package/dist/config/presets/markdown.d.ts.map +0 -1
  493. package/dist/config/presets/markdown.js +0 -132
  494. package/dist/config/presets/markdown.js.map +0 -1
  495. package/dist/config/presets/microsoft.d.ts +0 -3
  496. package/dist/config/presets/microsoft.d.ts.map +0 -1
  497. package/dist/config/presets/microsoft.js +0 -2268
  498. package/dist/config/presets/microsoft.js.map +0 -1
  499. package/dist/config/presets/minimal.d.ts +0 -3
  500. package/dist/config/presets/minimal.d.ts.map +0 -1
  501. package/dist/config/presets/minimal.js +0 -21
  502. package/dist/config/presets/minimal.js.map +0 -1
  503. package/dist/config/presets/plain-language.d.ts +0 -3
  504. package/dist/config/presets/plain-language.d.ts.map +0 -1
  505. package/dist/config/presets/plain-language.js +0 -351
  506. package/dist/config/presets/plain-language.js.map +0 -1
  507. package/dist/config/presets/prose.d.ts +0 -52
  508. package/dist/config/presets/prose.d.ts.map +0 -1
  509. package/dist/config/presets/prose.js +0 -138
  510. package/dist/config/presets/prose.js.map +0 -1
  511. package/dist/config/presets/technical-english.d.ts +0 -34
  512. package/dist/config/presets/technical-english.d.ts.map +0 -1
  513. package/dist/config/presets/technical-english.js +0 -79
  514. package/dist/config/presets/technical-english.js.map +0 -1
  515. package/dist/config/schema.d.ts +0 -226
  516. package/dist/config/schema.d.ts.map +0 -1
  517. package/dist/config/schema.js +0 -196
  518. package/dist/config/schema.js.map +0 -1
  519. package/dist/config/validate.d.ts +0 -22
  520. package/dist/config/validate.d.ts.map +0 -1
  521. package/dist/config/validate.js +0 -1296
  522. package/dist/config/validate.js.map +0 -1
  523. package/dist/core/auto-fix.d.ts.map +0 -1
  524. package/dist/core/auto-fix.js +0 -101
  525. package/dist/core/auto-fix.js.map +0 -1
  526. package/dist/core/baseline.d.ts +0 -49
  527. package/dist/core/baseline.d.ts.map +0 -1
  528. package/dist/core/baseline.js +0 -0
  529. package/dist/core/baseline.js.map +0 -1
  530. package/dist/core/case-preserve.d.ts +0 -46
  531. package/dist/core/case-preserve.d.ts.map +0 -1
  532. package/dist/core/case-preserve.js +0 -57
  533. package/dist/core/case-preserve.js.map +0 -1
  534. package/dist/core/directives.d.ts.map +0 -1
  535. package/dist/core/directives.js +0 -73
  536. package/dist/core/directives.js.map +0 -1
  537. package/dist/core/files.d.ts +0 -69
  538. package/dist/core/files.d.ts.map +0 -1
  539. package/dist/core/files.js +0 -260
  540. package/dist/core/files.js.map +0 -1
  541. package/dist/core/inline-code.d.ts +0 -87
  542. package/dist/core/inline-code.d.ts.map +0 -1
  543. package/dist/core/inline-code.js +0 -104
  544. package/dist/core/inline-code.js.map +0 -1
  545. package/dist/core/line-endings.d.ts +0 -32
  546. package/dist/core/line-endings.d.ts.map +0 -1
  547. package/dist/core/line-endings.js +0 -65
  548. package/dist/core/line-endings.js.map +0 -1
  549. package/dist/core/markdoc-tags.d.ts +0 -79
  550. package/dist/core/markdoc-tags.d.ts.map +0 -1
  551. package/dist/core/markdoc-tags.js +0 -131
  552. package/dist/core/markdoc-tags.js.map +0 -1
  553. package/dist/core/prose-extract.d.ts +0 -6
  554. package/dist/core/prose-extract.d.ts.map +0 -1
  555. package/dist/core/prose-extract.js +0 -79
  556. package/dist/core/prose-extract.js.map +0 -1
  557. package/dist/core/readability.d.ts +0 -17
  558. package/dist/core/readability.d.ts.map +0 -1
  559. package/dist/core/readability.js +0 -37
  560. package/dist/core/readability.js.map +0 -1
  561. package/dist/core/rule-filters.d.ts +0 -45
  562. package/dist/core/rule-filters.d.ts.map +0 -1
  563. package/dist/core/rule-filters.js +0 -118
  564. package/dist/core/rule-filters.js.map +0 -1
  565. package/dist/core/runner.d.ts +0 -99
  566. package/dist/core/runner.d.ts.map +0 -1
  567. package/dist/core/runner.js +0 -401
  568. package/dist/core/runner.js.map +0 -1
  569. package/dist/core/timing.d.ts +0 -24
  570. package/dist/core/timing.d.ts.map +0 -1
  571. package/dist/core/timing.js +0 -39
  572. package/dist/core/timing.js.map +0 -1
  573. package/dist/data/markdoc-realm-schema.d.ts.map +0 -1
  574. package/dist/data/markdoc-realm-schema.js +0 -798
  575. package/dist/data/markdoc-realm-schema.js.map +0 -1
  576. package/dist/data/proper-nouns.d.ts.map +0 -1
  577. package/dist/data/proper-nouns.js +0 -47
  578. package/dist/data/proper-nouns.js.map +0 -1
  579. package/dist/data/realm-front-matter-schema.d.ts +0 -28
  580. package/dist/data/realm-front-matter-schema.d.ts.map +0 -1
  581. package/dist/data/realm-front-matter-schema.js +0 -73
  582. package/dist/data/realm-front-matter-schema.js.map +0 -1
  583. package/dist/index.d.ts +0 -90
  584. package/dist/index.d.ts.map +0 -1
  585. package/dist/index.js +0 -152
  586. package/dist/index.js.map +0 -1
  587. package/dist/metrics/formulas.d.ts +0 -17
  588. package/dist/metrics/formulas.d.ts.map +0 -1
  589. package/dist/metrics/formulas.js +0 -70
  590. package/dist/metrics/formulas.js.map +0 -1
  591. package/dist/metrics/statistics.d.ts +0 -27
  592. package/dist/metrics/statistics.d.ts.map +0 -1
  593. package/dist/metrics/statistics.js +0 -56
  594. package/dist/metrics/statistics.js.map +0 -1
  595. package/dist/parser/index.d.ts +0 -19
  596. package/dist/parser/index.d.ts.map +0 -1
  597. package/dist/parser/index.js +0 -174
  598. package/dist/parser/index.js.map +0 -1
  599. package/dist/parser/markdoc/extract-statics.d.ts +0 -45
  600. package/dist/parser/markdoc/extract-statics.d.ts.map +0 -1
  601. package/dist/parser/markdoc/extract-statics.js +0 -139
  602. package/dist/parser/markdoc/extract-statics.js.map +0 -1
  603. package/dist/parser/markdoc/pairing.d.ts +0 -63
  604. package/dist/parser/markdoc/pairing.d.ts.map +0 -1
  605. package/dist/parser/markdoc/pairing.js +0 -94
  606. package/dist/parser/markdoc/pairing.js.map +0 -1
  607. package/dist/parser/markdoc/schema.d.ts +0 -85
  608. package/dist/parser/markdoc/schema.d.ts.map +0 -1
  609. package/dist/parser/markdoc/schema.js +0 -86
  610. package/dist/parser/markdoc/schema.js.map +0 -1
  611. package/dist/parser/markdoc/span.d.ts +0 -64
  612. package/dist/parser/markdoc/span.d.ts.map +0 -1
  613. package/dist/parser/markdoc/span.js +0 -729
  614. package/dist/parser/markdoc/span.js.map +0 -1
  615. package/dist/parser/markdoc/structure.d.ts +0 -28
  616. package/dist/parser/markdoc/structure.d.ts.map +0 -1
  617. package/dist/parser/markdoc/structure.js +0 -153
  618. package/dist/parser/markdoc/structure.js.map +0 -1
  619. package/dist/parser/markdoc/syntax.d.ts +0 -44
  620. package/dist/parser/markdoc/syntax.d.ts.map +0 -1
  621. package/dist/parser/markdoc/syntax.js +0 -317
  622. package/dist/parser/markdoc/syntax.js.map +0 -1
  623. package/dist/parser/types.d.ts.map +0 -1
  624. package/dist/reporter/fixes.d.ts +0 -3
  625. package/dist/reporter/fixes.d.ts.map +0 -1
  626. package/dist/reporter/fixes.js +0 -41
  627. package/dist/reporter/fixes.js.map +0 -1
  628. package/dist/reporter/formats/github-actions.d.ts +0 -6
  629. package/dist/reporter/formats/github-actions.d.ts.map +0 -1
  630. package/dist/reporter/formats/github-actions.js +0 -20
  631. package/dist/reporter/formats/github-actions.js.map +0 -1
  632. package/dist/reporter/formats/json.d.ts +0 -10
  633. package/dist/reporter/formats/json.d.ts.map +0 -1
  634. package/dist/reporter/formats/json.js +0 -25
  635. package/dist/reporter/formats/json.js.map +0 -1
  636. package/dist/reporter/formats/sarif.d.ts +0 -10
  637. package/dist/reporter/formats/sarif.d.ts.map +0 -1
  638. package/dist/reporter/formats/sarif.js +0 -66
  639. package/dist/reporter/formats/sarif.js.map +0 -1
  640. package/dist/reporter/formats/table.d.ts +0 -6
  641. package/dist/reporter/formats/table.d.ts.map +0 -1
  642. package/dist/reporter/formats/table.js +0 -43
  643. package/dist/reporter/formats/table.js.map +0 -1
  644. package/dist/reporter/index.d.ts +0 -10
  645. package/dist/reporter/index.d.ts.map +0 -1
  646. package/dist/reporter/index.js +0 -42
  647. package/dist/reporter/index.js.map +0 -1
  648. package/dist/reporter/prioritize-problems.d.ts +0 -7
  649. package/dist/reporter/prioritize-problems.d.ts.map +0 -1
  650. package/dist/reporter/prioritize-problems.js +0 -29
  651. package/dist/reporter/prioritize-problems.js.map +0 -1
  652. package/dist/reporter/statistics.d.ts +0 -10
  653. package/dist/reporter/statistics.d.ts.map +0 -1
  654. package/dist/reporter/statistics.js +0 -52
  655. package/dist/reporter/statistics.js.map +0 -1
  656. package/dist/reporter/summary.d.ts +0 -10
  657. package/dist/reporter/summary.d.ts.map +0 -1
  658. package/dist/reporter/summary.js +0 -49
  659. package/dist/reporter/summary.js.map +0 -1
  660. package/dist/rules/registry.d.ts +0 -15
  661. package/dist/rules/registry.d.ts.map +0 -1
  662. package/dist/rules/registry.js +0 -81
  663. package/dist/rules/registry.js.map +0 -1
  664. package/dist/rules/scope/capitalization.d.ts.map +0 -1
  665. package/dist/rules/scope/capitalization.js +0 -164
  666. package/dist/rules/scope/capitalization.js.map +0 -1
  667. package/dist/rules/scope/conditional.d.ts.map +0 -1
  668. package/dist/rules/scope/conditional.js +0 -112
  669. package/dist/rules/scope/conditional.js.map +0 -1
  670. package/dist/rules/scope/consistency.d.ts.map +0 -1
  671. package/dist/rules/scope/consistency.js +0 -179
  672. package/dist/rules/scope/consistency.js.map +0 -1
  673. package/dist/rules/scope/length.d.ts.map +0 -1
  674. package/dist/rules/scope/length.js +0 -73
  675. package/dist/rules/scope/length.js.map +0 -1
  676. package/dist/rules/scope/max-image-size.d.ts.map +0 -1
  677. package/dist/rules/scope/max-image-size.js +0 -65
  678. package/dist/rules/scope/max-image-size.js.map +0 -1
  679. package/dist/rules/scope/metric.d.ts +0 -5
  680. package/dist/rules/scope/metric.d.ts.map +0 -1
  681. package/dist/rules/scope/metric.js +0 -59
  682. package/dist/rules/scope/metric.js.map +0 -1
  683. package/dist/rules/scope/occurrence.d.ts.map +0 -1
  684. package/dist/rules/scope/occurrence.js +0 -48
  685. package/dist/rules/scope/occurrence.js.map +0 -1
  686. package/dist/rules/scope/pattern.d.ts.map +0 -1
  687. package/dist/rules/scope/pattern.js +0 -75
  688. package/dist/rules/scope/pattern.js.map +0 -1
  689. package/dist/rules/scope/repetition.d.ts.map +0 -1
  690. package/dist/rules/scope/repetition.js +0 -139
  691. package/dist/rules/scope/repetition.js.map +0 -1
  692. package/dist/rules/scope/semantic-line-breaks.d.ts.map +0 -1
  693. package/dist/rules/scope/semantic-line-breaks.js +0 -236
  694. package/dist/rules/scope/semantic-line-breaks.js.map +0 -1
  695. package/dist/rules/scope/spelling.d.ts +0 -27
  696. package/dist/rules/scope/spelling.d.ts.map +0 -1
  697. package/dist/rules/scope/spelling.js +0 -227
  698. package/dist/rules/scope/spelling.js.map +0 -1
  699. package/dist/rules/scope/swap.d.ts.map +0 -1
  700. package/dist/rules/scope/swap.js +0 -149
  701. package/dist/rules/scope/swap.js.map +0 -1
  702. package/dist/rules/scope/title-case.d.ts +0 -46
  703. package/dist/rules/scope/title-case.d.ts.map +0 -1
  704. package/dist/rules/scope/title-case.js +0 -301
  705. package/dist/rules/scope/title-case.js.map +0 -1
  706. package/dist/rules/token/blanks-around-fences.d.ts.map +0 -1
  707. package/dist/rules/token/blanks-around-fences.js.map +0 -1
  708. package/dist/rules/token/blanks-around-headings.d.ts.map +0 -1
  709. package/dist/rules/token/blanks-around-headings.js +0 -108
  710. package/dist/rules/token/blanks-around-headings.js.map +0 -1
  711. package/dist/rules/token/blanks-around-lists.d.ts.map +0 -1
  712. package/dist/rules/token/blanks-around-lists.js +0 -56
  713. package/dist/rules/token/blanks-around-lists.js.map +0 -1
  714. package/dist/rules/token/blanks-around-tables.d.ts.map +0 -1
  715. package/dist/rules/token/blanks-around-tables.js +0 -42
  716. package/dist/rules/token/blanks-around-tables.js.map +0 -1
  717. package/dist/rules/token/code-block-style.d.ts.map +0 -1
  718. package/dist/rules/token/code-block-style.js.map +0 -1
  719. package/dist/rules/token/code-fence-style.d.ts.map +0 -1
  720. package/dist/rules/token/code-fence-style.js.map +0 -1
  721. package/dist/rules/token/commands-show-output.d.ts.map +0 -1
  722. package/dist/rules/token/commands-show-output.js.map +0 -1
  723. package/dist/rules/token/descriptive-link-text.d.ts.map +0 -1
  724. package/dist/rules/token/descriptive-link-text.js +0 -53
  725. package/dist/rules/token/descriptive-link-text.js.map +0 -1
  726. package/dist/rules/token/fenced-code-language.d.ts.map +0 -1
  727. package/dist/rules/token/fenced-code-language.js.map +0 -1
  728. package/dist/rules/token/first-line-h1.d.ts.map +0 -1
  729. package/dist/rules/token/first-line-h1.js +0 -107
  730. package/dist/rules/token/first-line-h1.js.map +0 -1
  731. package/dist/rules/token/front-matter.d.ts.map +0 -1
  732. package/dist/rules/token/front-matter.js +0 -177
  733. package/dist/rules/token/front-matter.js.map +0 -1
  734. package/dist/rules/token/heading-increment.d.ts.map +0 -1
  735. package/dist/rules/token/heading-increment.js +0 -27
  736. package/dist/rules/token/heading-increment.js.map +0 -1
  737. package/dist/rules/token/heading-start-left.d.ts.map +0 -1
  738. package/dist/rules/token/heading-start-left.js.map +0 -1
  739. package/dist/rules/token/heading-style.d.ts.map +0 -1
  740. package/dist/rules/token/heading-style.js.map +0 -1
  741. package/dist/rules/token/helpers.d.ts +0 -313
  742. package/dist/rules/token/helpers.d.ts.map +0 -1
  743. package/dist/rules/token/helpers.js +0 -746
  744. package/dist/rules/token/helpers.js.map +0 -1
  745. package/dist/rules/token/hr-style.d.ts.map +0 -1
  746. package/dist/rules/token/hr-style.js.map +0 -1
  747. package/dist/rules/token/index.d.ts +0 -76
  748. package/dist/rules/token/index.d.ts.map +0 -1
  749. package/dist/rules/token/index.js +0 -229
  750. package/dist/rules/token/index.js.map +0 -1
  751. package/dist/rules/token/line-length.d.ts.map +0 -1
  752. package/dist/rules/token/line-length.js +0 -120
  753. package/dist/rules/token/line-length.js.map +0 -1
  754. package/dist/rules/token/link-fragments.d.ts.map +0 -1
  755. package/dist/rules/token/link-fragments.js +0 -393
  756. package/dist/rules/token/link-fragments.js.map +0 -1
  757. package/dist/rules/token/link-image-reference-definitions.d.ts.map +0 -1
  758. package/dist/rules/token/link-image-reference-definitions.js.map +0 -1
  759. package/dist/rules/token/link-image-style.d.ts.map +0 -1
  760. package/dist/rules/token/link-image-style.js +0 -131
  761. package/dist/rules/token/link-image-style.js.map +0 -1
  762. package/dist/rules/token/list-indent.d.ts.map +0 -1
  763. package/dist/rules/token/list-indent.js.map +0 -1
  764. package/dist/rules/token/list-length.d.ts.map +0 -1
  765. package/dist/rules/token/list-length.js +0 -55
  766. package/dist/rules/token/list-length.js.map +0 -1
  767. package/dist/rules/token/list-marker-space.d.ts.map +0 -1
  768. package/dist/rules/token/list-marker-space.js.map +0 -1
  769. package/dist/rules/token/markdoc-attributes.d.ts.map +0 -1
  770. package/dist/rules/token/markdoc-attributes.js +0 -269
  771. package/dist/rules/token/markdoc-attributes.js.map +0 -1
  772. package/dist/rules/token/markdoc-pairing.d.ts.map +0 -1
  773. package/dist/rules/token/markdoc-pairing.js +0 -73
  774. package/dist/rules/token/markdoc-pairing.js.map +0 -1
  775. package/dist/rules/token/markdoc-syntax.d.ts.map +0 -1
  776. package/dist/rules/token/markdoc-syntax.js +0 -119
  777. package/dist/rules/token/markdoc-syntax.js.map +0 -1
  778. package/dist/rules/token/markdoc-unknown-tag.d.ts.map +0 -1
  779. package/dist/rules/token/markdoc-unknown-tag.js +0 -64
  780. package/dist/rules/token/markdoc-unknown-tag.js.map +0 -1
  781. package/dist/rules/token/no-alt-text.d.ts.map +0 -1
  782. package/dist/rules/token/no-alt-text.js +0 -47
  783. package/dist/rules/token/no-alt-text.js.map +0 -1
  784. package/dist/rules/token/no-bare-urls.d.ts.map +0 -1
  785. package/dist/rules/token/no-bare-urls.js +0 -88
  786. package/dist/rules/token/no-bare-urls.js.map +0 -1
  787. package/dist/rules/token/no-blanks-blockquote.d.ts.map +0 -1
  788. package/dist/rules/token/no-blanks-blockquote.js.map +0 -1
  789. package/dist/rules/token/no-duplicate-heading.d.ts.map +0 -1
  790. package/dist/rules/token/no-duplicate-heading.js +0 -101
  791. package/dist/rules/token/no-duplicate-heading.js.map +0 -1
  792. package/dist/rules/token/no-duplicate-link-destinations.d.ts.map +0 -1
  793. package/dist/rules/token/no-duplicate-link-destinations.js +0 -65
  794. package/dist/rules/token/no-duplicate-link-destinations.js.map +0 -1
  795. package/dist/rules/token/no-emphasis-as-heading.d.ts.map +0 -1
  796. package/dist/rules/token/no-emphasis-as-heading.js +0 -44
  797. package/dist/rules/token/no-emphasis-as-heading.js.map +0 -1
  798. package/dist/rules/token/no-empty-headings.d.ts.map +0 -1
  799. package/dist/rules/token/no-empty-headings.js +0 -28
  800. package/dist/rules/token/no-empty-headings.js.map +0 -1
  801. package/dist/rules/token/no-empty-links.d.ts.map +0 -1
  802. package/dist/rules/token/no-empty-links.js.map +0 -1
  803. package/dist/rules/token/no-hard-tabs.d.ts.map +0 -1
  804. package/dist/rules/token/no-hard-tabs.js.map +0 -1
  805. package/dist/rules/token/no-inline-html.d.ts.map +0 -1
  806. package/dist/rules/token/no-inline-html.js +0 -45
  807. package/dist/rules/token/no-inline-html.js.map +0 -1
  808. package/dist/rules/token/no-multiple-blanks.d.ts.map +0 -1
  809. package/dist/rules/token/no-multiple-blanks.js.map +0 -1
  810. package/dist/rules/token/no-multiple-space-atx.d.ts +0 -13
  811. package/dist/rules/token/no-multiple-space-atx.d.ts.map +0 -1
  812. package/dist/rules/token/no-multiple-space-atx.js +0 -50
  813. package/dist/rules/token/no-multiple-space-atx.js.map +0 -1
  814. package/dist/rules/token/no-multiple-space-closed-atx.d.ts.map +0 -1
  815. package/dist/rules/token/no-multiple-space-closed-atx.js.map +0 -1
  816. package/dist/rules/token/no-reversed-links.d.ts.map +0 -1
  817. package/dist/rules/token/no-reversed-links.js.map +0 -1
  818. package/dist/rules/token/no-space-in-code.d.ts.map +0 -1
  819. package/dist/rules/token/no-space-in-code.js.map +0 -1
  820. package/dist/rules/token/no-space-in-emphasis.d.ts.map +0 -1
  821. package/dist/rules/token/no-space-in-emphasis.js +0 -79
  822. package/dist/rules/token/no-space-in-emphasis.js.map +0 -1
  823. package/dist/rules/token/no-space-in-links.d.ts.map +0 -1
  824. package/dist/rules/token/no-space-in-links.js.map +0 -1
  825. package/dist/rules/token/no-trailing-punctuation.d.ts.map +0 -1
  826. package/dist/rules/token/no-trailing-punctuation.js.map +0 -1
  827. package/dist/rules/token/no-trailing-spaces.d.ts.map +0 -1
  828. package/dist/rules/token/no-trailing-spaces.js.map +0 -1
  829. package/dist/rules/token/ol-prefix.d.ts.map +0 -1
  830. package/dist/rules/token/ol-prefix.js.map +0 -1
  831. package/dist/rules/token/proper-names.d.ts.map +0 -1
  832. package/dist/rules/token/proper-names.js +0 -93
  833. package/dist/rules/token/proper-names.js.map +0 -1
  834. package/dist/rules/token/reference-links-images.d.ts.map +0 -1
  835. package/dist/rules/token/reference-links-images.js.map +0 -1
  836. package/dist/rules/token/required-headings.d.ts.map +0 -1
  837. package/dist/rules/token/required-headings.js +0 -83
  838. package/dist/rules/token/required-headings.js.map +0 -1
  839. package/dist/rules/token/single-h1.d.ts.map +0 -1
  840. package/dist/rules/token/single-h1.js +0 -56
  841. package/dist/rules/token/single-h1.js.map +0 -1
  842. package/dist/rules/token/table-column-count.d.ts.map +0 -1
  843. package/dist/rules/token/table-column-count.js.map +0 -1
  844. package/dist/rules/token/table-column-style.d.ts.map +0 -1
  845. package/dist/rules/token/table-column-style.js +0 -179
  846. package/dist/rules/token/table-column-style.js.map +0 -1
  847. package/dist/rules/token/table-pipe-style.d.ts.map +0 -1
  848. package/dist/rules/token/table-pipe-style.js.map +0 -1
  849. package/dist/rules/token/ul-indent.d.ts.map +0 -1
  850. package/dist/rules/token/ul-indent.js.map +0 -1
  851. package/dist/rules/token/ul-style.d.ts.map +0 -1
  852. package/dist/rules/token/ul-style.js +0 -80
  853. package/dist/rules/token/ul-style.js.map +0 -1
  854. package/dist/rules/types.d.ts +0 -83
  855. package/dist/rules/types.d.ts.map +0 -1
  856. package/dist/rules/utils.d.ts +0 -31
  857. package/dist/rules/utils.d.ts.map +0 -1
  858. package/dist/rules/utils.js +0 -90
  859. package/dist/rules/utils.js.map +0 -1
  860. package/dist/scopes/extractor.d.ts +0 -7
  861. package/dist/scopes/extractor.d.ts.map +0 -1
  862. package/dist/scopes/extractor.js +0 -536
  863. package/dist/scopes/extractor.js.map +0 -1
  864. package/dist/scopes/selector.d.ts +0 -51
  865. package/dist/scopes/selector.d.ts.map +0 -1
  866. package/dist/scopes/selector.js +0 -121
  867. package/dist/scopes/selector.js.map +0 -1
  868. package/dist/scopes/sentences.d.ts +0 -15
  869. package/dist/scopes/sentences.d.ts.map +0 -1
  870. package/dist/scopes/sentences.js +0 -202
  871. package/dist/scopes/sentences.js.map +0 -1
  872. package/dist/scopes/types.d.ts +0 -46
  873. package/dist/scopes/types.d.ts.map +0 -1
  874. package/dist/scopes/vocabulary.d.ts +0 -16
  875. package/dist/scopes/vocabulary.d.ts.map +0 -1
  876. package/dist/scopes/vocabulary.js +0 -70
  877. package/dist/scopes/vocabulary.js.map +0 -1
  878. package/dist/types/assertions.d.ts +0 -119
  879. package/dist/types/assertions.d.ts.map +0 -1
  880. package/dist/types/reporting.d.ts +0 -32
  881. package/dist/types/reporting.d.ts.map +0 -1
  882. package/dist/types/rules.d.ts +0 -41
  883. package/dist/types/rules.d.ts.map +0 -1
  884. package/dist/types/validation.d.ts +0 -6
  885. package/dist/types/validation.d.ts.map +0 -1
  886. /package/{dist → lib}/core/auto-fix.d.ts +0 -0
  887. /package/{dist → lib}/core/directives.d.ts +0 -0
  888. /package/{dist → lib}/data/markdoc-realm-schema.d.ts +0 -0
  889. /package/{dist → lib}/data/proper-nouns.d.ts +0 -0
  890. /package/{dist → lib}/metrics/index.d.ts +0 -0
  891. /package/{dist → lib}/metrics/index.d.ts.map +0 -0
  892. /package/{dist → lib}/metrics/index.js +0 -0
  893. /package/{dist → lib}/metrics/index.js.map +0 -0
  894. /package/{dist → lib}/parser/types.d.ts +0 -0
  895. /package/{dist → lib}/parser/types.js +0 -0
  896. /package/{dist → lib}/parser/types.js.map +0 -0
  897. /package/{dist → lib}/rules/scope/capitalization.d.ts +0 -0
  898. /package/{dist → lib}/rules/scope/conditional.d.ts +0 -0
  899. /package/{dist → lib}/rules/scope/consistency.d.ts +0 -0
  900. /package/{dist → lib}/rules/scope/length.d.ts +0 -0
  901. /package/{dist → lib}/rules/scope/max-image-size.d.ts +0 -0
  902. /package/{dist → lib}/rules/scope/occurrence.d.ts +0 -0
  903. /package/{dist → lib}/rules/scope/pattern.d.ts +0 -0
  904. /package/{dist → lib}/rules/scope/repetition.d.ts +0 -0
  905. /package/{dist → lib}/rules/scope/semantic-line-breaks.d.ts +0 -0
  906. /package/{dist → lib}/rules/scope/swap.d.ts +0 -0
  907. /package/{dist → lib}/rules/token/blanks-around-fences.d.ts +0 -0
  908. /package/{dist → lib}/rules/token/blanks-around-fences.js +0 -0
  909. /package/{dist → lib}/rules/token/blanks-around-headings.d.ts +0 -0
  910. /package/{dist → lib}/rules/token/blanks-around-lists.d.ts +0 -0
  911. /package/{dist → lib}/rules/token/blanks-around-tables.d.ts +0 -0
  912. /package/{dist → lib}/rules/token/code-block-style.d.ts +0 -0
  913. /package/{dist → lib}/rules/token/code-block-style.js +0 -0
  914. /package/{dist → lib}/rules/token/code-fence-style.d.ts +0 -0
  915. /package/{dist → lib}/rules/token/code-fence-style.js +0 -0
  916. /package/{dist → lib}/rules/token/commands-show-output.d.ts +0 -0
  917. /package/{dist → lib}/rules/token/commands-show-output.js +0 -0
  918. /package/{dist → lib}/rules/token/descriptive-link-text.d.ts +0 -0
  919. /package/{dist → lib}/rules/token/emphasis-style.d.ts +0 -0
  920. /package/{dist → lib}/rules/token/emphasis-style.d.ts.map +0 -0
  921. /package/{dist → lib}/rules/token/emphasis-style.js +0 -0
  922. /package/{dist → lib}/rules/token/emphasis-style.js.map +0 -0
  923. /package/{dist → lib}/rules/token/fenced-code-language.d.ts +0 -0
  924. /package/{dist → lib}/rules/token/fenced-code-language.js +0 -0
  925. /package/{dist → lib}/rules/token/first-line-h1.d.ts +0 -0
  926. /package/{dist → lib}/rules/token/front-matter.d.ts +0 -0
  927. /package/{dist → lib}/rules/token/heading-increment.d.ts +0 -0
  928. /package/{dist → lib}/rules/token/heading-start-left.d.ts +0 -0
  929. /package/{dist → lib}/rules/token/heading-start-left.js +0 -0
  930. /package/{dist → lib}/rules/token/heading-style.d.ts +0 -0
  931. /package/{dist → lib}/rules/token/heading-style.js +0 -0
  932. /package/{dist → lib}/rules/token/hr-style.d.ts +0 -0
  933. /package/{dist → lib}/rules/token/hr-style.js +0 -0
  934. /package/{dist → lib}/rules/token/line-length.d.ts +0 -0
  935. /package/{dist → lib}/rules/token/link-fragments.d.ts +0 -0
  936. /package/{dist → lib}/rules/token/link-image-reference-definitions.d.ts +0 -0
  937. /package/{dist → lib}/rules/token/link-image-reference-definitions.js +0 -0
  938. /package/{dist → lib}/rules/token/link-image-style.d.ts +0 -0
  939. /package/{dist → lib}/rules/token/list-indent.d.ts +0 -0
  940. /package/{dist → lib}/rules/token/list-indent.js +0 -0
  941. /package/{dist → lib}/rules/token/list-length.d.ts +0 -0
  942. /package/{dist → lib}/rules/token/list-marker-space.d.ts +0 -0
  943. /package/{dist → lib}/rules/token/list-marker-space.js +0 -0
  944. /package/{dist → lib}/rules/token/markdoc-attributes.d.ts +0 -0
  945. /package/{dist → lib}/rules/token/markdoc-pairing.d.ts +0 -0
  946. /package/{dist → lib}/rules/token/markdoc-syntax.d.ts +0 -0
  947. /package/{dist → lib}/rules/token/markdoc-unknown-tag.d.ts +0 -0
  948. /package/{dist → lib}/rules/token/messages.d.ts +0 -0
  949. /package/{dist → lib}/rules/token/messages.d.ts.map +0 -0
  950. /package/{dist → lib}/rules/token/messages.js +0 -0
  951. /package/{dist → lib}/rules/token/messages.js.map +0 -0
  952. /package/{dist → lib}/rules/token/no-alt-text.d.ts +0 -0
  953. /package/{dist → lib}/rules/token/no-bare-urls.d.ts +0 -0
  954. /package/{dist → lib}/rules/token/no-blanks-blockquote.d.ts +0 -0
  955. /package/{dist → lib}/rules/token/no-blanks-blockquote.js +0 -0
  956. /package/{dist → lib}/rules/token/no-duplicate-heading.d.ts +0 -0
  957. /package/{dist → lib}/rules/token/no-duplicate-link-destinations.d.ts +0 -0
  958. /package/{dist → lib}/rules/token/no-emphasis-as-heading.d.ts +0 -0
  959. /package/{dist → lib}/rules/token/no-empty-headings.d.ts +0 -0
  960. /package/{dist → lib}/rules/token/no-empty-links.d.ts +0 -0
  961. /package/{dist → lib}/rules/token/no-empty-links.js +0 -0
  962. /package/{dist → lib}/rules/token/no-hard-tabs.d.ts +0 -0
  963. /package/{dist → lib}/rules/token/no-hard-tabs.js +0 -0
  964. /package/{dist → lib}/rules/token/no-inline-html.d.ts +0 -0
  965. /package/{dist → lib}/rules/token/no-missing-space-atx.d.ts +0 -0
  966. /package/{dist → lib}/rules/token/no-missing-space-atx.d.ts.map +0 -0
  967. /package/{dist → lib}/rules/token/no-missing-space-atx.js +0 -0
  968. /package/{dist → lib}/rules/token/no-missing-space-atx.js.map +0 -0
  969. /package/{dist → lib}/rules/token/no-missing-space-closed-atx.d.ts +0 -0
  970. /package/{dist → lib}/rules/token/no-missing-space-closed-atx.d.ts.map +0 -0
  971. /package/{dist → lib}/rules/token/no-missing-space-closed-atx.js +0 -0
  972. /package/{dist → lib}/rules/token/no-missing-space-closed-atx.js.map +0 -0
  973. /package/{dist → lib}/rules/token/no-multiple-blanks.d.ts +0 -0
  974. /package/{dist → lib}/rules/token/no-multiple-blanks.js +0 -0
  975. /package/{dist → lib}/rules/token/no-multiple-space-blockquote.d.ts +0 -0
  976. /package/{dist → lib}/rules/token/no-multiple-space-blockquote.d.ts.map +0 -0
  977. /package/{dist → lib}/rules/token/no-multiple-space-blockquote.js +0 -0
  978. /package/{dist → lib}/rules/token/no-multiple-space-blockquote.js.map +0 -0
  979. /package/{dist → lib}/rules/token/no-multiple-space-closed-atx.d.ts +0 -0
  980. /package/{dist → lib}/rules/token/no-multiple-space-closed-atx.js +0 -0
  981. /package/{dist → lib}/rules/token/no-reversed-links.d.ts +0 -0
  982. /package/{dist → lib}/rules/token/no-reversed-links.js +0 -0
  983. /package/{dist → lib}/rules/token/no-space-in-code.d.ts +0 -0
  984. /package/{dist → lib}/rules/token/no-space-in-code.js +0 -0
  985. /package/{dist → lib}/rules/token/no-space-in-emphasis.d.ts +0 -0
  986. /package/{dist → lib}/rules/token/no-space-in-links.d.ts +0 -0
  987. /package/{dist → lib}/rules/token/no-space-in-links.js +0 -0
  988. /package/{dist → lib}/rules/token/no-trailing-punctuation.d.ts +0 -0
  989. /package/{dist → lib}/rules/token/no-trailing-punctuation.js +0 -0
  990. /package/{dist → lib}/rules/token/no-trailing-spaces.d.ts +0 -0
  991. /package/{dist → lib}/rules/token/no-trailing-spaces.js +0 -0
  992. /package/{dist → lib}/rules/token/ol-prefix.d.ts +0 -0
  993. /package/{dist → lib}/rules/token/ol-prefix.js +0 -0
  994. /package/{dist → lib}/rules/token/proper-names.d.ts +0 -0
  995. /package/{dist → lib}/rules/token/reference-links-images.d.ts +0 -0
  996. /package/{dist → lib}/rules/token/reference-links-images.js +0 -0
  997. /package/{dist → lib}/rules/token/required-headings.d.ts +0 -0
  998. /package/{dist → lib}/rules/token/single-h1.d.ts +0 -0
  999. /package/{dist → lib}/rules/token/single-trailing-newline.d.ts +0 -0
  1000. /package/{dist → lib}/rules/token/single-trailing-newline.d.ts.map +0 -0
  1001. /package/{dist → lib}/rules/token/single-trailing-newline.js +0 -0
  1002. /package/{dist → lib}/rules/token/single-trailing-newline.js.map +0 -0
  1003. /package/{dist → lib}/rules/token/strong-style.d.ts +0 -0
  1004. /package/{dist → lib}/rules/token/strong-style.d.ts.map +0 -0
  1005. /package/{dist → lib}/rules/token/strong-style.js +0 -0
  1006. /package/{dist → lib}/rules/token/strong-style.js.map +0 -0
  1007. /package/{dist → lib}/rules/token/table-column-count.d.ts +0 -0
  1008. /package/{dist → lib}/rules/token/table-column-count.js +0 -0
  1009. /package/{dist → lib}/rules/token/table-column-style.d.ts +0 -0
  1010. /package/{dist → lib}/rules/token/table-pipe-style.d.ts +0 -0
  1011. /package/{dist → lib}/rules/token/table-pipe-style.js +0 -0
  1012. /package/{dist → lib}/rules/token/ul-indent.d.ts +0 -0
  1013. /package/{dist → lib}/rules/token/ul-indent.js +0 -0
  1014. /package/{dist → lib}/rules/token/ul-style.d.ts +0 -0
  1015. /package/{dist → lib}/rules/types.js +0 -0
  1016. /package/{dist → lib}/rules/types.js.map +0 -0
  1017. /package/{dist → lib}/scopes/types.js +0 -0
  1018. /package/{dist → lib}/scopes/types.js.map +0 -0
  1019. /package/{dist → lib}/types/assertions.js +0 -0
  1020. /package/{dist → lib}/types/assertions.js.map +0 -0
  1021. /package/{dist → lib}/types/index.d.ts +0 -0
  1022. /package/{dist → lib}/types/index.d.ts.map +0 -0
  1023. /package/{dist → lib}/types/index.js +0 -0
  1024. /package/{dist → lib}/types/index.js.map +0 -0
  1025. /package/{dist → lib}/types/problems.d.ts +0 -0
  1026. /package/{dist → lib}/types/problems.d.ts.map +0 -0
  1027. /package/{dist → lib}/types/problems.js +0 -0
  1028. /package/{dist → lib}/types/problems.js.map +0 -0
  1029. /package/{dist → lib}/types/reporting.js +0 -0
  1030. /package/{dist → lib}/types/reporting.js.map +0 -0
  1031. /package/{dist → lib}/types/rules.js +0 -0
  1032. /package/{dist → lib}/types/rules.js.map +0 -0
  1033. /package/{dist → lib}/types/validation.js +0 -0
  1034. /package/{dist → lib}/types/validation.js.map +0 -0
@@ -0,0 +1,1260 @@
1
+ /**
2
+ * `recheck/microsoft`: rules from the Microsoft Writing Style Guide
3
+ * (https://learn.microsoft.com/en-us/style-guide/welcome/).
4
+ *
5
+ * Source: Microsoft Writing Style Guide
6
+ * Canonical URL: https://learn.microsoft.com/en-us/style-guide/welcome/
7
+ * Upstream status: archived on 2024-11-13, but still published.
8
+ * License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). The license
9
+ * is stated in the guide's GitHub repository, not on learn.microsoft.com:
10
+ * https://github.com/MicrosoftDocs/microsoft-style-guide/blob/main/LICENSE
11
+ * Sync date: 2026-07-30.
12
+ *
13
+ * Modified: rules are adapted to Recheck assertions and the wording is
14
+ * paraphrased. Each rule links to its source page. See
15
+ * `packages/recheck/presets/microsoft/PROVENANCE.md` for the rule-to-source table
16
+ * and the guide entries that were left out.
17
+ *
18
+ * Structure rules are `error`. Voice, punctuation and UI verb rules are `warn`.
19
+ * No rule fixes anything (see the end of `buildMicrosoftPreset`), because
20
+ * automatic swaps changed the meaning of correct text in testing.
21
+ *
22
+ * Left out on purpose: terms the guide allows in developer content (`header`,
23
+ * `context menu`, `disk`, `directory`), points where the guide contradicts
24
+ * itself (`%` vs. "percent", `etc.`), and a readability `metric` rule, because
25
+ * the guide gives no readability score.
26
+ */
27
+ const CAPITALIZATION = 'https://learn.microsoft.com/en-us/style-guide/capitalization';
28
+ const HEADINGS = 'https://learn.microsoft.com/en-us/style-guide/scannable-content/headings';
29
+ const COLONS = 'https://learn.microsoft.com/en-us/style-guide/punctuation/colons';
30
+ const VERSUS_VS = 'https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/v/versus-vs';
31
+ const ACCESSIBILITY_WRITING = 'https://learn.microsoft.com/en-us/style-guide/accessibility/writing-all-abilities';
32
+ const APOSTROPHES = 'https://learn.microsoft.com/en-us/style-guide/punctuation/apostrophes';
33
+ const ACRONYMS = 'https://learn.microsoft.com/en-us/style-guide/acronyms';
34
+ const LISTS = 'https://learn.microsoft.com/en-us/style-guide/scannable-content/lists';
35
+ const TABLES = 'https://learn.microsoft.com/en-us/style-guide/scannable-content/tables';
36
+ const PERIODS = 'https://learn.microsoft.com/en-us/style-guide/punctuation/periods';
37
+ const TOP_10_TIPS = 'https://learn.microsoft.com/en-us/style-guide/top-10-tips-style-voice';
38
+ const DASHES_HYPHENS = 'https://learn.microsoft.com/en-us/style-guide/punctuation/dashes-hyphens/';
39
+ const NUMBERS = 'https://learn.microsoft.com/en-us/style-guide/numbers';
40
+ const QUOTATION_MARKS = 'https://learn.microsoft.com/en-us/style-guide/punctuation/quotation-marks';
41
+ const ALTERNATIVE_TEXT = 'https://learn.microsoft.com/en-us/style-guide/accessibility/alternative-text';
42
+ const URLS_WEB_ADDRESSES = 'https://learn.microsoft.com/en-us/style-guide/urls-web-addresses';
43
+ const USE_CONTRACTIONS = 'https://learn.microsoft.com/en-us/style-guide/word-choice/use-contractions';
44
+ const USE_US_SPELLING = 'https://learn.microsoft.com/en-us/style-guide/word-choice/use-us-spelling-avoid-non-english-words';
45
+ const USE_SIMPLE_WORDS = 'https://learn.microsoft.com/en-us/style-guide/word-choice/use-simple-words-concise-sentences';
46
+ const DONT_USE_COMMON_WORDS = 'https://learn.microsoft.com/en-us/style-guide/word-choice/dont-use-common-words-in-new-ways';
47
+ const AVOID_JARGON = 'https://learn.microsoft.com/en-us/style-guide/word-choice/avoid-jargon';
48
+ const BIAS_FREE = 'https://learn.microsoft.com/en-us/style-guide/bias-free-communication';
49
+ const MILITARISTIC_LANGUAGE = 'https://learn.microsoft.com/en-us/style-guide/militaristic-language';
50
+ const ACCESSIBILITY_TERMS = 'https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/accessibility-terms';
51
+ const AZ_BASE = 'https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/';
52
+ const DESCRIBING_UI = 'https://learn.microsoft.com/en-us/style-guide/procedures-instructions/describing-interactions-with-ui';
53
+ const FORMATTING_TEXT_IN_INSTRUCTIONS = 'https://learn.microsoft.com/en-us/style-guide/procedures-instructions/formatting-text-in-instructions';
54
+ const MASTER_SLAVE = 'https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/m/master-slave';
55
+ function swapRule(opts) {
56
+ return {
57
+ severity: opts.severity ?? 'warn',
58
+ scope: opts.scope ?? 'summary',
59
+ link: opts.link,
60
+ message: opts.message,
61
+ ...(opts.fix === false ? { fix: false } : {}),
62
+ assertions: {
63
+ swap: {
64
+ pairs: opts.pairs,
65
+ ignoreCase: opts.ignoreCase,
66
+ wordBoundary: opts.wordBoundary,
67
+ keysAreRegex: opts.keysAreRegex,
68
+ },
69
+ },
70
+ };
71
+ }
72
+ function patternRule(opts) {
73
+ return {
74
+ severity: opts.severity ?? 'warn',
75
+ scope: opts.scope ?? 'summary',
76
+ link: opts.link,
77
+ message: opts.message,
78
+ assertions: {
79
+ pattern: {
80
+ tokens: opts.tokens,
81
+ ignoreCase: opts.ignoreCase,
82
+ includeCode: opts.includeCode,
83
+ },
84
+ },
85
+ };
86
+ }
87
+ function tokenRule(opts) {
88
+ return {
89
+ severity: opts.severity ?? 'error',
90
+ link: opts.link,
91
+ message: opts.message,
92
+ assertions: { [opts.name]: opts.options ?? {} },
93
+ };
94
+ }
95
+ export function buildMicrosoftPreset() {
96
+ const rules = {};
97
+ // Structure
98
+ rules['microsoft/heading-sentence-case'] = {
99
+ severity: 'error',
100
+ scope: 'heading',
101
+ fix: false,
102
+ link: CAPITALIZATION,
103
+ message: '"%s" should use %s capitalization (Microsoft: sentence case for headings).',
104
+ assertions: { capitalization: { match: '$sentence' } },
105
+ };
106
+ // Only headings, because Microsoft's colon rule is about titles and headings.
107
+ rules['microsoft/capitalize-after-heading-colon'] = patternRule({
108
+ tokens: [':\\s+[a-z]'],
109
+ message: 'Capitalize the first word after a colon in a heading (Microsoft).',
110
+ link: COLONS,
111
+ scope: 'heading',
112
+ });
113
+ rules['microsoft/no-trailing-punctuation'] = tokenRule({
114
+ name: 'no-trailing-punctuation',
115
+ message: "Don't end headings with punctuation (Microsoft).",
116
+ link: HEADINGS,
117
+ });
118
+ rules['microsoft/no-ampersand-in-headings'] = {
119
+ severity: 'warn',
120
+ scope: 'heading',
121
+ link: HEADINGS,
122
+ message: 'Spell out "and"; avoid & and + in headings (Microsoft).',
123
+ exceptions: { lines: ['C++', 'A+', '.NET'] },
124
+ assertions: {
125
+ pattern: { tokens: ['&(?!amp;|nbsp;|lt;|gt;|quot;|#)', '\\+'] },
126
+ },
127
+ };
128
+ // Two scoped rules with opposite directions: `vs.` in headings, "versus" in text.
129
+ rules['microsoft/vs-in-headings'] = swapRule({
130
+ pairs: { versus: 'vs.' },
131
+ message: 'Use "%s" instead of "%s" in headings (Microsoft).',
132
+ link: VERSUS_VS,
133
+ scope: 'heading',
134
+ ignoreCase: true,
135
+ wordBoundary: true,
136
+ });
137
+ // A trailing `\b` after the period in "vs." never matches, so the key starts with
138
+ // `\b` instead. That still stops "revs." from matching.
139
+ rules['microsoft/versus-in-text'] = swapRule({
140
+ pairs: { '\\bvs\\.': 'versus' },
141
+ message: 'Use "%s" instead of "%s" in body text (Microsoft).',
142
+ link: VERSUS_VS,
143
+ scope: ['paragraph', 'list-item', 'table.cell'],
144
+ ignoreCase: true,
145
+ wordBoundary: false,
146
+ keysAreRegex: true,
147
+ });
148
+ rules['microsoft/no-multiple-blanks'] = tokenRule({
149
+ name: 'no-multiple-blanks',
150
+ message: "Don't use extra blank lines to create heading spacing (Microsoft).",
151
+ link: HEADINGS,
152
+ });
153
+ rules['microsoft/no-emphasis-as-heading'] = tokenRule({
154
+ name: 'no-emphasis-as-heading',
155
+ message: 'Use a heading level, not bold or italic text, to show hierarchy (Microsoft).',
156
+ link: ACCESSIBILITY_WRITING,
157
+ });
158
+ // Only the decade form (`1990's`). `API's` is usually a valid possessive.
159
+ rules['microsoft/no-apostrophe-plural-decade'] = patternRule({
160
+ tokens: ["\\b(?:19|20)\\d0['\u2019]s\\b"],
161
+ message: 'Don\'t use an apostrophe to form a plural decade (Microsoft): "%s"',
162
+ link: APOSTROPHES,
163
+ });
164
+ // Each pair must change the text: `'a SQL': 'a SQL'` would flag correct text.
165
+ rules['microsoft/article-before-acronym'] = swapRule({
166
+ pairs: {
167
+ 'an URL': 'a URL',
168
+ 'a ISP': 'an ISP',
169
+ 'an SQL database': 'a SQL database',
170
+ 'an SQL': 'a SQL',
171
+ },
172
+ message: 'Use "%s" instead of "%s" (Microsoft: article choice follows pronunciation).',
173
+ link: ACRONYMS,
174
+ ignoreCase: true,
175
+ wordBoundary: true,
176
+ });
177
+ // A custom regex checks only the first letter. `$sentence` would also lowercase
178
+ // later words.
179
+ rules['microsoft/list-item-capital'] = {
180
+ severity: 'error',
181
+ scope: 'list-item',
182
+ fix: false,
183
+ link: LISTS,
184
+ message: '"%s" should start with a capital letter (Microsoft).',
185
+ assertions: { capitalization: { match: '^[^a-z].*' } },
186
+ };
187
+ rules['microsoft/no-trailing-conjunction-list'] = patternRule({
188
+ tokens: ['[,;]$', '\\b(?:and|or)$'],
189
+ message: 'Don\'t end a list item with a semicolon, comma, or conjunction (Microsoft): "%s"',
190
+ link: LISTS,
191
+ scope: 'list-item',
192
+ ignoreCase: true,
193
+ });
194
+ rules['microsoft/no-ellipsis-column-header'] = patternRule({
195
+ tokens: ['(?:\\.\\.\\.|\u2026)$'],
196
+ message: 'Don\'t end a table column header with an ellipsis (Microsoft): "%s"',
197
+ link: TABLES,
198
+ scope: 'table.header',
199
+ });
200
+ // Only catches a cell that contains just an em dash. A `pattern` token cannot match
201
+ // an empty cell.
202
+ // The trailing `\s*` is inside the optional group so that long whitespace-only
203
+ // cells do not match slowly.
204
+ rules['microsoft/no-blank-table-cell'] = patternRule({
205
+ tokens: ['^\\s*(?:\u2014\\s*)?$'],
206
+ message: 'Use "Not applicable" or "None" instead of an em dash in a table cell (Microsoft).',
207
+ link: TABLES,
208
+ scope: 'table.cell',
209
+ });
210
+ rules['microsoft/single-space-after-punctuation'] = patternRule({
211
+ tokens: ['[.!?:]\\s{2,}(?=[A-Z])'],
212
+ message: 'Use one space, not two, after end punctuation (Microsoft).',
213
+ link: PERIODS,
214
+ });
215
+ // Only em dashes. The guide allows spaces around en dashes in UI timestamps and
216
+ // date ranges, which a regex cannot tell apart.
217
+ rules['microsoft/no-space-around-em-dash'] = patternRule({
218
+ tokens: ['\\s\u2014\\s'],
219
+ message: "Don't use spaces around an em dash (Microsoft).",
220
+ link: DASHES_HYPHENS,
221
+ });
222
+ rules['microsoft/no-from-before-en-dash-range'] = patternRule({
223
+ tokens: ['\\bfrom\\s+\\d+\\s*[\u2013\u2014]\\s*\\d+'],
224
+ message: 'Don\'t use "from" before an en-dash number range (Microsoft): "%s"',
225
+ link: NUMBERS,
226
+ });
227
+ rules['microsoft/straight-quotes'] = swapRule({
228
+ pairs: {
229
+ '\u201c': '"',
230
+ '\u201d': '"',
231
+ '\u2018': "'",
232
+ '\u2019': "'",
233
+ },
234
+ message: 'Use straight quotation marks, not curly ones (Microsoft).',
235
+ link: QUOTATION_MARKS,
236
+ });
237
+ rules['microsoft/spell-out-ordinals'] = patternRule({
238
+ tokens: ['\\b\\d+(?:st|nd|rd|th)\\b'],
239
+ message: 'Spell out ordinal numbers; avoid "%s" (Microsoft).',
240
+ link: NUMBERS,
241
+ });
242
+ rules['microsoft/ordinal-no-ly'] = swapRule({
243
+ pairs: { firstly: 'first', secondly: 'second', thirdly: 'third' },
244
+ message: 'Use "%s" instead of "%s" (Microsoft).',
245
+ link: NUMBERS,
246
+ ignoreCase: true,
247
+ wordBoundary: true,
248
+ });
249
+ rules['microsoft/noon-midnight'] = patternRule({
250
+ tokens: ['\\b12:00\\s*(?:AM|PM|am|pm)\\b'],
251
+ message: 'Use "noon" or "midnight" instead of "%s" (Microsoft).',
252
+ link: NUMBERS,
253
+ });
254
+ rules['microsoft/no-alt-text'] = tokenRule({
255
+ name: 'no-alt-text',
256
+ message: 'Every image needs alt text (Microsoft: accessibility).',
257
+ link: ALTERNATIVE_TEXT,
258
+ });
259
+ rules['microsoft/alt-text-length'] = {
260
+ severity: 'warn',
261
+ scope: 'alt',
262
+ link: ALTERNATIVE_TEXT,
263
+ message: 'Alt text is %s %s long; Microsoft limits it to 150 characters (max %s).',
264
+ assertions: { length: { unit: 'characters', max: 150 } },
265
+ };
266
+ // Does not cover the guide's allowance for fragments.
267
+ rules['microsoft/alt-text-format'] = {
268
+ severity: 'warn',
269
+ scope: 'alt',
270
+ fix: false,
271
+ link: ALTERNATIVE_TEXT,
272
+ message: 'Alt text should start with a capital letter and end with a period (Microsoft).',
273
+ assertions: { capitalization: { match: '^[A-Z].*\\.$' } },
274
+ };
275
+ // Screenshot, Diagram, Photograph, Chart and Drawing are allowed openers, so they
276
+ // are not matched.
277
+ rules['microsoft/alt-text-generic-opener'] = patternRule({
278
+ tokens: ['^(?:Image|Icon|Graphic|Button|Link)\\b'],
279
+ message: 'Don\'t start alt text with a generic word such as "%s" (Microsoft).',
280
+ link: ALTERNATIVE_TEXT,
281
+ scope: 'alt',
282
+ ignoreCase: true,
283
+ });
284
+ rules['microsoft/alt-text-no-filename'] = patternRule({
285
+ tokens: ['\\.(?:png|jpe?g|gif|svg|webp)$'],
286
+ message: "Don't use an image's file name as its alt text (Microsoft).",
287
+ link: ALTERNATIVE_TEXT,
288
+ scope: 'alt',
289
+ ignoreCase: true,
290
+ });
291
+ rules['microsoft/descriptive-link-text'] = tokenRule({
292
+ name: 'descriptive-link-text',
293
+ message: 'Link text should be descriptive, not a generic phrase (Microsoft).',
294
+ link: URLS_WEB_ADDRESSES,
295
+ });
296
+ // Numeric limits from the guide
297
+ // Counts sentences as a stand-in for "lines", which Markdown does not have.
298
+ // Only the upper limit (7) is set, because short single-sentence paragraphs are
299
+ // normal in reference docs.
300
+ rules['microsoft/paragraph-length'] = {
301
+ severity: 'warn',
302
+ scope: 'paragraph',
303
+ link: 'https://learn.microsoft.com/en-us/style-guide/scannable-content/',
304
+ message: 'Paragraph is %s %s long; Microsoft suggests at most 7 (sentences, as a proxy for lines).',
305
+ assertions: { length: { unit: 'sentences', max: 7 } },
306
+ };
307
+ rules['microsoft/list-length'] = tokenRule({
308
+ name: 'list-length',
309
+ message: 'List has %s item(s); Microsoft recommends 2-7 (Microsoft).',
310
+ link: LISTS,
311
+ options: { min: 2, max: 7 },
312
+ severity: 'warn',
313
+ });
314
+ rules['microsoft/comma-density'] = {
315
+ severity: 'warn',
316
+ scope: 'sentence',
317
+ link: 'https://learn.microsoft.com/en-us/style-guide/punctuation/',
318
+ message: 'Sentence has %s commas; Microsoft suggests at most %s.',
319
+ assertions: { occurrence: { pattern: ',', max: 2 } },
320
+ };
321
+ // Voice and contractions
322
+ rules['microsoft/use-contractions'] = swapRule({
323
+ pairs: {
324
+ cannot: "can't",
325
+ 'can not': "can't",
326
+ 'do not': "don't",
327
+ 'does not': "doesn't",
328
+ 'did not': "didn't",
329
+ 'is not': "isn't",
330
+ 'are not': "aren't",
331
+ 'was not': "wasn't",
332
+ 'were not': "weren't",
333
+ 'will not': "won't",
334
+ 'would not': "wouldn't",
335
+ 'should not': "shouldn't",
336
+ 'could not': "couldn't",
337
+ 'have not': "haven't",
338
+ 'has not': "hasn't",
339
+ 'had not': "hadn't",
340
+ 'it is': "it's",
341
+ 'you are': "you're",
342
+ 'we are': "we're",
343
+ 'they are': "they're",
344
+ 'you will': "you'll",
345
+ 'let us': "let's",
346
+ },
347
+ message: 'Microsoft style prefers the contraction "%s" over "%s".',
348
+ link: USE_CONTRACTIONS,
349
+ ignoreCase: true,
350
+ wordBoundary: true,
351
+ });
352
+ rules['microsoft/no-awkward-contractions'] = patternRule({
353
+ tokens: [
354
+ "\\b(?:there['\u2019]d|it['\u2019]ll|they['\u2019]d|that['\u2019]ll|there['\u2019]ll)\\b",
355
+ ],
356
+ message: 'Avoid the ambiguous contraction "%s" (Microsoft).',
357
+ link: USE_CONTRACTIONS,
358
+ ignoreCase: true,
359
+ });
360
+ rules['microsoft/contraction-consistency'] = {
361
+ severity: 'warn',
362
+ scope: 'summary',
363
+ link: USE_CONTRACTIONS,
364
+ message: '"%s" conflicts with the first-used form "%s" in this file (Microsoft).',
365
+ assertions: {
366
+ consistency: {
367
+ ignoreCase: true,
368
+ either: {
369
+ "can't": 'cannot',
370
+ "don't": 'do not',
371
+ "won't": 'will not',
372
+ "isn't": 'is not',
373
+ "it's": 'it is',
374
+ },
375
+ },
376
+ },
377
+ };
378
+ rules['microsoft/no-weak-phrasing'] = patternRule({
379
+ tokens: ['\\bthere (?:is|are|was|were)\\b'],
380
+ message: 'Avoid weak phrasing such as "%s"; start the sentence with a verb (Microsoft).',
381
+ link: TOP_10_TIPS,
382
+ scope: ['paragraph', 'list-item'],
383
+ ignoreCase: true,
384
+ });
385
+ rules['microsoft/avoid-please'] = patternRule({
386
+ tokens: ['\\bplease\\b'],
387
+ message: 'Avoid "%s" except when asking the customer to do something inconvenient (Microsoft).',
388
+ link: 'https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/p/please',
389
+ ignoreCase: true,
390
+ });
391
+ // US spelling, Latin abbreviations and simple words
392
+ // One pair per word form instead of a pattern with groups, because a swap uses
393
+ // fixed replacement text. For example "modelling" and "modeled" need separate pairs.
394
+ // `dialogue box` is left out because `microsoft/dialog-terminology` covers it.
395
+ // `centre`, `centres`, `catalogue` and `catalogues` are in `us-spelling-detect`.
396
+ rules['microsoft/us-spelling'] = swapRule({
397
+ pairs: {
398
+ '\\bcentred\\b': 'centered',
399
+ '\\bcentring\\b': 'centering',
400
+ '\\bcatalogued\\b': 'cataloged',
401
+ '\\bcataloguing\\b': 'cataloging',
402
+ '\\bcancelled\\b': 'canceled',
403
+ '\\bcancelling\\b': 'canceling',
404
+ '\\bfavourite\\b': 'favorite',
405
+ '\\bauthorise\\b': 'authorize',
406
+ '\\bauthorises\\b': 'authorizes',
407
+ '\\bauthorised\\b': 'authorized',
408
+ '\\bauthorising\\b': 'authorizing',
409
+ '\\bauthorisation\\b': 'authorization',
410
+ '\\bcustomise\\b': 'customize',
411
+ '\\bcustomises\\b': 'customizes',
412
+ '\\bcustomised\\b': 'customized',
413
+ '\\bcustomising\\b': 'customizing',
414
+ '\\bcustomisation\\b': 'customization',
415
+ '\\blabelled\\b': 'labeled',
416
+ '\\blabelling\\b': 'labeling',
417
+ '\\bmodelled\\b': 'modeled',
418
+ '\\bmodelling\\b': 'modeling',
419
+ },
420
+ message: 'Use the US spelling "%s" instead of "%s" (Microsoft).',
421
+ link: USE_US_SPELLING,
422
+ severity: 'error',
423
+ ignoreCase: true,
424
+ keysAreRegex: true,
425
+ wordBoundary: false,
426
+ });
427
+ // These words are also in proper names, such as "Bell Centre", "Centre County"
428
+ // and "Catalogue of Life".
429
+ rules['microsoft/us-spelling-detect'] = swapRule({
430
+ pairs: {
431
+ '\\bcentre\\b': 'center',
432
+ '\\bcentres\\b': 'centers',
433
+ '\\bcatalogue\\b': 'catalog',
434
+ '\\bcatalogues\\b': 'catalogs',
435
+ },
436
+ message: 'Use the US spelling "%s" instead of "%s" (Microsoft).',
437
+ link: USE_US_SPELLING,
438
+ severity: 'error',
439
+ fix: false,
440
+ ignoreCase: true,
441
+ keysAreRegex: true,
442
+ wordBoundary: false,
443
+ });
444
+ // `e.g.` and `i.e.` start with `\b` only, because a trailing `\b` after the period
445
+ // never matches. `de facto`, `ad hoc` and `vis-a-vis` are in the `-detect` rule,
446
+ // because the guide gives no replacement for them.
447
+ rules['microsoft/no-latin-abbreviations'] = swapRule({
448
+ pairs: {
449
+ '\\be\\.g\\.,?': 'for example',
450
+ '\\bi\\.e\\.,?': 'that is',
451
+ '\\bviz\\.': 'namely',
452
+ '\\bergo\\b': 'therefore',
453
+ },
454
+ message: 'Use "%s" instead of "%s" (Microsoft).',
455
+ link: USE_US_SPELLING,
456
+ severity: 'warn',
457
+ fix: false,
458
+ ignoreCase: true,
459
+ wordBoundary: false,
460
+ keysAreRegex: true,
461
+ });
462
+ rules['microsoft/no-latin-abbreviations-detect'] = patternRule({
463
+ tokens: ['\\bde facto\\b', '\\bad hoc\\b', '\\bvis-[\u00e0a]-vis\\b'],
464
+ message: 'Microsoft style: avoid the non-English phrase "%s" — no single replacement is prescribed; rewrite for the context (Microsoft).',
465
+ link: USE_US_SPELLING,
466
+ severity: 'error',
467
+ ignoreCase: true,
468
+ });
469
+ // `in addition` skips "in addition to", which is correct.
470
+ rules['microsoft/simple-words'] = swapRule({
471
+ pairs: {
472
+ '\\butilize\\b': 'use',
473
+ '\\butilise\\b': 'use',
474
+ '\\bmake use of\\b': 'use',
475
+ '\\bin order to\\b': 'to',
476
+ '\\bas a means to\\b': 'to',
477
+ '\\bin addition\\b(?!\\s+to\\b)': 'also',
478
+ '\\bestablish connectivity\\b': 'connect',
479
+ '\\binform\\b': 'tell',
480
+ },
481
+ message: 'Use "%s" instead of "%s" (Microsoft).',
482
+ link: USE_SIMPLE_WORDS,
483
+ severity: 'warn',
484
+ fix: false,
485
+ ignoreCase: true,
486
+ keysAreRegex: true,
487
+ wordBoundary: false,
488
+ });
489
+ rules['microsoft/leverage'] = swapRule({
490
+ pairs: { leverage: 'use', leveraging: 'using', leveraged: 'used' },
491
+ message: 'Rewrite "%s" using "%s" (Microsoft): only the VERB sense ("leverage the API") is targeted — "leverage"/"leveraged" are also common, correct nouns/adjectives ("financial leverage", "a leveraged buyout") a blind substitution would corrupt.',
492
+ link: AVOID_JARGON,
493
+ severity: 'error',
494
+ fix: false,
495
+ ignoreCase: true,
496
+ wordBoundary: true,
497
+ });
498
+ rules['microsoft/glyph'] = swapRule({
499
+ pairs: { glyph: 'symbol' },
500
+ message: 'Use "%s" instead of "%s" (Microsoft) when referring generically to a UI icon/image — but it\'s OK to use "glyph" in a technical discussion of fonts and characters.',
501
+ link: AVOID_JARGON,
502
+ severity: 'error',
503
+ fix: false,
504
+ ignoreCase: true,
505
+ wordBoundary: true,
506
+ });
507
+ rules['microsoft/bucketize'] = swapRule({
508
+ pairs: { bucketize: 'group' },
509
+ message: 'Use "%s" instead of "%s" (Microsoft).',
510
+ link: DONT_USE_COMMON_WORDS,
511
+ severity: 'warn',
512
+ fix: false,
513
+ ignoreCase: true,
514
+ wordBoundary: true,
515
+ });
516
+ // Only matches the verb with an object, since "the impact of" is a valid noun use.
517
+ rules['microsoft/impact-verb'] = patternRule({
518
+ tokens: [
519
+ '\\bimpact(?:s|ed|ing)?\\s+(?:performance|productivity|quality|reliability|availability|latency|throughput)\\b',
520
+ ],
521
+ message: 'Use "affect" instead of "impact" as a verb (Microsoft): "%s"',
522
+ link: DONT_USE_COMMON_WORDS,
523
+ });
524
+ // Skips the bid/ask market sense of "the ask".
525
+ rules['microsoft/the-ask'] = swapRule({
526
+ pairs: {
527
+ '\\bthe ask\\b(?!\\s+(?:tick|ticks|price|prices|spread|spreads|size|quote|quotes)\\b)': 'the request',
528
+ },
529
+ message: 'Use "%s" instead of "%s" (Microsoft).',
530
+ link: DONT_USE_COMMON_WORDS,
531
+ fix: false,
532
+ ignoreCase: true,
533
+ keysAreRegex: true,
534
+ wordBoundary: false,
535
+ });
536
+ // Bias-free, militaristic and derogatory language
537
+ // `DMZ` skips the DMZ between North and South Korea.
538
+ rules['microsoft/bias-free-terms'] = swapRule({
539
+ pairs: {
540
+ chairman: 'chair',
541
+ chairwoman: 'chair',
542
+ mankind: 'humanity',
543
+ manmade: 'synthetic',
544
+ 'man-made': 'synthetic',
545
+ manpower: 'workforce',
546
+ salesman: 'sales representative',
547
+ salesmen: 'sales representatives',
548
+ 'demilitarized zone': 'perimeter network',
549
+ '\\bDMZ\\b(?!\\s+(?:dividing|between|separating)\\b)': 'perimeter network',
550
+ 'screened subnet': 'perimeter network',
551
+ },
552
+ message: 'Use "%s" instead of "%s" (Microsoft: bias-free communication).',
553
+ link: BIAS_FREE,
554
+ severity: 'error',
555
+ fix: false,
556
+ ignoreCase: true,
557
+ keysAreRegex: true,
558
+ wordBoundary: true,
559
+ });
560
+ // The two Microsoft pages agree the term is wrong but suggest different
561
+ // replacements, so this only reports it.
562
+ rules['microsoft/master-slave'] = patternRule({
563
+ tokens: ['\\bmaster\\s*/\\s*slave\\b', '\\bmaster-slave\\b'],
564
+ message: 'Avoid "%s" (Microsoft): the guide\'s two pages disagree on the replacement — use "primary/subordinate" (bias-free-communication) or "primary/replica" (also acceptable: primary/secondary, principal/agent, controller/worker; a-z/master-slave) depending on context.',
565
+ link: MASTER_SLAVE,
566
+ severity: 'error',
567
+ ignoreCase: true,
568
+ });
569
+ rules['microsoft/cyberattack-spelling'] = swapRule({
570
+ pairs: {
571
+ 'cyber attack': 'cyberattack',
572
+ 'cyber-attack': 'cyberattack',
573
+ 'cyber threat': 'cyberthreat',
574
+ 'cyber-threat': 'cyberthreat',
575
+ },
576
+ message: 'Use "%s" instead of "%s" (Microsoft).',
577
+ link: MILITARISTIC_LANGUAGE,
578
+ severity: 'error',
579
+ ignoreCase: true,
580
+ wordBoundary: true,
581
+ });
582
+ rules['microsoft/no-derogatory-slang'] = patternRule({
583
+ tokens: ['\\bpimp\\b', '\\bbitch\\b', '\\bspirit animal\\b'],
584
+ message: 'Avoid the derogatory or culturally appropriative term "%s" (Microsoft).',
585
+ link: BIAS_FREE,
586
+ severity: 'error',
587
+ ignoreCase: true,
588
+ });
589
+ // `white` and `multiracial` are not included: a capitalized "White" matches too many
590
+ // names, such as White House.
591
+ rules['microsoft/racial-ethnic-capitalization'] = swapRule({
592
+ pairs: {
593
+ asian: 'Asian',
594
+ 'black and african american': 'Black and African American',
595
+ 'hispanic and latinx': 'Hispanic and Latinx',
596
+ 'native american': 'Native American',
597
+ 'alaska native': 'Alaska Native',
598
+ 'native hawaiian': 'Native Hawaiian',
599
+ 'pacific islander': 'Pacific Islander',
600
+ 'indigenous peoples': 'Indigenous Peoples',
601
+ },
602
+ message: 'Use title-style capitalization: "%s" instead of "%s" (Microsoft).',
603
+ link: BIAS_FREE,
604
+ severity: 'error',
605
+ ignoreCase: false,
606
+ wordBoundary: true,
607
+ });
608
+ // Accessibility terms
609
+ // Reports only, with no replacement. "mute" is limited to forms like "is mute" and
610
+ // "deaf-mute", because "mute the audio" is a normal UI phrase. "normal person" and
611
+ // "healthy person" are matched as phrases, because bare "normal" has other meanings,
612
+ // such as a normal distribution.
613
+ rules['microsoft/accessibility-terms'] = patternRule({
614
+ tokens: [
615
+ '\\bcrippled\\b',
616
+ '\\bhandicapped\\b',
617
+ '\\bthe handicapped\\b',
618
+ '\\bpeople with handicaps\\b',
619
+ '\\bslow learner\\b',
620
+ '\\bmentally handicapped\\b',
621
+ '\\bdifferently abled\\b',
622
+ '\\bspecial needs\\b',
623
+ '\\baffected by\\b',
624
+ '\\bstricken with\\b',
625
+ '\\bsuffers from\\b',
626
+ '\\ba victim of\\b',
627
+ '\\bsight-impaired\\b',
628
+ '\\bvision-impaired\\b',
629
+ '\\bhearing-impaired\\b',
630
+ '\\bnon-verbal\\b',
631
+ '\\bmaimed\\b',
632
+ '\\bmissing a limb\\b',
633
+ '\\bbirth defect\\b',
634
+ '\\bSpecial Ed person\\b',
635
+ '\\bnormal person\\b',
636
+ '\\bhealthy person\\b',
637
+ "\\bAsperger['\u2019]s\\b",
638
+ '\\bdumb\\b',
639
+ '\\b(?:is|was|are|were|being|been)\\s+mute\\b',
640
+ '\\bdeaf and mute\\b',
641
+ '\\bdeaf-mute\\b',
642
+ '\\blame\\b',
643
+ '\\bstupid\\b',
644
+ // "an epileptic" is allowed before seizure, episode, fit or attack, where it
645
+ // describes the event.
646
+ '\\ban epileptic\\b(?!\\s+(?:seizure|episode|fit|attack|event))',
647
+ ],
648
+ message: 'Use people-first language instead of "%s" — see the accessibility term collection (Microsoft).',
649
+ link: ACCESSIBILITY_TERMS,
650
+ severity: 'error',
651
+ ignoreCase: true,
652
+ });
653
+ // Spelling and hyphenation
654
+ rules['microsoft/spelling-hyphenation'] = swapRule({
655
+ pairs: {
656
+ '\\be-?mail\\b(?<!email)': 'email',
657
+ '\\bdata ?base\\b(?<!database)': 'database',
658
+ '\\bend ?point\\b(?<!endpoint)': 'endpoint',
659
+ '\\bweb ?site\\b(?<!website)': 'website',
660
+ '\\bweb ?page\\b(?<!webpage)': 'webpage',
661
+ '\\bwork ?station\\b(?<!workstation)': 'workstation',
662
+ '\\bscreen ?shot\\b(?<!screenshot)': 'screenshot',
663
+ '\\btask ?bar\\b(?<!taskbar)': 'taskbar',
664
+ '\\bname ?space\\b(?<!namespace)': 'namespace',
665
+ '\\bplug-in\\b': 'plugin',
666
+ '\\becommerce\\b': 'e-commerce',
667
+ '\\belearning\\b': 'e-learning',
668
+ '\\bebook\\b': 'e-book',
669
+ '\\bcyber-security\\b': 'cybersecurity',
670
+ '\\bco-author\\b': 'coauthor',
671
+ // "dial up" and "single sign on" need no guard: the correct forms are hyphenated,
672
+ // so the pattern cannot match them.
673
+ '\\bdial ?up\\b': 'dial-up',
674
+ '\\bread only\\b': 'read-only',
675
+ '\\bcontext sensitive\\b': 'context-sensitive',
676
+ '\\bsingle sign ?on\\b': 'single sign-on',
677
+ '\\bmulti-factor\\b': 'multifactor',
678
+ '\\bmulti-cloud\\b': 'multicloud',
679
+ '\\bmulti-tenant\\b': 'multitenant',
680
+ '\\bwell-being\\b': 'wellbeing',
681
+ '\\btool ?tip\\b(?<!tooltip)': 'tooltip',
682
+ '\\bimbed\\b': 'embed',
683
+ },
684
+ message: 'Microsoft style spells this "%s", not "%s".',
685
+ link: AZ_BASE + 'e/email',
686
+ severity: 'error',
687
+ ignoreCase: true,
688
+ keysAreRegex: true,
689
+ wordBoundary: false,
690
+ });
691
+ // Case-sensitive and separate from `spelling-hyphenation`, which ignores case and
692
+ // would also match "tooltip".
693
+ rules['microsoft/tooltip-capitalization'] = swapRule({
694
+ pairs: { ToolTip: 'tooltip' },
695
+ message: 'Use "%s", not "%s" (Microsoft: tooltip is one word, lowercase).',
696
+ link: AZ_BASE + 't/tooltip',
697
+ severity: 'error',
698
+ ignoreCase: false,
699
+ wordBoundary: true,
700
+ });
701
+ // Case-only changes
702
+ // Pairs whose replacement is the same word in another casing, such as `Internet`
703
+ // and `internet`. Pairs that need more than a case change are in `az-case-fixable`.
704
+ rules['microsoft/az-case-only'] = swapRule({
705
+ pairs: {
706
+ Internet: 'internet',
707
+ Intranet: 'intranet',
708
+ Extranet: 'extranet',
709
+ Euro: 'euro',
710
+ WWW: 'www',
711
+ Registry: 'registry',
712
+ Spam: 'spam',
713
+ },
714
+ message: 'Use "%s" instead of "%s" (Microsoft): rewrite, this fix would silently no-op.',
715
+ link: AZ_BASE + 'i/internet-intranet-extranet',
716
+ severity: 'error',
717
+ fix: false,
718
+ ignoreCase: false,
719
+ wordBoundary: true,
720
+ });
721
+ // `World Wide Web` is in `world-wide-web`. `boolean` is in `az-case-fixable-detect`,
722
+ // because lowercase `boolean` is the correct OpenAPI type name.
723
+ rules['microsoft/az-case-fixable'] = swapRule({
724
+ pairs: {
725
+ 'Big Data': 'big data',
726
+ 'Dark Mode': 'dark mode',
727
+ darkmode: 'dark mode',
728
+ Devops: 'DevOps',
729
+ devops: 'DevOps',
730
+ bluetooth: 'Bluetooth',
731
+ Javascript: 'JavaScript',
732
+ javascript: 'JavaScript',
733
+ },
734
+ message: 'Use "%s" instead of "%s" (Microsoft).',
735
+ link: AZ_BASE + 'i/internet-intranet-extranet',
736
+ severity: 'error',
737
+ ignoreCase: false,
738
+ wordBoundary: true,
739
+ });
740
+ rules['microsoft/az-case-fixable-detect'] = swapRule({
741
+ pairs: {
742
+ boolean: 'Boolean',
743
+ },
744
+ message: 'Use "%s" instead of "%s" (Microsoft) in ordinary prose -- but lowercase "boolean" is correct and expected when naming the OpenAPI/JSON Schema type.',
745
+ link: AZ_BASE + 'i/internet-intranet-extranet',
746
+ severity: 'error',
747
+ fix: false,
748
+ ignoreCase: false,
749
+ wordBoundary: true,
750
+ });
751
+ rules['microsoft/world-wide-web'] = swapRule({
752
+ pairs: { 'World Wide Web': 'web' },
753
+ message: 'Use "%s" instead of "%s" (Microsoft).',
754
+ link: AZ_BASE + 'i/internet-intranet-extranet',
755
+ severity: 'warn',
756
+ fix: false,
757
+ ignoreCase: false,
758
+ wordBoundary: true,
759
+ });
760
+ // Terms that can also be verbs, such as "whitelist an address". The message says
761
+ // to rewrite instead of replace.
762
+ rules['microsoft/az-verb-able'] = swapRule({
763
+ pairs: {
764
+ blacklist: 'block list',
765
+ whitelist: 'allow list',
766
+ allowlist: 'allow list',
767
+ blocklist: 'block list',
768
+ },
769
+ message: 'Rewrite "%s" using "%s" (Microsoft): a direct substitution may be ungrammatical.',
770
+ link: AZ_BASE + 'b/blacklist',
771
+ severity: 'error',
772
+ fix: false,
773
+ ignoreCase: true,
774
+ wordBoundary: true,
775
+ });
776
+ // A-Z word list
777
+ // Pairs with conditional or several replacements are in `*-detect` rules, which
778
+ // only report.
779
+ // `crash` and `lock up` are in `az-state-failure-detect`: "crash dump" is a noun, and
780
+ // the guide gives different replacements for hardware and software.
781
+ // `hang` skips idioms such as "hang on", "hang up", "get the hang of" and
782
+ // "hang in there".
783
+ rules['microsoft/az-state-failure'] = swapRule({
784
+ pairs: {
785
+ '\\bhangs\\b(?!\\s+(?:on|up|around|out|together|of|in|tight|loose|fire|from|over)\\b)': 'stops responding',
786
+ '\\bhang\\b(?!\\s+(?:on|up|around|out|together|of|in|tight|loose|fire|from|over)\\b)': 'stop responding',
787
+ },
788
+ message: 'Microsoft style: use "%s" instead of "%s".',
789
+ link: AZ_BASE + 'h/hang',
790
+ severity: 'warn',
791
+ fix: false,
792
+ ignoreCase: true,
793
+ keysAreRegex: true,
794
+ wordBoundary: false,
795
+ });
796
+ // `crash` skips noun compounds such as "crash dump".
797
+ rules['microsoft/az-state-failure-detect'] = patternRule({
798
+ tokens: ['\\bcrash\\b(?!\\s+(?:dump|report|log|course|test|site)\\b)', '\\block up\\b'],
799
+ message: 'Microsoft style: "%s" needs a context-specific replacement (fail for hardware, stop responding for programs).',
800
+ link: AZ_BASE + 'c/crash',
801
+ severity: 'error',
802
+ ignoreCase: true,
803
+ });
804
+ // `terminate` is not included: "terminate the instance" is normal cloud wording.
805
+ // `quit`, `deinstall` and `reinitialize` are in the `-detect` rule. `exit`, `launch`
806
+ // and `boot` skip noun uses such as "exit code", "product launch" and "boot disk".
807
+ rules['microsoft/az-lifecycle-verbs'] = swapRule({
808
+ pairs: {
809
+ '\\bcarry out\\b': 'run',
810
+ '(?<!\\b(?:the|an|no|emergency)\\s)\\bexit\\b(?!\\s+(?:code|status|button|sign|strategy|interview|poll|ramp|velocity|row)\\b)': 'close',
811
+ '(?<!\\b(?:product|software|game|website|app|feature|rocket|mission)\\s)\\blaunch\\b(?!\\s+(?:date|event|party|window|site|pad|day|plan|schedule|announcement)\\b)': 'open',
812
+ '\\bboot\\b(?!\\s+(?:disk|sector|loader|sequence|process|time|options?|record|partition|menu|order|camera)\\b)': 'turn on',
813
+ '\\bundelete\\b': 'restore',
814
+ '\\binstantiate\\b': 'create an instance of',
815
+ '\\biconize\\b': 'minimize',
816
+ },
817
+ message: 'Microsoft style: use "%s" instead of "%s".',
818
+ link: AZ_BASE + 'b/boot',
819
+ severity: 'warn',
820
+ fix: false,
821
+ ignoreCase: true,
822
+ keysAreRegex: true,
823
+ wordBoundary: false,
824
+ });
825
+ rules['microsoft/az-lifecycle-verbs-detect'] = patternRule({
826
+ tokens: ['\\bquit\\b', '\\bdeinstall\\b', '\\breinitialize\\b'],
827
+ message: 'Microsoft style: "%s" needs a context-specific replacement or carries a conditional exception — see the a-z word list before rewriting.',
828
+ link: AZ_BASE + 'q/quit',
829
+ severity: 'error',
830
+ ignoreCase: true,
831
+ });
832
+ // `deprecated` is not included: it is correct OpenAPI wording, and the guide only
833
+ // discourages it for general audiences. `SKU` and `SMB` are not included because
834
+ // they are also common technical terms, such as a product SKU or the SMB protocol.
835
+ rules['microsoft/az-judgment-words'] = swapRule({
836
+ pairs: {
837
+ '\\bfinalize\\b': 'finish',
838
+ '\\bbug fix\\b': 'software update',
839
+ '\\bbeta\\b(?!\\s+(?:distribution|function|coefficient|particle|blocker|decay)\\b)': 'preview',
840
+ '\\bEULA\\b': 'license terms',
841
+ '\\bEnd-User License Agreement\\b': 'license terms',
842
+ },
843
+ message: 'Microsoft style: use "%s" instead of "%s".',
844
+ link: AZ_BASE + 'f/finalize',
845
+ severity: 'warn',
846
+ fix: false,
847
+ ignoreCase: true,
848
+ keysAreRegex: true,
849
+ wordBoundary: false,
850
+ });
851
+ rules['microsoft/actionable'] = patternRule({
852
+ tokens: ['\\bactionable\\b'],
853
+ message: 'Avoid "%s"; rewrite using "that you can act on" (Microsoft).',
854
+ link: AZ_BASE + 'a/actionable',
855
+ ignoreCase: true,
856
+ });
857
+ // "U.S." and "U.S.A." start with `\b` only, because a trailing `\b` after the period
858
+ // never matches. `thank you` is in `az-geography-detect`.
859
+ rules['microsoft/az-geography'] = swapRule({
860
+ pairs: {
861
+ '\\bFar East\\b': 'East Asia',
862
+ },
863
+ message: 'Microsoft style: use "%s" instead of "%s".',
864
+ link: AZ_BASE + 'f/far-east',
865
+ severity: 'warn',
866
+ fix: false,
867
+ ignoreCase: true,
868
+ keysAreRegex: true,
869
+ wordBoundary: false,
870
+ });
871
+ // Some organization names keep these forms, such as "USA Gymnastics" and
872
+ // "U.S. Bank".
873
+ rules['microsoft/usa-abbreviation'] = swapRule({
874
+ pairs: {
875
+ '\\bUSA\\b': 'US',
876
+ '\\bU\\.S\\.A\\.': 'US',
877
+ '\\bU\\.S\\.': 'US',
878
+ },
879
+ message: 'Microsoft style: use "%s" instead of "%s".',
880
+ link: AZ_BASE + 'f/far-east',
881
+ severity: 'warn',
882
+ fix: false,
883
+ ignoreCase: true,
884
+ keysAreRegex: true,
885
+ wordBoundary: false,
886
+ });
887
+ rules['microsoft/az-geography-detect'] = patternRule({
888
+ tokens: ['\\bthank you\\b'],
889
+ message: 'Microsoft style: prefer "thanks" over "%s" in most content — see the a-z word list for the formal/serious-content exception.',
890
+ link: AZ_BASE + 't/thanks-thank-you',
891
+ severity: 'error',
892
+ ignoreCase: true,
893
+ });
894
+ // `bottom left` and `bottom right` are in the `-detect` rule, because they are also
895
+ // API property names such as `BottomLeft`.
896
+ rules['microsoft/az-direction-layout'] = swapRule({
897
+ pairs: {
898
+ 'top left': 'upper left',
899
+ 'top right': 'upper right',
900
+ 'far-left': 'leftmost',
901
+ 'far-right': 'rightmost',
902
+ 'left-justified': 'left-aligned',
903
+ 'right-justified': 'right-aligned',
904
+ 'ragged right': 'left-aligned',
905
+ },
906
+ message: 'Microsoft style: use "%s" instead of "%s".',
907
+ link: AZ_BASE + 'f/far-left-far-right',
908
+ severity: 'warn',
909
+ fix: false,
910
+ ignoreCase: true,
911
+ wordBoundary: true,
912
+ });
913
+ rules['microsoft/az-direction-layout-detect'] = patternRule({
914
+ tokens: ['\\bbottom left\\b', '\\bbottom right\\b'],
915
+ message: 'Microsoft style: use "lower left"/"lower right" instead of "%s" — except when discussing the BottomLeft/BottomRight API properties (Microsoft).',
916
+ link: AZ_BASE + 'b/bottom-left-bottom-right',
917
+ severity: 'error',
918
+ ignoreCase: true,
919
+ });
920
+ rules['microsoft/left-hand-right-hand'] = swapRule({
921
+ pairs: { 'left-hand': 'left', 'right-hand': 'right' },
922
+ message: 'Rewrite "%s" using "%s" (Microsoft): no replacement is stated for the modifier sense.',
923
+ link: AZ_BASE + 'l/left-leftmost-left-hand',
924
+ severity: 'error',
925
+ fix: false,
926
+ ignoreCase: true,
927
+ wordBoundary: true,
928
+ });
929
+ // `blade` skips noun compounds such as "blade server". `hierarchical menu`,
930
+ // `secondary menu`, `running head` and `running foot` are in the `-detect` rule.
931
+ rules['microsoft/az-ui-nouns'] = swapRule({
932
+ pairs: {
933
+ '\\bblade\\b(?!\\s+(?:server|servers|enclosure|chassis|centers?|centres?)\\b)': 'pane',
934
+ '\\binsertion point\\b': 'pointer',
935
+ },
936
+ message: 'Microsoft style: use "%s" instead of "%s".',
937
+ link: AZ_BASE + 'b/blade',
938
+ severity: 'warn',
939
+ fix: false,
940
+ ignoreCase: true,
941
+ keysAreRegex: true,
942
+ wordBoundary: false,
943
+ });
944
+ rules['microsoft/az-ui-nouns-detect'] = patternRule({
945
+ tokens: [
946
+ '\\bhierarchical menu\\b',
947
+ '\\bsecondary menu\\b',
948
+ '\\brunning head\\b',
949
+ '\\brunning foot\\b',
950
+ ],
951
+ message: 'Microsoft style: "%s" carries a conditional exception — see the a-z word list before rewriting.',
952
+ link: AZ_BASE + 'h/hierarchical-menu',
953
+ severity: 'error',
954
+ ignoreCase: true,
955
+ });
956
+ // `italics` and `italicized` are in `italic-as-noun`, because "use italics" cannot
957
+ // be swapped for the adjective. `roman` skips "Roman numerals", "Roman Empire" and
958
+ // similar.
959
+ rules['microsoft/az-typography'] = swapRule({
960
+ pairs: {
961
+ '\\btypeface\\b': 'font',
962
+ '\\btype style\\b': 'font style',
963
+ '\\bbolded\\b': 'bold',
964
+ '\\bboldface\\b': 'bold',
965
+ '\\broman\\b(?!\\s+(?:numeral|numerals|empire|alphabet|calendar|law|catholic|republic|mythology|god|gods|ruins?|coins?|holiday|road|roads|bath|baths|army|legion|forum|senate|aqueduct)\\b)': 'regular type',
966
+ },
967
+ message: 'Microsoft style: use "%s" instead of "%s".',
968
+ link: AZ_BASE + 'r/roman',
969
+ severity: 'warn',
970
+ fix: false,
971
+ ignoreCase: true,
972
+ keysAreRegex: true,
973
+ wordBoundary: false,
974
+ });
975
+ rules['microsoft/italic-as-noun'] = patternRule({
976
+ tokens: ['\\bitalics\\b', '\\bitalicized\\b'],
977
+ message: 'Avoid "%s"; rewrite using "italic" as an adjective, e.g. "italic text" (Microsoft).',
978
+ link: AZ_BASE + 'i/italic',
979
+ severity: 'error',
980
+ ignoreCase: true,
981
+ });
982
+ // `directory`, `disk` and `context menu` are not included. The guide allows them
983
+ // in developer content.
984
+ rules['microsoft/az-filesystem'] = swapRule({
985
+ pairs: {
986
+ 'child folder': 'subfolder',
987
+ // Skips "home directory for its config files".
988
+ '\\bhome directory\\b(?!\\s+for\\s+(?:its|the|your|his|her|their)?\\s*config)': 'root directory',
989
+ 'graphics adapter': 'video card',
990
+ 'display adapter': 'video card',
991
+ 'video adapter': 'video card',
992
+ 'graphics card': 'video card',
993
+ 'display driver': 'video driver',
994
+ 'graphics driver': 'video driver',
995
+ 'remote drive': 'network drive',
996
+ },
997
+ message: 'Microsoft style: use "%s" instead of "%s".',
998
+ link: AZ_BASE + 'c/child-folder',
999
+ severity: 'warn',
1000
+ fix: false,
1001
+ ignoreCase: true,
1002
+ keysAreRegex: true,
1003
+ wordBoundary: true,
1004
+ });
1005
+ // `labelled` and `labelling` are in `us-spelling`. `indices` is not included,
1006
+ // because "array indices" is normal in developer docs.
1007
+ // `as well as` and `or greater`/`or higher`/`or lower` are in `az-grammar-usage-detect`:
1008
+ // "and" cannot replace "as well as" at the start of a sentence, and "or later" only
1009
+ // makes sense for version numbers.
1010
+ rules['microsoft/az-grammar-usage'] = swapRule({
1011
+ pairs: {
1012
+ towards: 'toward',
1013
+ upwards: 'upward',
1014
+ afterwards: 'afterward',
1015
+ useable: 'usable',
1016
+ moveable: 'movable',
1017
+ broadcasted: 'broadcast',
1018
+ matrixes: 'matrices',
1019
+ appendixes: 'appendices',
1020
+ zeroes: 'zeros',
1021
+ },
1022
+ message: 'Microsoft style: use "%s" instead of "%s".',
1023
+ link: AZ_BASE + 'a/as-well-as',
1024
+ severity: 'error',
1025
+ ignoreCase: true,
1026
+ wordBoundary: true,
1027
+ });
1028
+ rules['microsoft/az-grammar-usage-substitutions'] = swapRule({
1029
+ pairs: {
1030
+ 'whether or not': 'whether',
1031
+ 'center around': 'center on',
1032
+ 'different to': 'different from',
1033
+ 'inside of': 'inside',
1034
+ 'outside of': 'outside',
1035
+ 'off of': 'off',
1036
+ administrate: 'administer',
1037
+ alphabetic: 'alphabetical',
1038
+ mathematic: 'mathematical',
1039
+ numerical: 'numeric',
1040
+ },
1041
+ message: 'Microsoft style: use "%s" instead of "%s".',
1042
+ link: AZ_BASE + 'a/as-well-as',
1043
+ severity: 'warn',
1044
+ fix: false,
1045
+ ignoreCase: true,
1046
+ wordBoundary: true,
1047
+ });
1048
+ rules['microsoft/az-grammar-usage-detect'] = patternRule({
1049
+ tokens: ['\\bas well as\\b', '\\bor greater\\b', '\\bor higher\\b', '\\bor lower\\b'],
1050
+ message: 'Microsoft style: "%s" needs a context-specific rewrite, not a blind substitution — "as well as" is a caution against treating it as a synonym for "and", not an instruction to replace it; "or greater/higher/lower" only becomes "or later/earlier" when identifying program or app version numbers, not general magnitude (Microsoft).',
1051
+ link: AZ_BASE + 'a/as-well-as',
1052
+ severity: 'error',
1053
+ ignoreCase: true,
1054
+ });
1055
+ // "multi-factor" is in `spelling-hyphenation`. `all right` and `alright` are in
1056
+ // `az-abbreviations-substitutions`. `pound sign` is in the `-detect` rule, because the
1057
+ // guide allows "pound key" for telephones.
1058
+ rules['microsoft/az-abbreviations-names'] = swapRule({
1059
+ pairs: {
1060
+ defrag: 'defragment',
1061
+ okay: 'OK',
1062
+ },
1063
+ message: 'Microsoft style: use "%s" instead of "%s".',
1064
+ link: AZ_BASE + 'h/hexadecimal',
1065
+ severity: 'error',
1066
+ ignoreCase: true,
1067
+ wordBoundary: true,
1068
+ });
1069
+ // These can be right in other senses: "on spec", "hex nut", "put a hex on" and
1070
+ // "all right" as two words.
1071
+ rules['microsoft/az-abbreviations-substitutions'] = swapRule({
1072
+ pairs: {
1073
+ hex: 'hexadecimal',
1074
+ // Skips the idiom "on spec".
1075
+ '(?<!\\bon\\s)\\bspec\\b': 'specification',
1076
+ MSFT: 'Microsoft',
1077
+ alright: 'OK',
1078
+ 'all right': 'OK',
1079
+ },
1080
+ message: 'Microsoft style: use "%s" instead of "%s".',
1081
+ link: AZ_BASE + 'h/hexadecimal',
1082
+ severity: 'warn',
1083
+ fix: false,
1084
+ ignoreCase: true,
1085
+ keysAreRegex: true,
1086
+ wordBoundary: true,
1087
+ });
1088
+ rules['microsoft/az-abbreviations-names-detect'] = patternRule({
1089
+ tokens: ['\\bpound sign\\b'],
1090
+ message: 'Microsoft style: use "number sign" instead of "%s" — except for the literal phone-keypad key (Microsoft).',
1091
+ link: AZ_BASE + 'n/number-sign',
1092
+ severity: 'error',
1093
+ ignoreCase: true,
1094
+ });
1095
+ // `visit` is in `az-navigation-detect`: the guide allows it in a suggestive tone, and
1096
+ // "a visit" is also a noun. `bookmark` has its own rule because it is also used as a
1097
+ // verb.
1098
+ rules['microsoft/az-navigation'] = swapRule({
1099
+ pairs: {
1100
+ '\\bhot link\\b': 'link',
1101
+ },
1102
+ message: 'Microsoft style: use "%s" instead of "%s".',
1103
+ link: AZ_BASE + 'v/visit',
1104
+ severity: 'warn',
1105
+ fix: false,
1106
+ ignoreCase: true,
1107
+ keysAreRegex: true,
1108
+ wordBoundary: false,
1109
+ });
1110
+ rules['microsoft/az-navigation-detect'] = patternRule({
1111
+ tokens: ['\\bvisit\\b(?!\\s+(?:count|counts|duration|frequency|history|log|data)\\b)'],
1112
+ message: 'Microsoft style: use "go to" instead of "%s" in most cases — but "visit" is OK for a suggestion/browsing tone (Microsoft); see the a-z word list before rewriting.',
1113
+ link: AZ_BASE + 'v/visit',
1114
+ severity: 'error',
1115
+ ignoreCase: true,
1116
+ });
1117
+ rules['microsoft/bookmark-favorite'] = swapRule({
1118
+ pairs: { bookmark: 'favorite' },
1119
+ message: 'Rewrite "%s" using "%s" (Microsoft): a direct substitution may be ungrammatical.',
1120
+ link: AZ_BASE + 'b/bookmark',
1121
+ severity: 'error',
1122
+ fix: false,
1123
+ ignoreCase: true,
1124
+ wordBoundary: true,
1125
+ });
1126
+ // Terms with no replacement in the guide.
1127
+ rules['microsoft/az-no-replacement'] = patternRule({
1128
+ tokens: [
1129
+ '\\bblack box\\b',
1130
+ '\\bdot-com\\b',
1131
+ '\\bedutainment\\b',
1132
+ '\\bhoneypot\\b',
1133
+ '\\bbackbone\\b',
1134
+ '\\bwordwrap\\b',
1135
+ '\\bnatural user interface\\b',
1136
+ '\\bNUI\\b',
1137
+ '\\bsubaddress\\b',
1138
+ ],
1139
+ message: 'Don\'t use "%s" (Microsoft); be specific instead.',
1140
+ link: AZ_BASE + 'b/black-box',
1141
+ severity: 'error',
1142
+ ignoreCase: true,
1143
+ });
1144
+ // `print out` skips noun uses such as "the print out of the receipt".
1145
+ rules['microsoft/az-real-replacements'] = swapRule({
1146
+ pairs: {
1147
+ '\\bfriendly name\\b': 'display name',
1148
+ '\\bprint queue\\b': 'list of documents',
1149
+ '\\bprinter queue\\b': 'list of documents',
1150
+ '\\bdata record\\b': 'record',
1151
+ '\\be-form\\b': 'form',
1152
+ '\\bupsize\\b': 'scale up',
1153
+ '\\bworking memory\\b': 'available memory',
1154
+ '\\bsoft copy\\b': 'file',
1155
+ '(?<!\\b(?:a|an|the|this|that|your|my|its|his|her|their|our)\\s)\\bprint out\\b(?!\\s+of\\b)': 'print',
1156
+ '\\bsearch and replace\\b': 'find and replace',
1157
+ '\\btarget drive\\b': 'destination drive',
1158
+ '\\btarget file\\b': 'destination file',
1159
+ },
1160
+ message: 'Microsoft style: use "%s" instead of "%s".',
1161
+ link: AZ_BASE + 'f/friendly-name',
1162
+ severity: 'warn',
1163
+ fix: false,
1164
+ ignoreCase: true,
1165
+ keysAreRegex: true,
1166
+ wordBoundary: false,
1167
+ });
1168
+ // UI verbs, checkbox and dialog terms
1169
+ // Skips `double-click`, `right-click`, `clickstream` and noun uses such as "click
1170
+ // count".
1171
+ rules['microsoft/no-click'] = swapRule({
1172
+ pairs: {
1173
+ 'click on': 'select',
1174
+ '(?<![\\w-])click(?![a-zA-Z])(?!\\s+(?:count|counts|rate|rates|event|events|tracking|data|metrics?|history|id|ids|per)\\b)': 'select',
1175
+ '(?<![\\w-])clicks(?![a-zA-Z])(?!\\s+(?:count|counts|rate|rates|event|events|tracking|data|metrics?|history|per)\\b)': 'selects',
1176
+ '(?<![\\w-])clicking(?![a-zA-Z])': 'selecting',
1177
+ '(?<![\\w-])clicked(?![a-zA-Z])': 'selected',
1178
+ },
1179
+ message: 'Use "%s" instead of "%s" (Microsoft: avoid input-specific verbs).',
1180
+ fix: false,
1181
+ link: DESCRIBING_UI,
1182
+ ignoreCase: true,
1183
+ wordBoundary: false,
1184
+ keysAreRegex: true,
1185
+ });
1186
+ // Only matches phrases about pressing keys. Bare "press", "hit" and "strike" have
1187
+ // too many other meanings.
1188
+ rules['microsoft/press-key-verb'] = patternRule({
1189
+ tokens: [
1190
+ '\\b(?:press|hit|strike)\\s+(?:the\\s+)?(?:Enter|Tab|Esc|Escape|Delete|Backspace|spacebar|Ctrl|Shift|Alt)\\b',
1191
+ '\\b(?:press|hit|strike)\\s+the\\s+\\S+\\s+key\\b',
1192
+ ],
1193
+ message: 'Use "select" to describe pressing a key, not "%s" (Microsoft).',
1194
+ link: 'https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/h/hit',
1195
+ ignoreCase: true,
1196
+ });
1197
+ // Bare "check" and "deselect" are not included: "check" has too many other meanings,
1198
+ // and the replacement for "deselect" depends on the control.
1199
+ rules['microsoft/checkbox-verbs'] = swapRule({
1200
+ pairs: { uncheck: 'clear', unmark: 'clear', unselect: 'clear' },
1201
+ message: 'Use "%s" instead of "%s" for checkboxes (Microsoft).',
1202
+ link: DESCRIBING_UI,
1203
+ fix: false,
1204
+ ignoreCase: true,
1205
+ wordBoundary: true,
1206
+ });
1207
+ rules['microsoft/dialog-terminology'] = swapRule({
1208
+ pairs: {
1209
+ 'pop-up window': 'dialog',
1210
+ 'dialog box': 'dialog',
1211
+ 'dialogue box': 'dialog',
1212
+ },
1213
+ message: 'Use "%s" instead of "%s" (Microsoft).',
1214
+ link: FORMATTING_TEXT_IN_INSTRUCTIONS,
1215
+ fix: false,
1216
+ ignoreCase: true,
1217
+ wordBoundary: true,
1218
+ });
1219
+ // The link slug really is `mouse-mouse-interaction-terms`.
1220
+ rules['microsoft/mouse-over'] = swapRule({
1221
+ pairs: { 'mouse over': 'hover over' },
1222
+ message: 'Use "%s" instead of "%s" (Microsoft).',
1223
+ link: 'https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/mouse-mouse-interaction-terms',
1224
+ fix: false,
1225
+ ignoreCase: true,
1226
+ wordBoundary: true,
1227
+ });
1228
+ rules['microsoft/keyboard-shortcut-plus-spacing'] = patternRule({
1229
+ tokens: ['\\b(?:Ctrl|Alt|Shift|Cmd)\\s+\\+\\s+'],
1230
+ message: 'Don\'t put a space around "+" in a keyboard shortcut (Microsoft): "%s"',
1231
+ link: FORMATTING_TEXT_IN_INSTRUCTIONS,
1232
+ });
1233
+ rules['microsoft/sign-in-sign-out'] = swapRule({
1234
+ pairs: {
1235
+ 'log into': 'sign in to',
1236
+ 'log onto': 'sign in to',
1237
+ 'log in': 'sign in',
1238
+ login: 'sign in',
1239
+ 'log on': 'sign in',
1240
+ logon: 'sign in',
1241
+ 'log off': 'sign out',
1242
+ 'log out': 'sign out',
1243
+ logout: 'sign out',
1244
+ 'sign into': 'sign in to',
1245
+ signin: 'sign in',
1246
+ 'sign off': 'sign out',
1247
+ },
1248
+ message: 'Rewrite "%s" as "%s" (Microsoft): "login"/"logon" as a noun needs a sentence rewrite.',
1249
+ link: 'https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/l/log-on-log-off',
1250
+ fix: false,
1251
+ ignoreCase: true,
1252
+ wordBoundary: true,
1253
+ });
1254
+ // Rules never fix, even if a swap sets `fix`.
1255
+ for (const rule of Object.values(rules)) {
1256
+ rule.fix = false;
1257
+ }
1258
+ return rules;
1259
+ }
1260
+ //# sourceMappingURL=microsoft.js.map