@redocly/recheck 0.15.0 → 2.58.1

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 -1886
  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 -1315
  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 -98
  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 -74
  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 -121
  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
@@ -1,1671 +0,0 @@
1
- /**
2
- * `recheck/google` — Google's developer documentation style guide
3
- * (https://developers.google.com/style), adapted to Recheck assertions.
4
- *
5
- * Source: Google developer documentation style guide
6
- * Canonical URL: https://developers.google.com/style
7
- * License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
8
- * Sync date: 2026-07-29
9
- *
10
- * Modification note: rules are adapted to Recheck's assertion vocabulary
11
- * (`swap`, `pattern`, `capitalization`, `length`, plus a handful of
12
- * markdownlint-parity/Recheck-original token rules) and wording is
13
- * paraphrased into rule messages rather than quoted verbatim. See
14
- * `packages/recheck/presets/google/PROVENANCE.md` for the full rule ->
15
- * source page -> quote -> verdict table (including every candidate rule
16
- * that was considered and NOT shipped, and why), and
17
- * `packages/recheck/presets/google/sources.json` for the fetched-page
18
- * hashes drift detection needs.
19
- *
20
- * PROVENANCE DISCIPLINE (why this file looks the way it does): every rule
21
- * below was confirmed against a LIVE fetch of its cited page by one of five
22
- * independent verification passes (see PROVENANCE.md's header for how those
23
- * were run). ~380 candidate rules/entries were checked and 6 were outright
24
- * fabrications invented by an earlier research summarization pass (a
25
- * fictitious Flesch-reading-ease threshold, three word-list entries that
26
- * don't exist on the live page, one wrong replacement value, one dropped
27
- * word-list entry) — none of the six are anywhere in this file. Every rule
28
- * here also carries a `link:` to the page it comes from, per spec §3.
29
- *
30
- * SEVERITY POLICY: `error` is reserved for rules that check pure document
31
- * STRUCTURE — heading hierarchy/uniqueness, list-item mechanics, table
32
- * mechanics, link placement, alt-text presence, sentence length — where a
33
- * violation is unambiguous and mechanical. Every word-choice, terminology,
34
- * punctuation-convention, and phrasing rule is `warn`, matching spec §2's
35
- * "Word choice, terminology, phrasing (swap/pattern prose rules) -> warn"
36
- * class. This is a slightly simpler two-way split than the spec's prose
37
- * implies (a few of these — Oxford-comma-style punctuation mechanics —
38
- * could arguably be `error`), applied uniformly for predictability; see
39
- * PROVENANCE.md's "Severity" note for the one-line rationale.
40
- *
41
- * Four rules below are named exceptions to that split, not silent
42
- * inconsistencies with it: `no-code-in-heading` is heading-scoped (in the
43
- * STRUCTURE family above by location) but ships at `warn` because the
44
- * guide states it with hedged wording ("Avoid code items in headings,"
45
- * not "don't"). `no-numbered-headings` is also heading-scoped and the
46
- * guide states IT unconditionally, but ships at `warn` because the
47
- * shipped pattern is a narrowed heuristic (bare leading ordinals and
48
- * `Step N`/`Part N` markers only, to keep the false-positive rate low),
49
- * not a complete detector of every way a heading could number a
50
- * sequence. `emphasis-style` and `strong-style` ship at `warn` because
51
- * the guide states its markup preference as a recommendation ("we
52
- * recommend underscores," "it's best to use double asterisk"), not an
53
- * unconditional "don't." See PROVENANCE.md's severity note for the full
54
- * per-rule rationale.
55
- *
56
- * DETECTION-ONLY BY DESIGN: this preset never auto-fixes any rule, full
57
- * stop. `buildGooglePreset()` forces `fix: false` onto every rule it
58
- * returns, structurally, regardless of what an individual
59
- * `swapRule()`/`patternRule()`/`tokenRule()` call sets — see the loop at
60
- * the end of that function. Adversarial testing of auto-fix on this
61
- * preset's (and `recheck/microsoft`'s) swap pairs found real corruption of
62
- * genuinely correct prose spanning every category once assumed safe:
63
- * spelling (Hemingway's *A Moveable Feast* → "A Movable Feast"), hyphenation
64
- * ("read only the introduction" → "read-only the introduction"), and one
65
- * outright inverted meaning ("No SQL is used here" → "NoSQL is used here").
66
- * A rule's *category* does not predict fix-safety at this scale — a style
67
- * guide describes intent, `swap`/`consistency`/`pattern` match tokens, and
68
- * that gap is not closable by further narrowing which categories are
69
- * "safe." Detection is unaffected and is this preset's entire product:
70
- * every rule still runs `execute()` and reports; only `fix()` is gated off.
71
- * See `presets/google/PROVENANCE.md`'s "Detection-only" section for the
72
- * full corruption examples, and `preset-google.test.ts`'s preset-derived
73
- * "no rule is fixable" test for the permanent guarantee.
74
- *
75
- * The per-rule `fix: false` reasoning attached to individual rules below
76
- * remains accurate even though the blanket override above makes it
77
- * redundant in practice: it records which pairs are same-word
78
- * normalizations versus different-word substitutions, which is the
79
- * criterion that would matter again if this preset's auto-fix were ever
80
- * reconsidered. `fix: false` is set, rule by rule, on every entry whose
81
- * replacement is not deterministically safe: multiple valid alternatives,
82
- * context-dependent meaning, or a documented exception in the guide's own
83
- * text (e.g. `please` — the guide's own recommended example sentence uses
84
- * it). `pattern`-backed rules have no `fix()` at all (detection-only by
85
- * construction), so `fix` is only ever meaningful on `swap`/`capitalization`
86
- * rules here — all now moot under the blanket override above.
87
- *
88
- * WHAT ISN'T HERE, ON PURPOSE: this file does not attempt every one of the
89
- * ~380 checked candidates. Excluded categories (all recorded in
90
- * PROVENANCE.md's "Excluded candidates" section, each with a reason):
91
- * 6 fabrications caught during verification (a fictitious Flesch-
92
- * reading-ease threshold, three word-list entries that don't exist on the
93
- * live page, one wrong replacement value, one dropped word-list entry —
94
- * none of the six are anywhere in this file); every TOO-RISKY entry
95
- * (ordinary, highly polysemous words like `access`, `execute`, `impact`,
96
- * `each`, `possible`, `hit`, `type`, `option`, `above`/`below`, `native`,
97
- * `target`) where a blind string match would corrupt or flag large amounts
98
- * of unrelated, correct prose; every NOT-ENFORCEABLE entry (voice/tense
99
- * judgment calls, "introduce a table before it appears", "spell out an
100
- * abbreviation on first mention" — all require context Recheck's
101
- * regex/AST primitives cannot evaluate); the NOISY entries (already
102
- * over-broad on realistic prose); and a further, smaller set excluded
103
- * where the CONTENT is confirmed but a safe, low-false-positive detection
104
- * mechanism wasn't achievable with the assertions available (documented
105
- * individually, not silently dropped).
106
- *
107
- * SAME-WORD VS. DIFFERENT-WORD: a `swap` pair's per-rule `fix: false`
108
- * reasoning (see individual rules below) follows one mechanical criterion.
109
- * A pair is a same-word normalization — spelling, hyphenation, casing, or
110
- * non-standard form of one word — or it substitutes a different word or
111
- * phrase entirely: `agnostic` -> `platform-independent` (a real homograph:
112
- * "agnostic about the existence of an afterlife"), `GCP` -> `Google Cloud`
113
- * (an acronym expanding to a DIFFERENT phrase than its own letters, the
114
- * same shape as `recheck/microsoft`'s `DMZ`), `IO` -> `I/O` (collides with
115
- * "Socket.IO"). Only the former is safe to auto-fix; the latter carries
116
- * homograph/proper-noun risk regardless of how safe-looking the
117
- * replacement looks, so it ships detection-only. See PROVENANCE.md's
118
- * "Fix-posture" section for the complete rule-by-rule table.
119
- */
120
- // -- link constants (one per distinct source page cited below) -----------
121
- const HEADINGS = 'https://developers.google.com/style/headings';
122
- const PERIODS = 'https://developers.google.com/style/periods';
123
- const ACCESSIBILITY = 'https://developers.google.com/style/accessibility';
124
- const LISTS = 'https://developers.google.com/style/lists';
125
- const PERSON = 'https://developers.google.com/style/person';
126
- const CONTRACTIONS = 'https://developers.google.com/style/contractions';
127
- const WORD_LIST = 'https://developers.google.com/style/word-list';
128
- const TIMELESS = 'https://developers.google.com/style/timeless-documentation';
129
- const ABBREVIATIONS = 'https://developers.google.com/style/abbreviations';
130
- const SLASHES = 'https://developers.google.com/style/slashes';
131
- const NUMBERS = 'https://developers.google.com/style/numbers';
132
- const DATES_TIMES = 'https://developers.google.com/style/dates-times';
133
- const COMMAS = 'https://developers.google.com/style/commas';
134
- const DASHES = 'https://developers.google.com/style/dashes';
135
- const PRONOUNS = 'https://developers.google.com/style/pronouns';
136
- const CROSS_REFERENCES = 'https://developers.google.com/style/cross-references';
137
- const TEXT_FORMATTING = 'https://developers.google.com/style/text-formatting';
138
- const CAPITALIZATION = 'https://developers.google.com/style/capitalization';
139
- const CODE_IN_TEXT = 'https://developers.google.com/style/code-in-text';
140
- const UI_ELEMENTS = 'https://developers.google.com/style/ui-elements';
141
- const PROCEDURES = 'https://developers.google.com/style/procedures';
142
- const INCLUSIVE_DOCUMENTATION = 'https://developers.google.com/style/inclusive-documentation';
143
- // -- small builders, mirroring the shape of each ScopeRule/TokenRule's
144
- // options (see rules/scope/*.ts and rules/token/*.ts) --------------------
145
- function swapRule(opts) {
146
- return {
147
- severity: opts.severity ?? 'warn',
148
- scope: opts.scope ?? 'summary',
149
- link: opts.link,
150
- message: opts.message,
151
- ...(opts.fix === false ? { fix: false } : {}),
152
- assertions: {
153
- swap: {
154
- pairs: opts.pairs,
155
- ignoreCase: opts.ignoreCase,
156
- wordBoundary: opts.wordBoundary,
157
- keysAreRegex: opts.keysAreRegex,
158
- },
159
- },
160
- };
161
- }
162
- function patternRule(opts) {
163
- return {
164
- severity: opts.severity ?? 'warn',
165
- scope: opts.scope ?? 'summary',
166
- link: opts.link,
167
- message: opts.message,
168
- assertions: {
169
- pattern: {
170
- tokens: opts.tokens,
171
- ignoreCase: opts.ignoreCase,
172
- includeCode: opts.includeCode,
173
- },
174
- },
175
- };
176
- }
177
- function tokenRule(opts) {
178
- return {
179
- severity: opts.severity ?? 'error',
180
- link: opts.link,
181
- message: opts.message,
182
- assertions: { [opts.name]: opts.options ?? {} },
183
- };
184
- }
185
- export function buildGooglePreset() {
186
- const rules = {};
187
- // ======================================================================
188
- // STRUCTURAL — document mechanics Google states unambiguously (`error`).
189
- // ======================================================================
190
- // "Use sentence case for all headings and titles." (headings)
191
- // `fix: false`: an auto-fix would lowercase any proper noun not covered
192
- // by the built-in TECHNICAL_PROPER_NOUNS vocabulary or a user's own
193
- // `exceptions` — same reasoning as recheck/prose's identical rule.
194
- rules['google/heading-sentence-case'] = {
195
- severity: 'error',
196
- scope: 'heading',
197
- fix: false,
198
- link: HEADINGS,
199
- message: '"%s" should use %s capitalization (Google: sentence case for headings).',
200
- assertions: { capitalization: { match: '$sentence' } },
201
- };
202
- rules['google/heading-increment'] = tokenRule({
203
- name: 'heading-increment',
204
- message: 'Heading levels should only increment by one level at a time (Google: heading structure).',
205
- link: HEADINGS,
206
- });
207
- rules['google/single-h1'] = tokenRule({
208
- name: 'single-h1',
209
- message: 'Only use a level-1 heading once on a page (Google: heading structure).',
210
- link: HEADINGS,
211
- });
212
- rules['google/first-line-h1'] = tokenRule({
213
- name: 'first-line-h1',
214
- message: 'The first line in a file should be a top-level heading (Google: heading structure).',
215
- link: HEADINGS,
216
- });
217
- rules['google/no-duplicate-heading'] = tokenRule({
218
- name: 'no-duplicate-heading',
219
- message: 'Headings should be unique so readers can jump between sections (Google: heading structure).',
220
- link: HEADINGS,
221
- });
222
- rules['google/no-trailing-punctuation'] = tokenRule({
223
- name: 'no-trailing-punctuation',
224
- message: "Don't end headings with periods (Google).",
225
- link: PERIODS,
226
- });
227
- rules['google/no-empty-headings'] = tokenRule({
228
- name: 'no-empty-headings',
229
- message: "Don't use empty headings; make sure headings are followed by content (Google).",
230
- link: HEADINGS,
231
- });
232
- rules['google/no-emphasis-as-heading'] = tokenRule({
233
- name: 'no-emphasis-as-heading',
234
- message: 'Tag headings using heading elements, not bold/italic text (Google: accessibility).',
235
- link: ACCESSIBILITY,
236
- });
237
- // "Don't put links in headings." Raw markdown link syntax inside a
238
- // heading's own text is a reliable, low-false-positive signal.
239
- rules['google/no-link-in-heading'] = patternRule({
240
- tokens: ['\\[[^\\]]*\\]\\([^)]*\\)'],
241
- message: "Don't put links in headings (Google); move the link into the following paragraph.",
242
- link: HEADINGS,
243
- scope: 'heading',
244
- severity: 'error',
245
- });
246
- // "Start each list item with a capital letter." Same mechanism as the
247
- // heading rule above, scoped to list-item text instead.
248
- rules['google/list-item-capital'] = {
249
- severity: 'error',
250
- scope: 'list-item',
251
- fix: false,
252
- link: LISTS,
253
- message: '"%s" should use %s capitalization (Google: start list items with a capital letter).',
254
- assertions: { capitalization: { match: '$sentence' } },
255
- };
256
- rules['google/no-alt-text'] = tokenRule({
257
- name: 'no-alt-text',
258
- message: 'Every image needs alt text (Google: accessibility).',
259
- link: ACCESSIBILITY,
260
- });
261
- // "Don't merge cells. Don't use colspan or rowspan attributes." GFM
262
- // tables have no native merged-cell syntax, so this only ever fires on
263
- // raw HTML tables embedded in the markdown — scope: 'all' so it can see
264
- // that raw HTML.
265
- // Also confirmed on the tables page (TABLES); ACCESSIBILITY is the
266
- // primary citation (see PROVENANCE.md for both).
267
- rules['google/no-merged-cells'] = patternRule({
268
- tokens: ['\\bcolspan\\s*=', '\\browspan\\s*='],
269
- message: "Don't merge table cells with colspan/rowspan (Google).",
270
- link: ACCESSIBILITY,
271
- scope: 'all',
272
- ignoreCase: true,
273
- severity: 'error',
274
- });
275
- // "Try to use fewer than 26 words per sentence." (accessibility) — the
276
- // one Google number spec §5.6 maps onto the new `length` assertion
277
- // (`unit: words`, `scope: sentence`, `max: 25`), the same way Microsoft's
278
- // 150-character alt-text limit uses it. This is the first non-prose
279
- // preset to ship a `length`-backed rule — see presets.test.ts's
280
- // generalized "shipped in any preset vs documented opt-in" accounting.
281
- rules['google/sentence-length'] = {
282
- severity: 'error',
283
- scope: 'sentence',
284
- link: ACCESSIBILITY,
285
- message: 'Sentence is %s %s long; Google recommends fewer than 26 words (max %s).',
286
- assertions: { length: { unit: 'words', max: 25 } },
287
- };
288
- // ======================================================================
289
- // HEADINGS (residual) / LISTS — `warn`.
290
- // ======================================================================
291
- // "Avoid code items in headings." `includeCode: true` because the whole
292
- // point is to catch the code span itself.
293
- rules['google/no-code-in-heading'] = patternRule({
294
- tokens: ['`[^`]+`'],
295
- message: 'Avoid code items in headings (Google); rephrase in plain words.',
296
- link: HEADINGS,
297
- scope: 'heading',
298
- includeCode: true,
299
- });
300
- // "Don't use numbers in headings to indicate a sequence." Narrowly
301
- // scoped to step/part-style sequence markers and bare leading ordinals
302
- // to keep the false-positive rate low (see PROVENANCE.md).
303
- rules['google/no-numbered-headings'] = patternRule({
304
- tokens: ['^\\d+[.)]\\s', '^Step\\s+\\d+\\b', '^Part\\s+\\d+\\b'],
305
- message: "Don't use numbers in headings to indicate a sequence (Google).",
306
- link: HEADINGS,
307
- scope: 'heading',
308
- ignoreCase: true,
309
- });
310
- // "[A single item] isn't really a list" (confirmed principle) —
311
- // operationalized via list-length's own `min: 2` default, with no `max`
312
- // (Google states no upper bound; that's Microsoft's stated 2-7 range,
313
- // spec §5.6). Downgraded from the generic "list mechanics -> error"
314
- // severity example to `warn`: the verifier marked the underlying guide
315
- // statement NOT-ENFORCEABLE (a descriptive aside, not an imperative
316
- // "must have >= 2 items"), so only the MECHANISM is deterministic here,
317
- // not the guide's own confidence in it as a hard rule.
318
- rules['google/list-length'] = tokenRule({
319
- name: 'list-length',
320
- message: 'List has %s item(s); a single item usually reads better as a plain sentence (Google).',
321
- link: LISTS,
322
- options: { min: 2 },
323
- severity: 'warn',
324
- });
325
- // ======================================================================
326
- // VOICE / PERSON / TENSE / CONTRACTIONS — `warn`.
327
- // ======================================================================
328
- // "Use you or your instead of we, our, or us" — except to refer to the
329
- // authoring organization itself, which the guide explicitly allows.
330
- // Detection-only: a bare pronoun swap can't reliably rewrite the
331
- // surrounding sentence, and the organizational exception makes a blind
332
- // fix wrong some of the time anyway.
333
- // A bare `ignoreCase: true` would catch a sentence-initial "We" but also
334
- // matches the all-caps abbreviation "US" -- the EXACT form
335
- // `google/us-abbreviation` (below) fixes toward, producing a permanent,
336
- // unfixable warning here with a nonsense "use second person" message
337
- // about a country abbreviation. Enumerating the specific casings that
338
- // are actually the pronoun ("we"/"We"/"our"/"Our"/"us"/"Us") instead of
339
- // relying on `ignoreCase` still catches sentence-initial capitalization
340
- // without also matching all-caps "US".
341
- rules['google/second-person'] = patternRule({
342
- tokens: ['\\b(?:We|we|Our|our|Us|us)\\b'],
343
- message: 'Use second person ("you"/"your") instead of "%s", unless referring to the organization itself (Google).',
344
- link: PERSON,
345
- });
346
- // "We recommend using negation contractions such as isn't, don't, and
347
- // can't." `fix: false`: the guide's own emphasis exception ("is *not*")
348
- // means a blind contraction isn't always right.
349
- rules['google/use-contractions'] = swapRule({
350
- pairs: {
351
- 'is not': "isn't",
352
- 'are not': "aren't",
353
- 'do not': "don't",
354
- 'does not': "doesn't",
355
- 'did not': "didn't",
356
- cannot: "can't",
357
- 'will not': "won't",
358
- 'have not': "haven't",
359
- 'has not': "hasn't",
360
- 'had not': "hadn't",
361
- 'should not': "shouldn't",
362
- 'would not': "wouldn't",
363
- 'could not': "couldn't",
364
- },
365
- message: 'Use "%s" instead of "%s" (Google recommends negation contractions).',
366
- link: CONTRACTIONS,
367
- ignoreCase: true,
368
- wordBoundary: true,
369
- fix: false,
370
- });
371
- rules['google/no-triple-contractions'] = patternRule({
372
- tokens: ["\\bmightn't've\\b", "\\bwouldn't've\\b", "\\bcouldn't've\\b", "\\bshouldn't've\\b"],
373
- message: 'Don\'t use three-word contractions such as "%s" (Google).',
374
- link: CONTRACTIONS,
375
- ignoreCase: true,
376
- });
377
- rules['google/no-lets'] = patternRule({
378
- tokens: ["\\blet's\\b"],
379
- message: '"%s": avoid if at all possible (Google).',
380
- link: `${WORD_LIST}#lets`,
381
- ignoreCase: true,
382
- });
383
- // "Don't use the phrase please note." Detection-only: deleting "please
384
- // note" from a sentence leaves a capitalization/fragment mess behind
385
- // ("Please note that the endpoint is deprecated." -> "that the endpoint
386
- // is deprecated.") since a swap can't also re-capitalize or restructure
387
- // the rest of the sentence.
388
- rules['google/no-please-note'] = swapRule({
389
- pairs: { 'please note': '' },
390
- message: '%sGoogle\'s style guide says not to use the phrase "%s"; remove it.',
391
- link: `${WORD_LIST}#please`,
392
- ignoreCase: true,
393
- wordBoundary: true,
394
- fix: false,
395
- });
396
- // Bare "please" must stay DETECT-ONLY: the guide's own recommended
397
- // example sentence uses it ("If the issue persists, please contact your
398
- // account representative"), so a delete-swap would rewrite text the
399
- // guide itself endorses.
400
- rules['google/no-please'] = patternRule({
401
- tokens: ['\\bplease\\b'],
402
- message: '"%s": only use when asking for permission or forgiveness, not in the normal course of instructions (Google).',
403
- link: `${WORD_LIST}#please`,
404
- ignoreCase: true,
405
- });
406
- // ======================================================================
407
- // TIMELESS DOCUMENTATION — `warn`.
408
- // ======================================================================
409
- // The confirmed 15-term avoid-list (word-list + timeless-documentation)
410
- // includes several ordinary high-frequency words (`currently` aside,
411
- // `existing`, `future`, `latest`, `new`, `newer`, `now`, `old`, `older`,
412
- // `soon`, `eventually`, `in the future`) whose everyday, unrelated uses
413
- // would make a blind pattern unusably noisy on realistic prose. Shipped
414
- // here is the distinctive subset with low collateral-match risk; the
415
- // rest is in PROVENANCE.md's excluded list with this same reasoning.
416
- rules['google/no-timeless-phrases'] = patternRule({
417
- tokens: [
418
- '\\bas of this writing\\b',
419
- '\\bat present\\b',
420
- '\\bpresently\\b',
421
- '\\bdoes not yet\\b',
422
- '\\bcurrently\\b',
423
- ],
424
- message: '"%s" is implied by the existence of the documentation itself; consider removing it (Google).',
425
- link: TIMELESS,
426
- ignoreCase: true,
427
- });
428
- // ======================================================================
429
- // LATINISMS / ABBREVIATIONS / SLANG — `warn`.
430
- // ======================================================================
431
- // `wordBoundary: false` is required: a trailing `\b` right after a
432
- // period-then-space never matches (both are non-word characters -- see
433
- // swap.ts's word-boundary construction), which would otherwise break the
434
- // common "i.e. " case. But dropping anchoring entirely lets a key match
435
- // as a bare substring: the un-anchored `vs.` matches inside "revs." ("The
436
- // counter revs. up quickly." -> "The counter reversus up quickly."). A
437
- // LEADING `\b` baked directly into each regex source via `keysAreRegex`
438
- // fixes this: a match can still only start at a real word boundary --
439
- // "revs." doesn't match because there's no boundary between "re" and
440
- // "vs.". No trailing `\b` is added, so the anchoring is intentionally
441
- // asymmetric (leading-only).
442
- //
443
- // `i.e.`/`e.g.` -> `that is`/`for example` are multi-word replacements, so
444
- // an ALL-CAPS input (`I.E.`, `E.G.`) would otherwise get
445
- // `applyMatchCase`-shouted into `"THAT IS"`/`"FOR EXAMPLE"`. `vs.` ->
446
- // `versus` is a single-word replacement, so it was never affected by that
447
- // shouting behavior (an ALL-CAPS `VS.` becomes all-caps `VERSUS` --
448
- // unchanged, and correct: see case-preserve.ts's doc comment on why
449
- // single-word stays as-is). The multi-word case is handled at the engine
450
- // (`applyMatchCase`), not here -- every pair in this preset shares the one
451
- // helper, so a per-rule `fix: false` would only hide the same defect
452
- // again elsewhere.
453
- //
454
- // Split: `i.e.`/`e.g.` are Latin abbreviations translated into a
455
- // DIFFERENT English phrase, not a respelling of the same word (contrast
456
- // `vs.` -> `versus` below, which shares its own letters with the word it
457
- // abbreviates). Detection-only.
458
- rules['google/no-latinisms'] = swapRule({
459
- pairs: {
460
- '\\bi\\.e\\.': 'that is',
461
- '\\be\\.g\\.': 'for example',
462
- },
463
- message: 'Use "%s" instead of "%s" (Google).',
464
- link: WORD_LIST,
465
- fix: false,
466
- ignoreCase: true,
467
- wordBoundary: false,
468
- keysAreRegex: true,
469
- });
470
- // `vs.` -> `versus` is a same-word abbreviation (the letters of "vs."
471
- // literally truncate "versus"), unlike `i.e.`/`e.g.` above -- stays
472
- // fixable.
473
- rules['google/vs-versus'] = swapRule({
474
- pairs: {
475
- '\\bvs\\.': 'versus',
476
- },
477
- message: 'Use "%s" instead of "%s" (Google).',
478
- link: WORD_LIST,
479
- ignoreCase: true,
480
- wordBoundary: false,
481
- keysAreRegex: true,
482
- });
483
- // `aka` and `vice versa` don't end in a period, so neither needs the
484
- // leading-only exemption above -- both get full `\b...\b` anchoring.
485
- // Without it, "aka" matches inside ordinary words containing that
486
- // substring ("Akamai" -> "Also known asmai", "Osaka" -> "Osalso known
487
- // as"). Full anchoring fixes both: there's no word boundary between "Os"
488
- // and "aka" in "Osaka", and no word boundary between "Aka" and "mai" in
489
- // "Akamai", so neither matches anymore.
490
- //
491
- // Both replacements here are multi-word (`also known as`, `the other way
492
- // around`), so an ALL-CAPS input (`AKA`, `VICE VERSA`) would otherwise get
493
- // shouted into `"ALSO KNOWN AS"`/`"THE OTHER WAY AROUND"` -- handled at
494
- // the engine (`applyMatchCase`), the same fix as `no-latinisms` above.
495
- //
496
- // Split: `vice versa` -> `the other way around` substitutes a different
497
- // phrase entirely (no letter-derived relationship, unlike `aka`).
498
- // Detection-only.
499
- rules['google/no-latinisms-plain'] = swapRule({
500
- pairs: {
501
- 'vice versa': 'the other way around',
502
- },
503
- message: 'Use "%s" instead of "%s" (Google).',
504
- link: WORD_LIST,
505
- fix: false,
506
- ignoreCase: true,
507
- wordBoundary: true,
508
- });
509
- // `aka` -> `also known as` is an ABBREVIATION EXPANDED INTO A PHRASE, not
510
- // a respelling of the same word -- the same shape as `e.g.`/`i.e.` above
511
- // (detection-only) and `spec` -> `specification`
512
- // (`microsoft/az-abbreviations-substitutions`), not the same shape as
513
- // `vs.` -> `versus` (a literal truncation sharing the target word's own
514
- // letters). That the letters of "aka" spell out the words of "also known
515
- // as" does not make expanding an abbreviation into a phrase a same-word
516
- // normalization; it's a substitution, like every other
517
- // Latin-abbreviation-to-phrase pair in this file.
518
- rules['google/aka-form'] = swapRule({
519
- pairs: {
520
- aka: 'also known as',
521
- },
522
- message: 'Use "%s" instead of "%s" (Google).',
523
- link: WORD_LIST,
524
- fix: false,
525
- ignoreCase: true,
526
- wordBoundary: true,
527
- });
528
- // `fix: false`: each of these needs a real fixed alternative, but not
529
- // every grammatical slot in a sentence takes it cleanly.
530
- rules['google/no-internet-slang'] = swapRule({
531
- pairs: {
532
- 'tl;dr': 'To summarize',
533
- ymmv: 'Your results might vary',
534
- RTFM: 'For more information, see...',
535
- },
536
- message: 'Avoid the internet-slang abbreviation "%s"; use "%s" instead (Google).',
537
- link: ABBREVIATIONS,
538
- ignoreCase: true,
539
- wordBoundary: true,
540
- fix: false,
541
- });
542
- // "Don't use [via]." No replacement is given — detection-only.
543
- rules['google/no-via'] = patternRule({
544
- tokens: ['\\bvia\\b'],
545
- message: '"%s": avoid — Google\'s word list says not to use it; rephrase (e.g. "using", "through").',
546
- link: `${WORD_LIST}#via`,
547
- ignoreCase: true,
548
- });
549
- rules['google/abbrev-no-periods'] = patternRule({
550
- tokens: ['\\b(?:[A-Z]\\.){2,}'],
551
- message: 'Don\'t use periods with acronyms or initialisms such as "%s" (Google).',
552
- link: ABBREVIATIONS,
553
- });
554
- // `fix: false`: "U.S." is part of many real organizations' own official
555
- // names -- "U.S. Bank" (a top-10 US bank), "U.S. Steel", "U.S. Robotics"
556
- // -- so normalizing it silently corrupts the org's own name ("processed
557
- // by U.S. Bank" -> "processed by US Bank"). Same shape as
558
- // `microsoft/usa-abbreviation`.
559
- rules['google/us-abbreviation'] = swapRule({
560
- pairs: { 'U.S.A.': 'US', 'U.S.': 'US' },
561
- message: 'Use "%s" instead of "%s" (Google: US is OK as an abbreviation for United States).',
562
- link: `${WORD_LIST}#US`,
563
- fix: false,
564
- wordBoundary: false,
565
- });
566
- // Both keys end in a non-word character ("o"/"/"... `w/` itself ends in
567
- // "/"), so a naive full `\b...\b` would fail the extremely common "w/
568
- // headers" case (a trailing boundary right after "/" followed by a
569
- // space -- both non-word -- never matches), which is why this rule needs
570
- // `wordBoundary: false`. But with NO anchoring at all, `w/` also matches
571
- // inside "www/static", "show/hide", "new/old", and `c/o` matches inside
572
- // "src/output" (each rewritten into corrupted nonsense). A leading-only
573
- // `\b` (baked into the regex source via `keysAreRegex`, same technique
574
- // as `no-latinisms` above) fixes it: there is no word boundary between
575
- // "sr" and "c/o" in "src/output", or between the second "w" and "w/" in
576
- // "www/static", so neither matches anymore, while "Send documents c/o
577
- // the compliance department." and "Serve files w/ the config" still
578
- // match correctly (preceded by whitespace).
579
- //
580
- // The leading-only `\b` alone still leaves the trailing side open: `w/o`
581
- // is a common, ordinary English abbreviation for "without", not a
582
- // curiosity, and it still matches the bare `w/` key (immediately
583
- // followed by the word character "o", with no trailing boundary
584
- // required) -- "w/o downtime" -> "witho downtime". Same shape for `c/o`
585
- // immediately followed by a word character -- "c/oscillator" ->
586
- // "care ofscillator". A trailing negative lookahead blocking a following
587
- // ASCII letter (`(?![A-Za-z])`) closes this without reintroducing the
588
- // `wordBoundary: true` failure: "w/ headers" and "c/o the compliance
589
- // department" both still match (the character right after the slash/the
590
- // "o" is whitespace, not a letter), while "w/o downtime" and
591
- // "c/oscillator" no longer do. The guide's own `slashes` page lists only
592
- // "c/o" and "w/" as the abbreviations to avoid (see PROVENANCE.md's
593
- // quote for this rule) -- "w/o" isn't a separate documented entry, so
594
- // leaving it alone entirely (not reported either) is the correct
595
- // outcome, not a gap.
596
- //
597
- // `c/o` -> `care of` is a multi-word replacement matched by an
598
- // `ignoreCase: true` rule, so an ALL-CAPS `C/O` would otherwise get
599
- // `applyMatchCase`-shouted into `"CARE OF"` -- fixed at the engine, not
600
- // here.
601
- rules['google/no-slash-abbrev'] = swapRule({
602
- pairs: { '\\bc/o(?![A-Za-z])': 'care of', '\\bw/(?![A-Za-z])': 'with' },
603
- message: 'Use "%s" instead of the slash abbreviation "%s" (Google).',
604
- link: SLASHES,
605
- ignoreCase: true,
606
- wordBoundary: false,
607
- keysAreRegex: true,
608
- });
609
- // ======================================================================
610
- // NUMBERS / DATES / UNITS — `warn`.
611
- // ======================================================================
612
- rules['google/spell-out-ordinals'] = patternRule({
613
- tokens: ['\\b\\d+(?:st|nd|rd|th)\\b'],
614
- message: 'Spell out ordinal numbers; avoid "%s" (Google).',
615
- link: NUMBERS,
616
- });
617
- // Three tokens are confirmed on the numbers page (NUMBERS); the fourth
618
- // (a hyphen range introduced by "from") is confirmed on the SEPARATE
619
- // hyphens page (developers.google.com/style/hyphens) -- see
620
- // PROVENANCE.md for both citations; `link:` carries the primary one.
621
- rules['google/number-format'] = patternRule({
622
- tokens: [
623
- '\\d\\s%', // no space before the percent sign
624
- '(?<![\\d.])\\.\\d', // decimals under 1 need a leading zero
625
- '\\d+ x \\d+', // dimensions: lowercase x, no surrounding spaces
626
- '\\bfrom\\s+\\d+-\\d+\\b', // a hyphen range introduced by "from"
627
- ],
628
- message: 'Number formatting: "%s" doesn\'t match Google\'s stated convention.',
629
- link: NUMBERS,
630
- });
631
- rules['google/date-format'] = patternRule({
632
- tokens: ['\\b\\d{1,2}/\\d{1,2}/\\d{2,4}\\b'],
633
- message: 'Avoid all-numeric slash dates such as "%s" (Google); spell out the month.',
634
- link: DATES_TIMES,
635
- });
636
- // "Remove the minutes from round hours" is on DATES_TIMES; the AM/PM
637
- // capitalization/spacing rule is on the word-list page's `AM, PM` entry
638
- // (see PROVENANCE.md for both citations).
639
- rules['google/time-format'] = patternRule({
640
- tokens: [
641
- '\\d\\s?[ap]\\.m\\.', // lowercase, dotted a.m./p.m.
642
- '\\d(?:am|pm)\\b', // lowercase, no space, no periods
643
- '\\d(?:AM|PM)\\b', // missing the required space before AM/PM
644
- '\\b\\d{1,2}:00\\s?(?:AM|PM|am|pm)\\b', // round hour should drop :00
645
- ],
646
- message: '"%s": use all-caps AM/PM with a space before it, and drop :00 on round hours (Google).',
647
- link: `${WORD_LIST}#AM,_PM`,
648
- });
649
- rules['google/rfc-spacing'] = patternRule({
650
- tokens: ['\\bRFC\\d+\\b'],
651
- message: 'Use a space between RFC and the number, e.g. "RFC 2318" (Google): "%s"',
652
- link: `${WORD_LIST}#RFC`,
653
- });
654
- rules['google/data-rate-units'] = swapRule({
655
- pairs: {
656
- 'KB/s': 'KBps',
657
- 'Kb/s': 'Kbps',
658
- 'MB/s': 'MBps',
659
- 'Mb/s': 'Mbps',
660
- 'GB/s': 'GBps',
661
- 'Gb/s': 'Gbps',
662
- },
663
- message: 'Use "%s" instead of "%s" (Google: by convention we don\'t use the slash form).',
664
- link: `${WORD_LIST}#GBps`,
665
- wordBoundary: true,
666
- });
667
- // ======================================================================
668
- // PUNCTUATION — `warn`.
669
- // ======================================================================
670
- // "Don't use ampersands (&) as conjunctions or shorthand for and."
671
- // Restricted to an ampersand with a space on both sides (i.e. used as a
672
- // standalone word), so HTML entities (`&amp;`) and brand names (`AT&T`)
673
- // are left alone.
674
- rules['google/no-ampersand'] = patternRule({
675
- tokens: ['\\s&\\s'],
676
- message: 'Don\'t use "&" as a conjunction or shorthand for "and" (Google).',
677
- link: TEXT_FORMATTING,
678
- });
679
- // En dashes, double hyphens, and a spaced em dash all get flagged; a
680
- // Google-style em dash has no surrounding spaces.
681
- rules['google/dash-style'] = patternRule({
682
- tokens: ['\u2013', '\\s--\\s', '\\s\u2014\\s'],
683
- message: "Don't use an en dash or a double hyphen in place of an em dash; don't space the em dash (Google).",
684
- link: DASHES,
685
- });
686
- rules['google/single-space-sentences'] = patternRule({
687
- tokens: ['\\. +\\S'],
688
- message: 'Leave only one space between sentences (Google).',
689
- link: PERIODS,
690
- });
691
- // "Put a comma after the conjunctive adverb" (otherwise/however/
692
- // therefore) when it opens a sentence.
693
- rules['google/conjunctive-adverb-comma'] = patternRule({
694
- tokens: ['^(?:Otherwise|However|Therefore) [a-z]'],
695
- message: 'Put a comma after "%s" when it opens a sentence (Google).',
696
- link: COMMAS,
697
- scope: 'sentence',
698
- });
699
- // "That introduces a restrictive clause. It isn't preceded by a comma."
700
- rules['google/comma-before-that'] = patternRule({
701
- tokens: [', that\\b'],
702
- message: 'Don\'t put a comma before restrictive "that" (Google).',
703
- link: PRONOUNS,
704
- scope: 'sentence',
705
- });
706
- rules['google/neither-nor'] = patternRule({
707
- tokens: ['\\bneither\\b(?:(?!\\bnor\\b)[\\s\\S])*?\\bor\\b'],
708
- message: 'Write "neither A nor B", not "neither A or B" (Google).',
709
- link: `${WORD_LIST}#neither`,
710
- scope: 'sentence',
711
- });
712
- rules['google/no-and-or'] = patternRule({
713
- tokens: ['\\band/or\\b'],
714
- message: 'Avoid "and/or" except where space is limited, such as in tables (Google).',
715
- link: SLASHES,
716
- ignoreCase: true,
717
- });
718
- // ======================================================================
719
- // LINKS — `warn` unless noted.
720
- // ======================================================================
721
- rules['google/vague-link-text'] = patternRule({
722
- tokens: ['\\b(?:this document|this article|this page|this topic|this doc|click here)\\b'],
723
- message: 'Avoid vague link text such as "%s"; describe the destination (Google).',
724
- link: CROSS_REFERENCES,
725
- scope: 'link',
726
- ignoreCase: true,
727
- });
728
- rules['google/no-url-as-link-text'] = patternRule({
729
- tokens: ['^https?://'],
730
- message: "Don't use a URL as link text (Google); use a descriptive phrase instead.",
731
- link: CROSS_REFERENCES,
732
- scope: 'link',
733
- });
734
- // Swaps a different preposition ("on" -> "about"), not a respelling of
735
- // the same word -- detection-only.
736
- rules['google/link-intro-about'] = swapRule({
737
- pairs: {
738
- 'for more information on': 'for more information about',
739
- 'more details on': 'more details about',
740
- },
741
- message: 'Use "%s" instead of "%s" (Google: use "about", not "on").',
742
- link: CROSS_REFERENCES,
743
- fix: false,
744
- ignoreCase: true,
745
- wordBoundary: true,
746
- });
747
- rules['google/link-punctuation'] = patternRule({
748
- tokens: ['^["\u201c].*["\u201d]$'],
749
- message: "Don't put link text in quotation marks (Google).",
750
- link: CROSS_REFERENCES,
751
- scope: 'link',
752
- });
753
- rules['google/no-target-blank'] = patternRule({
754
- tokens: ['target\\s*=\\s*["\']_blank["\']'],
755
- message: "Don't force links to open in a new tab or window (Google).",
756
- link: CROSS_REFERENCES,
757
- scope: 'all',
758
- });
759
- // "Use this document, and not this article, this topic, this doc"
760
- // (word-list #documentation) -- a general terminology preference for
761
- // referring to the current document, independent of link text (that's
762
- // the LINK-scoped rule above).
763
- rules['google/self-reference-terms'] = patternRule({
764
- tokens: ['\\bthis article\\b', '\\bthis topic\\b', '\\bthis doc\\b', '\\bthis page\\b'],
765
- message: 'Use "this document" instead of "%s" when referring to the current document (Google).',
766
- link: `${WORD_LIST}#documentation`,
767
- ignoreCase: true,
768
- });
769
- // ======================================================================
770
- // TEXT FORMATTING — `warn`.
771
- // ======================================================================
772
- // "It's best to use the double asterisk for bold" / "we recommend
773
- // underscores" (for emphasis) -- two separate token rules, each with its
774
- // own single-markup-style option.
775
- rules['google/emphasis-style'] = {
776
- severity: 'warn',
777
- link: TEXT_FORMATTING,
778
- message: 'Use underscores for emphasis/italics, not asterisks (Google).',
779
- assertions: { 'emphasis-style': { style: 'underscore' } },
780
- };
781
- rules['google/strong-style'] = {
782
- severity: 'warn',
783
- link: TEXT_FORMATTING,
784
- message: 'Use double asterisks for bold, not underscores (Google).',
785
- assertions: { 'strong-style': { style: 'asterisk' } },
786
- };
787
- rules['google/no-underline'] = patternRule({
788
- tokens: ['<u>'],
789
- message: 'Reserve underlining for link text (Google).',
790
- link: TEXT_FORMATTING,
791
- scope: 'all',
792
- ignoreCase: true,
793
- });
794
- rules['google/no-casing-style-names'] = patternRule({
795
- tokens: ['\\bcamel[\\s-]?case\\b', '\\bsnake[\\s-]?case\\b'],
796
- message: 'Don\'t use a casing style name such as "%s"; describe the naming convention instead (Google).',
797
- link: CAPITALIZATION,
798
- ignoreCase: true,
799
- });
800
- // ======================================================================
801
- // CODE IN TEXT — `warn`.
802
- // ======================================================================
803
- // "Don't inflect the name of a code element." `includeCode: true`
804
- // because the match deliberately spans the closing backtick.
805
- rules['google/no-inflected-code'] = patternRule({
806
- tokens: ["`[^`]+`'s\\b", '`[^`]+`s\\b'],
807
- message: 'Don\'t inflect the name of a code element (Google): "%s"',
808
- link: CODE_IN_TEXT,
809
- includeCode: true,
810
- });
811
- // ======================================================================
812
- // UI ELEMENTS / VERBS — `warn`.
813
- // ======================================================================
814
- rules['google/ui-element-quotes'] = patternRule({
815
- tokens: ['"[A-Z][a-zA-Z ]*"\\s+(?:button|tab|menu|checkbox|option|link|field)\\b'],
816
- message: 'Don\'t put UI element names in quotation marks; use bold instead (Google): "%s"',
817
- link: UI_ELEMENTS,
818
- });
819
- // Drops a word rather than respelling one -- a different phrase, not a
820
- // same-word normalization. Detection-only.
821
- rules['google/no-click-on'] = swapRule({
822
- pairs: { 'click on': 'click' },
823
- message: 'Use "%s" instead of "%s" (Google).',
824
- link: `${WORD_LIST}#click`,
825
- fix: false,
826
- ignoreCase: true,
827
- wordBoundary: true,
828
- });
829
- // "hover: Don't use. Instead use hold the pointer over." Detection-only
830
- // (not a swap): "hover"/"hovers"/"hovering" don't all slot into "hold
831
- // the pointer over" the same way.
832
- rules['google/no-hover'] = patternRule({
833
- tokens: ['\\bhover(?:s|ing|ed)?\\b'],
834
- message: 'Use "hold the pointer over" instead of "%s" (Google).',
835
- link: `${WORD_LIST}#hover`,
836
- ignoreCase: true,
837
- });
838
- // "uncheck: ... use clear for checkboxes." Bare "check" is too
839
- // polysemous to swap blindly (checking logs, checking that X is true),
840
- // and "deselect" is Google's OWN correct term for non-checkbox UI
841
- // elements, so it is deliberately NOT included here (see PROVENANCE.md).
842
- // Different-word substitution, not a respelling -- detection-only.
843
- rules['google/no-uncheck'] = swapRule({
844
- pairs: { uncheck: 'clear' },
845
- message: 'Use "%s" instead of "%s" for checkboxes (Google).',
846
- link: `${WORD_LIST}#uncheck`,
847
- fix: false,
848
- ignoreCase: true,
849
- wordBoundary: true,
850
- });
851
- rules['google/scroll-to'] = swapRule({
852
- pairs: { 'scroll to': 'go to' },
853
- message: 'Prefer "%s" over "%s" (Google).',
854
- link: `${WORD_LIST}#scroll`,
855
- ignoreCase: true,
856
- wordBoundary: true,
857
- fix: false,
858
- });
859
- // "Don't use the word toggle as a verb. Describe the action." Scoped to
860
- // verb-like usage ("toggle the setting", "to toggle") so the legitimate
861
- // noun ("a toggle switch") isn't flagged.
862
- rules['google/no-toggle-verb'] = patternRule({
863
- tokens: ['\\btoggle(?:d|s)?\\s+(?:the|this|that|a|an)\\b', '\\bto toggle\\b'],
864
- message: 'Describe the action instead of using "toggle" as a verb (Google): "%s"',
865
- link: UI_ELEMENTS,
866
- ignoreCase: true,
867
- });
868
- rules['google/keyboard-keys'] = patternRule({
869
- tokens: ['\\bctrl\\b', '\\bcmd\\b', '\u2318'],
870
- message: 'Spell out modifier keys (Control, Command) instead of "%s" (Google).',
871
- link: UI_ELEMENTS,
872
- ignoreCase: true,
873
- });
874
- // "chapter: Instead, refer to documents, pages, or sections."
875
- // Detection-only: the right replacement depends on what's being referred to.
876
- rules['google/chapter-terminology'] = patternRule({
877
- tokens: ['\\bchapters?\\b'],
878
- message: 'Refer to "document", "page", or "section" instead of "%s" (Google, for web docs).',
879
- link: `${WORD_LIST}#chapter`,
880
- ignoreCase: true,
881
- });
882
- // ======================================================================
883
- // PLAIN LANGUAGE / WORDINESS — `warn`.
884
- // ======================================================================
885
- // Every pair is a different-word substitution, not a respelling.
886
- // `agnostic` -> `platform-independent` is a real homograph: "agnostic"
887
- // very commonly means "doubting/noncommittal about religious or
888
- // philosophical claims" ("he's agnostic about the existence of an
889
- // afterlife"), a sense this pair would corrupt into "platform-independent
890
- // about the existence of an afterlife". Detection-only.
891
- rules['google/plain-language-swaps'] = swapRule({
892
- pairs: {
893
- 'allows you to': 'lets you',
894
- 'enables you to': 'lets you',
895
- comprise: 'consist of',
896
- 'comprised of': 'consist of',
897
- desire: 'want',
898
- desired: 'wanted',
899
- wish: 'want',
900
- learnings: 'knowledge',
901
- agnostic: 'platform-independent',
902
- },
903
- message: 'Prefer "%s" over "%s" (Google: plain language).',
904
- link: WORD_LIST,
905
- fix: false,
906
- ignoreCase: true,
907
- wordBoundary: true,
908
- });
909
- // "Avoid in order to; instead, use to. Use in order to when needed to
910
- // clarify meaning." Not absolute -- `fix: false`.
911
- rules['google/in-order-to'] = swapRule({
912
- pairs: { 'in order to': 'to' },
913
- message: 'Prefer "%s" over "%s" unless needed to clarify meaning (Google).',
914
- link: `${WORD_LIST}#in_order_to`,
915
- ignoreCase: true,
916
- wordBoundary: true,
917
- fix: false,
918
- });
919
- // "Use with caution. Don't use utilize when you mean use. It's OK to use
920
- // utilize... when referring to the quantity of a resource being used."
921
- // Detection-only given that documented exception.
922
- rules['google/utilize'] = patternRule({
923
- tokens: ['\\butiliz(?:e|es|ed|ing|ation)\\b'],
924
- message: 'Use "use" instead of "%s" unless referring to the quantity of a resource used (Google).',
925
- link: `${WORD_LIST}#utilize`,
926
- ignoreCase: true,
927
- });
928
- rules['google/leverage'] = swapRule({
929
- pairs: { leverage: 'use', leveraging: 'using', leveraged: 'used' },
930
- message: 'Avoid "%s" if you mean "use", "build on", or "take advantage of" (Google): "%s"',
931
- link: `${WORD_LIST}#leverage`,
932
- ignoreCase: true,
933
- wordBoundary: true,
934
- fix: false,
935
- });
936
- // "Avoid where possible. Instead, use a more precise term." No fixed
937
- // replacement is given -- detection-only.
938
- rules['google/performant'] = patternRule({
939
- tokens: ['\\bperformant\\b'],
940
- message: 'Avoid "%s"; use a more precise term (Google).',
941
- link: `${WORD_LIST}#performant`,
942
- ignoreCase: true,
943
- });
944
- rules['google/copy-and-paste'] = patternRule({
945
- tokens: ['\\bcopy and paste\\b'],
946
- message: 'Explain what to enter into a field, not how to enter it (Google): "%s"',
947
- link: `${WORD_LIST}#Copy_and_paste`,
948
- ignoreCase: true,
949
- });
950
- // "Avoid using [Create a new ...] unless you need to distinguish the
951
- // item from another recently created item." `fix: false` for that
952
- // documented exception.
953
- rules['google/create-a-new'] = swapRule({
954
- pairs: { 'Create a new': 'Create a' },
955
- message: 'Use "%s ..." instead of "%s ..." unless distinguishing from another recently created item (Google).',
956
- link: `${WORD_LIST}#Create_a_new`,
957
- ignoreCase: true,
958
- wordBoundary: true,
959
- fix: false,
960
- });
961
- rules['google/no-run-the-following-command'] = patternRule({
962
- tokens: ['\\brun the following command\\b'],
963
- message: 'Focus on what the command does instead of "%s" (Google).',
964
- link: PROCEDURES,
965
- ignoreCase: true,
966
- });
967
- // Phrase expansion, not a respelling -- detection-only.
968
- rules['google/cons-and-pros'] = swapRule({
969
- pairs: { 'pros and cons': 'advantages and disadvantages' },
970
- message: 'Use "%s" instead of "%s" (Google).',
971
- link: `${WORD_LIST}#pros`,
972
- fix: false,
973
- ignoreCase: true,
974
- wordBoundary: true,
975
- });
976
- // ======================================================================
977
- // PRODUCT / BRAND NAMES — `warn`.
978
- // ======================================================================
979
- // `'API Console': 'Google Cloud console'` is deliberately not a pair
980
- // here: the guide's own text offers "Google APIs Explorer **or** the
981
- // Google Cloud console" by context (which one depends on what the API
982
- // Console reference actually meant), so a single fixed replacement
983
- // doesn't map cleanly; see PROVENANCE.md's excluded-candidates list.
984
- //
985
- // `'Cloud console': 'Google Cloud console'` is a literal SUBSTRING of its
986
- // own replacement, so fixing it once produces text the SAME pair matches
987
- // again -- "Cloud console" -> "Google Cloud console" -> "Google Google
988
- // Cloud console" -> ... , compounding a "Google " prefix every pass, the
989
- // same self-compounding shape as the OAuth-2.0.0.0 case below.
990
- // `keysAreRegex: true` lets this one key carry a negative lookbehind
991
- // excluding a match already preceded by "Google " (every OTHER key here
992
- // is plain text with no regex metacharacters, so this doesn't change
993
- // their matching at all). This also fixes 'Developers Console' ->
994
- // 'Google Cloud console', which would otherwise feed the same bug on its
995
- // own output every pass.
996
- //
997
- // That lookbehind, `(?<!Google )`, is an EXACT, case-sensitive,
998
- // single-space literal. It only blocks the one casing "Google "
999
- // immediately before "Cloud console" -- the self-compounding bug it's
1000
- // meant to eliminate is still reachable through any other spelling of
1001
- // the same word: "google Cloud console" -> "google Google Cloud
1002
- // console", "GOOGLE Cloud console" -> "GOOGLE Google Cloud console", or
1003
- // "Google Cloud console" (double space) -> "Google Google Cloud
1004
- // console". This whole rule has no `ignoreCase` (several OTHER keys
1005
- // here, e.g. `'API explorer'` vs `'API Explorer'`, are deliberately
1006
- // case-distinct), so the fix is scoped to just this key's own lookbehind
1007
- // rather than the rule-wide flag: a character class per letter
1008
- // (`[Gg][Oo][Oo][Gg][Ll][Ee]`) matches any casing of "google" without
1009
- // touching the rule's case-sensitivity elsewhere, and `\s+` (JS
1010
- // lookbehind supports variable-length patterns) tolerates any run of
1011
- // whitespace, not just a single space. Verified against all four
1012
- // spellings (`Google `, `google `, `GOOGLE `, `Google ` double-spaced)
1013
- // producing no further match, plus the bare `'Cloud console'` (no
1014
- // preceding "google" in any form) still matching and getting corrected.
1015
- // Every remaining pair here is a brand/terminology rename to a DIFFERENT
1016
- // word or phrase (not a respelling) -- e.g. `account name` -> `username`
1017
- // and `MIME type` -> `media type` are both ordinary technical terms with
1018
- // plausible unrelated uses outside Google's own product surface, the same
1019
- // homograph-risk shape as the rest of this file's detection-only pairs.
1020
- // Detection-only. `cURL` -> `curl` lives in `google/brand-capitalization`
1021
- // below instead -- it's a pure casing correction of the identical tool
1022
- // name, not a substitution.
1023
- rules['google/product-names'] = swapRule({
1024
- pairs: {
1025
- 'Cloud Platform': 'Google Cloud',
1026
- '(?<![Gg][Oo][Oo][Gg][Ll][Ee]\\s+)Cloud console': 'Google Cloud console',
1027
- 'Developers Console': 'Google Cloud console',
1028
- 'Google Cloud SDK': 'Cloud SDK',
1029
- 'API explorer': 'APIs Explorer',
1030
- 'API Explorer': 'APIs Explorer',
1031
- 'developer key': 'API key',
1032
- 'dev key': 'API key',
1033
- 'API Console key': 'API key',
1034
- 'account name': 'username',
1035
- 'curated roles': 'predefined roles',
1036
- 'network IP address': 'internal IP address',
1037
- 'MIME type': 'media type',
1038
- 'interconnect type': 'connection type',
1039
- 'peer zone': 'peering zone',
1040
- 'Android device': 'Android-powered device',
1041
- 'Android devices': 'Android-powered devices',
1042
- },
1043
- message: 'Use "%s" instead of "%s" (Google product naming).',
1044
- link: WORD_LIST,
1045
- fix: false,
1046
- wordBoundary: true,
1047
- keysAreRegex: true,
1048
- });
1049
- // A naive `applyMatchCase` would upper-case an ALL-CAPS replacement's
1050
- // ENTIRETY whenever the matched text is itself ALL-CAPS -- correct for a
1051
- // same-word casing fix, but "GCP" is a 3-letter acronym expanding to the
1052
- // two-word phrase "Google Cloud", so preserving its all-caps shape would
1053
- // produce "GOOGLE CLOUD" instead: `--fix` would silently SHOUT the text
1054
- // it's supposed to make normal (the same failure mode as the
1055
- // `Microservices`/`UNICODE`/`IPSEC` cases elsewhere in this file).
1056
- // `applyMatchCase` is fixed at the source (`src/core/case-preserve.ts`)
1057
- // instead of per-rule: an ALL-CAPS match no longer forces a MULTI-WORD
1058
- // replacement to upper-case; it's inserted as authored.
1059
- // `applyMatchCase('GCP', 'Google Cloud')` returns `'Google Cloud'`
1060
- // (correctly cased, matching the configured replacement exactly) rather
1061
- // than `'GOOGLE CLOUD'`. Unlike `UNICODE`/`IPSEC` below (which stay
1062
- // `fix: false` -- see `google/acronym-caps-detect-only`), "GCP" ->
1063
- // "Google Cloud" is a genuine multi-word expansion, so it's the exact
1064
- // case the engine fix targets, and the result is idempotent (the fixed
1065
- // text "Google Cloud" no longer matches `\bGCP\b`, so a second `--fix`
1066
- // pass is a no-op).
1067
- //
1068
- // Despite that engine-level fix, `GCP` -> `Google Cloud` still ships
1069
- // `fix: false`: it is the same shape as `DMZ` -> `perimeter network` --
1070
- // an acronym expanded into a DIFFERENT phrase than its own literal
1071
- // expansion (`GCP` stands for "Google Cloud Platform", not "Google
1072
- // Cloud"), not a respelling. `GCP` also has unrelated expansions in other
1073
- // domains (e.g. "Good Clinical Practice", "Grade Control Point"). The
1074
- // engine-level case-preservation fix above is real and still applies to
1075
- // detection; only auto-fix is unsafe here.
1076
- rules['google/gcp-name'] = swapRule({
1077
- pairs: { GCP: 'Google Cloud' },
1078
- message: 'Use "%s" instead of "%s" (Google product naming).',
1079
- link: WORD_LIST,
1080
- fix: false,
1081
- wordBoundary: true,
1082
- });
1083
- // Case-only corrections for specific branded phrases (Google Play
1084
- // services, Google Account) — deliberately case-sensitive keys, matching
1085
- // only the wrongly-cased literal form, so ordinary capitalization
1086
- // elsewhere is untouched. `markdown`/`material design`/`search console`
1087
- // live in `google/brand-capitalization-proper-noun` below instead: unlike
1088
- // "Google account"/"Google Play Services" (whose SOURCE text is
1089
- // unambiguous -- there's no other sense of "Google account"), those three
1090
- // sources are plain lowercase common phrases with a real, unrelated
1091
- // generic meaning, and capitalizing them ASSUMES every occurrence means
1092
- // Google's own product.
1093
- rules['google/brand-capitalization'] = swapRule({
1094
- pairs: {
1095
- 'Google Play Services': 'Google Play services',
1096
- 'Google account': 'Google Account',
1097
- 'Google accounts': 'Google Accounts',
1098
- // A pure casing correction of the identical tool name, not a
1099
- // substitution, so it lives here rather than in `product-names`.
1100
- cURL: 'curl',
1101
- },
1102
- message: 'Use "%s" instead of "%s" (Google: fixed brand capitalization).',
1103
- link: WORD_LIST,
1104
- wordBoundary: true,
1105
- });
1106
- // `markdown` (retail: "a markdown of thirty percent") is both a homograph
1107
- // (an unrelated, common retail/finance sense) AND a proper-noun risk in
1108
- // the other direction: capitalizing every lowercase occurrence assumes it
1109
- // always refers to the Markdown markup language. `material design` has
1110
- // the same shape: a plain phrase describing physical materials used in a
1111
- // design ("the material design of the building incorporates local
1112
- // stone") that this pair would wrongly capitalize into Google's own
1113
- // design-language name. `search console` is a generic, lowercase
1114
- // descriptive phrase (an admin/tuning panel for a search feature) other
1115
- // tools also use generically, not exclusively Google's product name.
1116
- rules['google/brand-capitalization-proper-noun'] = swapRule({
1117
- pairs: {
1118
- markdown: 'Markdown',
1119
- 'material design': 'Material Design',
1120
- 'search console': 'Search Console',
1121
- },
1122
- message: 'Use "%s" instead of "%s" (Google: fixed brand capitalization).',
1123
- link: WORD_LIST,
1124
- fix: false,
1125
- wordBoundary: true,
1126
- });
1127
- // ======================================================================
1128
- // COMPOUND / ONE-WORD FORMS — `warn`.
1129
- // ======================================================================
1130
- rules['google/compound-forms'] = swapRule({
1131
- pairs: {
1132
- 'e-mail': 'email',
1133
- 'E-mail': 'email',
1134
- 'e-commerce': 'ecommerce',
1135
- 'web page': 'webpage',
1136
- 'check box': 'checkbox',
1137
- 'code base': 'codebase',
1138
- 'code lab': 'codelab',
1139
- 'code-lab': 'codelab',
1140
- 'data store': 'datastore',
1141
- datacenter: 'data center',
1142
- datatype: 'data type',
1143
- 'file name': 'filename',
1144
- filesystem: 'file system',
1145
- 'front-end': 'frontend',
1146
- 'front end': 'frontend',
1147
- 'back-end': 'backend',
1148
- 'back end': 'backend',
1149
- 'host name': 'hostname',
1150
- 'end point': 'endpoint',
1151
- 'name space': 'namespace',
1152
- nameserver: 'name server',
1153
- 'life cycle': 'lifecycle',
1154
- 'life-cycle': 'lifecycle',
1155
- 'live stream': 'livestream',
1156
- 'health care': 'healthcare',
1157
- 'health-care': 'healthcare',
1158
- 'on prem': 'on-premises',
1159
- 'on premise': 'on-premises',
1160
- 'on-premise': 'on-premises',
1161
- 'read only': 'read-only',
1162
- 'pre-built': 'prebuilt',
1163
- 'run book': 'runbook',
1164
- 'screen shot': 'screenshot',
1165
- 'time stamp': 'timestamp',
1166
- 'time frame': 'timeframe',
1167
- 'time-to-live': 'time to live',
1168
- 'tool kit': 'toolkit',
1169
- 'tool-kit': 'toolkit',
1170
- 'touch screen': 'touchscreen',
1171
- 'user base': 'userbase',
1172
- 'walk-through': 'walkthrough',
1173
- webserver: 'web server',
1174
- 'white paper': 'whitepaper',
1175
- 'white space': 'whitespace',
1176
- 'wild card': 'wildcard',
1177
- statusbar: 'status bar',
1178
- 'status-bar': 'status bar',
1179
- 'key/value pair': 'key-value pair',
1180
- 'key value pair': 'key-value pair',
1181
- singlemost: 'single most',
1182
- signin: 'sign-in',
1183
- signout: 'sign-out',
1184
- 'auto-healing': 'autohealing',
1185
- 'auto-scaling': 'autoscaling',
1186
- 'auto-populate': 'autopopulate',
1187
- 'auto populate': 'autopopulate',
1188
- 'auto-tagging': 'autotagging',
1189
- 'pre-capture': 'precapture',
1190
- 'pre-emptible': 'preemptible',
1191
- preexisting: 'pre-existing',
1192
- 'pre-recorded': 'prerecorded',
1193
- 'preshared key': 'pre-shared key',
1194
- 'pre-submit': 'presubmit',
1195
- 'meta-feed': 'metafeed',
1196
- 'meta-generation': 'metageneration',
1197
- 'inter-cluster': 'intercluster',
1198
- 'sub-tree': 'subtree',
1199
- 'sub-zone': 'subzone',
1200
- 'sub zone': 'subzone',
1201
- subcommand: 'sub-command',
1202
- 'co-locate': 'colocate',
1203
- 'blue/green': 'blue-green',
1204
- 'blue green': 'blue-green',
1205
- 'parent\u2014child': 'parent-child',
1206
- 'long running operation': 'long-running operation',
1207
- 'hard-code': 'hardcode',
1208
- 'hard-coded': 'hardcoded',
1209
- 'in-line': 'inline',
1210
- Unixlike: 'Unix-like',
1211
- 'Unix like': 'Unix-like',
1212
- 'resource recordset': 'resource record set',
1213
- },
1214
- message: 'Use "%s" instead of "%s" (Google compound-word form).',
1215
- link: WORD_LIST,
1216
- ignoreCase: true,
1217
- wordBoundary: true,
1218
- });
1219
- // Split out of `compound-forms` above. These five pairs are NOT
1220
- // spacing/hyphenation variants of the same words -- they substitute a
1221
- // different word or phrase entirely:
1222
- // `data cleansing` -> `data cleaning` swaps "cleansing" for "cleaning"
1223
- // (different words); `transcompile` -> `transpile` swaps two competing
1224
- // compiler-jargon terms, not a spelling variant of one word;
1225
- // `autoupdate` -> `automatically update` expands "auto" into a different
1226
- // word ("automatically") rather than just respacing/rehyphenating;
1227
- // `pre-emptive` -> `preemptible` swaps a different adjective (an
1228
- // "emptive"/"emptible" suffix change, not a hyphenation of the same
1229
- // word -- "pre-emptive" describes acting in advance, "preemptible"
1230
- // describes being subject to preemption); `noops`/`NoOps` ->
1231
- // `fully managed` replaces a branded term with an unrelated descriptive
1232
- // phrase, the same shape as `DMZ` -> `perimeter network`.
1233
- rules['google/compound-forms-word-choice'] = swapRule({
1234
- pairs: {
1235
- 'data cleansing': 'data cleaning',
1236
- transcompile: 'transpile',
1237
- autoupdate: 'automatically update',
1238
- 'pre-emptive': 'preemptible',
1239
- noops: 'fully managed',
1240
- NoOps: 'fully managed',
1241
- },
1242
- message: 'Use "%s" instead of "%s" (Google compound-word form).',
1243
- link: WORD_LIST,
1244
- fix: false,
1245
- ignoreCase: true,
1246
- wordBoundary: true,
1247
- });
1248
- // `datasource` -> `data source` is also split out of `compound-forms`
1249
- // above, for a different reason than its siblings in
1250
- // `compound-forms-word-choice` -- this one genuinely IS the same word
1251
- // respaced, but `DataSource` (and
1252
- // its lowercase form `datasource`) is a real, load-bearing TYPE/CLASS
1253
- // NAME in Java and the Spring framework (`javax.sql.DataSource`,
1254
- // `spring.datasource.*` config properties) -- exactly the kind of
1255
- // technical content Redocly's own docs cover. Respacing it inside a code
1256
- // discussion ("configure the datasource bean") would corrupt a reference
1257
- // to the actual class/property name.
1258
- rules['google/compound-forms-proper-noun'] = swapRule({
1259
- pairs: {
1260
- datasource: 'data source',
1261
- },
1262
- message: 'Use "%s" instead of "%s" (Google compound-word form).',
1263
- link: WORD_LIST,
1264
- fix: false,
1265
- ignoreCase: true,
1266
- wordBoundary: true,
1267
- });
1268
- // Split out of `compound-forms` above. "colo" is a noun ("a colocation
1269
- // facility"); "colocate" is a verb. Swapping one for the other
1270
- // unconditionally turns "The colo hosts the racks." into "The colocate
1271
- // hosts the racks." -- grammatically broken, not merely a style nit.
1272
- // `fix: false` keeps the detection (the noun form is
1273
- // still worth flagging toward the guide's preferred "colocation
1274
- // facility"/"colocate" phrasing) without silently rewriting a sentence
1275
- // into bad grammar.
1276
- rules['google/colo-form'] = swapRule({
1277
- pairs: { colo: 'colocate' },
1278
- message: 'Use "%s" instead of "%s" (Google compound-word form).',
1279
- link: WORD_LIST,
1280
- ignoreCase: true,
1281
- wordBoundary: true,
1282
- fix: false,
1283
- });
1284
- // `'in line': 'inline'` is deliberately not a pair in `compound-forms`
1285
- // above, or anywhere else -- not merely scoped or `fix: false`'d.
1286
- // Google's own quote ("One word as an adjective, inline, not in line or
1287
- // in-line") only objects to the ADJECTIVAL use, but "in line" is at
1288
- // least as common as the correct idiom "in line with" or the plain verb
1289
- // phrase "wait in line" / "stand in line", neither of which the guide
1290
- // says anything about. There's no reliable regex-only way to tell
1291
- // "the in line configuration" (wrong) apart from "in line with the
1292
- // roadmap" (correct) or "wait in line" (correct), so this key is
1293
- // excluded rather than shipped fixable or even detection-only; see
1294
- // PROVENANCE.md's excluded-candidates list. `'in-line': 'inline'` above
1295
- // is kept: the hyphenated spelling is essentially always the mistaken
1296
- // adjective form Google objects to and doesn't collide with the "in
1297
- // line with"/"wait in line" idioms, which are never written hyphenated.
1298
- // Case-exact acronym/abbreviation forms -- deliberately NOT ignoreCase
1299
- // (matching e.g. lowercase "https" in a URL scheme is not the target;
1300
- // only the specific wrongly-cased literal forms below are).
1301
- //
1302
- // `keysAreRegex: true` is on so `OAuth 2` can carry a negative lookahead
1303
- // (see below); every OTHER key here is plain alphanumeric/hyphen/space
1304
- // text with no regex metacharacters, so it's byte-identical as a regex
1305
- // source to what it was as an escaped literal -- this does not change
1306
- // their matching behavior at all.
1307
- //
1308
- // `SHA1` and `Microservices` are handled separately (`google/sha1-form`
1309
- // below, and dropped entirely -- see PROVENANCE.md). `UNICODE` and
1310
- // `IPSEC` live in `google/acronym-caps-detect-only` below. `IO` -> `I/O`
1311
- // also lives there: bare, case-sensitive "IO" is a real product/library
1312
- // name in common developer use ("Socket.IO"; the period before "IO" is a
1313
- // non-word character, so `\bIO\b` matches inside it), an unrelated sense
1314
- // a blind fix would corrupt ("Socket.IO connects clients" -> "Socket.I/O
1315
- // connects clients"). `I-O` -> `I/O` lives in
1316
- // `google/acronym-forms-proper-noun` below instead, for the hyphenated
1317
- // form specifically: "I-O DATA" (I-O DATA DEVICE, INC.) is a real, major
1318
- // Japanese PC-peripherals manufacturer whose brand is written exactly
1319
- // "I-O" (hyphenated, capital letters) -- the same shape as `FinTech`
1320
- // below. `FinTech` -> `fintech` lives there too: "FinTech Group AG" is a
1321
- // real company whose name keeps the mixed-case "FinTech" spelling this
1322
- // pair would lowercase.
1323
- rules['google/acronym-forms'] = swapRule({
1324
- pairs: {
1325
- HTTPs: 'HTTPS',
1326
- IPSec: 'IPsec',
1327
- 'No-SQL': 'NoSQL',
1328
- 'No SQL': 'NoSQL',
1329
- // Without the lookahead, `\bOAuth 2\b` also matches inside the
1330
- // CORRECT "OAuth 2.0" (the "." after "2" is a non-word character, so
1331
- // the trailing `\b` is satisfied trivially), and `runRulesUntilStable`
1332
- // would re-fire the fix on its own output every pass, compounding
1333
- // into "OAuth 2.0.0.0.0.0.0". The negative lookahead blocks a match
1334
- // wherever "OAuth 2" is immediately followed by the literal ".0" it
1335
- // would be redundant to append, so the already-correct form is left
1336
- // alone and the fix is idempotent; `OAuth2` -> `OAuth 2.0` (the
1337
- // intended path) is unaffected since that key has no space to begin
1338
- // with.
1339
- 'OAuth 2(?!\\.0)': 'OAuth 2.0',
1340
- OAuth2: 'OAuth 2.0',
1341
- Oauth: 'OAuth 2.0',
1342
- 'micro-services': 'microservices',
1343
- 'fin-tech': 'fintech',
1344
- adtech: 'ad tech',
1345
- 'ad-tech': 'ad tech',
1346
- },
1347
- message: 'Use "%s" instead of "%s" (Google: fixed acronym/abbreviation form).',
1348
- link: WORD_LIST,
1349
- wordBoundary: true,
1350
- keysAreRegex: true,
1351
- });
1352
- // `fin-tech`/`adtech`/`ad-tech` (all lowercase, no case change involved)
1353
- // don't carry the same risk as `FinTech`/`I-O`: with this rule
1354
- // case-sensitive (no `ignoreCase`), an all-lowercase key can never match
1355
- // a capitalized brand name like "FinTech Group AG" or "I-O DATA" in the
1356
- // first place, so there's nothing to collide with. Only the two
1357
- // case/hyphen-sensitive forms that DO match a real brand's own casing
1358
- // move to detection-only here.
1359
- rules['google/acronym-forms-proper-noun'] = swapRule({
1360
- pairs: {
1361
- 'I-O': 'I/O',
1362
- FinTech: 'fintech',
1363
- },
1364
- message: 'Use "%s" instead of "%s" (Google: fixed acronym/abbreviation form).',
1365
- link: WORD_LIST,
1366
- fix: false,
1367
- wordBoundary: true,
1368
- keysAreRegex: true,
1369
- });
1370
- // `applyMatchCase` infers a REPLACEMENT's casing from the MATCHED text --
1371
- // correct when the matched text's casing is incidental (e.g. a
1372
- // sentence-initial capital), but wrong here, where the ALL-CAPS shape IS
1373
- // the entire violation. Matching "UNICODE" (all-caps) makes
1374
- // `applyMatchCase` upper-case the replacement "Unicode" back into
1375
- // "UNICODE" -- byte-identical to the input, so the "fix" changes nothing
1376
- // and `--fix` reports it fixed while leaving the violation in place
1377
- // forever (same failure shape as `Microservices` below). `IPSEC` ->
1378
- // `IPsec` hits the exact same round-trip ("IPsec" upper-cased is
1379
- // "IPSEC"). `fix: false` stops silently no-op "fixing" these; detection
1380
- // is unaffected.
1381
- //
1382
- // `applyMatchCase` only skips the all-caps upper-casing for MULTI-WORD
1383
- // replacements (the fix that makes `google/gcp-name` above safe to
1384
- // detect against) -- `"Unicode"` and `"IPsec"` are each a SINGLE word, so
1385
- // neither qualifies, and the round-trip no-op described above still
1386
- // applies: `applyMatchCase('UNICODE', 'Unicode')` is still
1387
- // `'Unicode'.toUpperCase()` = `'UNICODE'`, and likewise for `IPSEC`. This
1388
- // is a genuinely different defect shape from `GCP` (a same-word casing
1389
- // round-trip, not a multi-word-phrase shout), so the engine change
1390
- // correctly leaves it alone here.
1391
- rules['google/acronym-caps-detect-only'] = swapRule({
1392
- pairs: { UNICODE: 'Unicode', IPSEC: 'IPsec', IO: 'I/O' },
1393
- message: 'Use "%s" instead of "%s" (Google: fixed acronym/abbreviation form).',
1394
- link: WORD_LIST,
1395
- wordBoundary: true,
1396
- fix: false,
1397
- });
1398
- // Split out of `acronym-forms` above. The guide's own documented
1399
- // exception says NOT to flag "SHA1" in string literals/enums or
1400
- // hyphenated phrases such as "HMAC-SHA1" -- but a plain `\bSHA1\b` still
1401
- // matches the "SHA1" inside "HMAC-SHA1" (the hyphen is a non-word
1402
- // character, so `\b` holds right after it) and would rewrite it to
1403
- // "HMAC-SHA-1", which isn't what the guide's exception allows. The
1404
- // negative lookbehind excludes exactly the hyphen-preceded case;
1405
- // `fix: false` keeps the remaining, unambiguous "bare SHA1" case a
1406
- // warning, not an auto-fix, since even outside a hyphenated compound the
1407
- // safest default for a mid-sentence hit is a human decision, not a
1408
- // silent rewrite.
1409
- rules['google/sha1-form'] = swapRule({
1410
- pairs: { '(?<!-)\\bSHA1\\b': 'SHA-1' },
1411
- message: 'Use "%s" instead of "%s" (Google: fixed acronym/abbreviation form).',
1412
- link: WORD_LIST,
1413
- wordBoundary: false,
1414
- keysAreRegex: true,
1415
- fix: false,
1416
- });
1417
- // ======================================================================
1418
- // INCLUSIVE LANGUAGE / ABLEIST LANGUAGE / JARGON WITH PEOPLE REFERENCES
1419
- // — `warn`.
1420
- // ======================================================================
1421
- // "Never use [master] in conjunction with slave." Only "slave" ships as
1422
- // a swap: bare "master" has too many unrelated everyday senses (a
1423
- // master's degree, master bedroom, master key, git's old default branch
1424
- // name) and Google's own quote scopes the objection to the master/slave
1425
- // PAIRING, not the standalone word.
1426
- rules['google/master-slave'] = swapRule({
1427
- pairs: { slave: 'worker' },
1428
- message: 'Avoid "%s"; use "worker" or "replica" instead (Google).',
1429
- link: `${WORD_LIST}#slave`,
1430
- ignoreCase: true,
1431
- wordBoundary: true,
1432
- fix: false,
1433
- });
1434
- // Noun forms only -- the guide itself says a word-for-word swap isn't
1435
- // the best fix for the verb forms ("blacklisted the domain").
1436
- rules['google/blacklist-whitelist'] = swapRule({
1437
- pairs: {
1438
- blacklist: 'denylist',
1439
- whitelist: 'allowlist',
1440
- graylist: 'denylist',
1441
- greylist: 'denylist',
1442
- },
1443
- message: 'Use "%s" instead of "%s" (Google inclusive language).',
1444
- link: `${WORD_LIST}#blacklist`,
1445
- ignoreCase: true,
1446
- wordBoundary: true,
1447
- fix: false,
1448
- });
1449
- rules['google/black-white-hat'] = swapRule({
1450
- pairs: {
1451
- 'black hat': 'unethical',
1452
- blackhat: 'unethical',
1453
- 'white hat': 'ethical',
1454
- whitehat: 'ethical',
1455
- },
1456
- message: 'Use a precise term such as "%s" instead of "%s" (Google inclusive language).',
1457
- link: `${WORD_LIST}#blackhat`,
1458
- ignoreCase: true,
1459
- wordBoundary: true,
1460
- fix: false,
1461
- });
1462
- // Different-word substitutions, not respellings -- matches the sibling
1463
- // inclusive-language rules in this file (`blacklist-whitelist`,
1464
- // `black-white-hat`), which ship `fix: false` for the identical reason.
1465
- rules['google/black-white-box-testing'] = swapRule({
1466
- pairs: {
1467
- 'black-box testing': 'opaque-box testing',
1468
- 'black box testing': 'opaque-box testing',
1469
- 'white-box testing': 'clear-box testing',
1470
- 'white box testing': 'clear-box testing',
1471
- 'black-box monitoring': 'synthetic monitoring',
1472
- 'white-box monitoring': 'introspective monitoring',
1473
- },
1474
- message: 'Use "%s" instead of "%s" (Google inclusive language).',
1475
- link: `${WORD_LIST}#black-box`,
1476
- fix: false,
1477
- ignoreCase: true,
1478
- wordBoundary: true,
1479
- });
1480
- // Different-word substitution, not a respelling -- detection-only.
1481
- rules['google/grayed-out'] = swapRule({
1482
- pairs: { 'grayed-out': 'unavailable', 'greyed-out': 'unavailable' },
1483
- message: 'Use "%s" instead of "%s" (Google inclusive language).',
1484
- link: `${WORD_LIST}#grayed-out`,
1485
- fix: false,
1486
- ignoreCase: true,
1487
- wordBoundary: true,
1488
- });
1489
- rules['google/grandfathered'] = swapRule({
1490
- pairs: { grandfathered: 'legacy', 'grandfather clause': 'exempt' },
1491
- message: 'Use "%s" instead of "%s" (Google inclusive language).',
1492
- link: `${WORD_LIST}#grandfathered`,
1493
- ignoreCase: true,
1494
- wordBoundary: true,
1495
- fix: false,
1496
- });
1497
- rules['google/gendered-terms'] = swapRule({
1498
- pairs: {
1499
- 'you guys': 'everyone',
1500
- guys: 'everyone',
1501
- 'male adapter': 'plug',
1502
- 'female adapter': 'socket',
1503
- 'man hours': 'person hours',
1504
- manhours: 'person hours',
1505
- manmade: 'artificial',
1506
- 'man made': 'artificial',
1507
- manned: 'staffed',
1508
- manpower: 'staff',
1509
- 'man-power': 'staff',
1510
- 'man-in-the-middle': 'on-path attacker',
1511
- 'he/she': 'they',
1512
- webmaster: 'website owner',
1513
- },
1514
- message: 'Use non-gendered language such as "%s" instead of "%s" (Google inclusive language).',
1515
- link: `${WORD_LIST}#man_hours`,
1516
- ignoreCase: true,
1517
- wordBoundary: true,
1518
- fix: false,
1519
- });
1520
- rules['google/jargon-with-people-references'] = swapRule({
1521
- pairs: {
1522
- gypsy: 'Romani',
1523
- ghetto: 'clumsy',
1524
- ninja: 'expert',
1525
- guru: 'expert',
1526
- sherpa: 'guide',
1527
- dojo: 'training',
1528
- 'mom test': 'beginner user test',
1529
- 'grandma test': 'beginner user test',
1530
- 'girlfriend test': 'beginner user test',
1531
- 'monkey test': 'automated, random tests',
1532
- 'brown bag': 'learning session',
1533
- 'brown-bag': 'learning session',
1534
- 'build cop': 'build monitor',
1535
- 'build sheriff': 'build monitor',
1536
- 'war room': 'incident-management team',
1537
- warroom: 'incident-management team',
1538
- 'final solution': 'solution',
1539
- 'demilitarized zone': 'perimeter network',
1540
- DMZ: 'perimeter network',
1541
- denigrate: 'disparage',
1542
- sexy: 'elegant',
1543
- nuke: 'remove',
1544
- voodoo: 'mysterious',
1545
- 'first-class citizen': 'higher-order value',
1546
- 'first class citizen': 'higher-order value',
1547
- },
1548
- message: 'Use a precise term such as "%s" instead of "%s" (Google jargon/inclusive language).',
1549
- link: `${WORD_LIST}#ninja`,
1550
- ignoreCase: true,
1551
- wordBoundary: true,
1552
- fix: false,
1553
- });
1554
- // Figurative senses only (Google's own carve-out permits these words to
1555
- // describe inanimate objects/systems -- not people). "mad" is excluded:
1556
- // it is at least as commonly used to mean "angry", a sense Google never
1557
- // objects to. "hang"/"hung" are excluded too: both are extremely
1558
- // polysemous ("hung the picture", "hung jury", "hang up the phone").
1559
- rules['google/ableist-figurative-terms'] = swapRule({
1560
- pairs: {
1561
- crazy: 'unexpected',
1562
- insane: 'unexpected',
1563
- lunatic: 'unexpected',
1564
- bonkers: 'unexpected',
1565
- loony: 'unexpected',
1566
- sane: 'valid',
1567
- 'sanity check': 'quick check',
1568
- 'dumb down': 'simplify',
1569
- retarded: 'slowed',
1570
- },
1571
- message: 'Use a precise term such as "%s" instead of "%s" when describing a system or object (Google).',
1572
- link: `${WORD_LIST}#crazy`,
1573
- ignoreCase: true,
1574
- wordBoundary: true,
1575
- fix: false,
1576
- });
1577
- rules['google/dummy-variable'] = swapRule({
1578
- pairs: { 'dummy variable': 'placeholder' },
1579
- message: 'Use "%s" instead of "%s" (Google): for a statistics sense, see the word list for alternatives.',
1580
- link: `${WORD_LIST}#dummy-variable`,
1581
- ignoreCase: true,
1582
- wordBoundary: true,
1583
- fix: false,
1584
- });
1585
- // The figurative sense only -- "blind writes"/"blind change" are real,
1586
- // distinct technical terms in the SAME word-list entry, so a bare
1587
- // `\bblind\b` match would hit those too. Detection-only, not a swap.
1588
- rules['google/blind-figurative'] = patternRule({
1589
- tokens: ['\\bblind to\\b', '\\bblind eye to\\b'],
1590
- message: 'Use "ignore", "unaware of", "disregard", or "reject" instead of "%s" (Google).',
1591
- link: `${WORD_LIST}#blind`,
1592
- ignoreCase: true,
1593
- });
1594
- // Resolved to the PERSON-REFERENCE sense of "blind" (person who is
1595
- // blind / visually impaired / low-vision) -- NOT the figurative sense
1596
- // above. "unsighted"/"visually challenged" are themselves people-
1597
- // referring euphemisms, so the figurative replacement set would be
1598
- // nonsensical here.
1599
- rules['google/unsighted-visually-challenged'] = swapRule({
1600
- pairs: {
1601
- unsighted: 'person who is blind',
1602
- 'visually challenged': 'person who is visually impaired',
1603
- },
1604
- message: 'Use "%s" instead of "%s" (Google inclusive language).',
1605
- link: `${WORD_LIST}#unsighted`,
1606
- ignoreCase: true,
1607
- wordBoundary: true,
1608
- fix: false,
1609
- });
1610
- rules['google/disability-language'] = swapRule({
1611
- pairs: {
1612
- 'the disabled': 'people with disabilities',
1613
- 'a quadriplegic': 'a quadriplegic person',
1614
- 'wheelchair-bound': 'uses a wheelchair',
1615
- 'suffering from': 'experiencing',
1616
- 'victim of': 'living with',
1617
- },
1618
- message: 'Use "%s" instead of "%s" (Google inclusive documentation).',
1619
- link: INCLUSIVE_DOCUMENTATION,
1620
- ignoreCase: true,
1621
- wordBoundary: true,
1622
- fix: false,
1623
- });
1624
- // Framed as technical-jargon/precision, NOT ableist language: Google's
1625
- // own entries for these never mention people at all ("chubby" is about
1626
- // vague resource sizing, "fat client"/"fat connection" are about
1627
- // imprecise technical modifiers, with an explicit FAT-filesystem
1628
- // carve-out for bare "fat"). Bare "fat" is deliberately excluded.
1629
- rules['google/technical-jargon-precision'] = swapRule({
1630
- pairs: {
1631
- 'fat client': 'full-featured client',
1632
- 'fat connection': 'high-capacity network connection',
1633
- chubby: 'overextended',
1634
- },
1635
- message: 'Use a precise term such as "%s" instead of "%s" (Google: technical-jargon precision, not people).',
1636
- link: `${WORD_LIST}#fat`,
1637
- ignoreCase: true,
1638
- wordBoundary: true,
1639
- fix: false,
1640
- });
1641
- // ==========================================================================
1642
- // DETECTION-ONLY: structural override, not a per-rule policy.
1643
- //
1644
- // Every individual `fix: false` set above (and every rule that never had a
1645
- // `fix` option to begin with, like `patternRule`/`tokenRule`-built entries)
1646
- // is REDUNDANT with this loop, not load-bearing -- this loop forces every
1647
- // rule in this preset to `fix: false` regardless of what its own builder
1648
- // call sets, so a future contributor cannot silently reintroduce fixing
1649
- // here by adding a new pair, omitting `fix: false` on a new `swapRule()`
1650
- // call, or "fixing" what looks like an oversight. See this file's header
1651
- // doc ("DETECTION-ONLY BY DESIGN" section) and
1652
- // `presets/google/PROVENANCE.md`'s "Detection-only" section for why:
1653
- // adversarial testing of this preset's (and `recheck/microsoft`'s)
1654
- // previously-fixable pairs found real corruption spanning every category
1655
- // once believed safe, including spelling and hyphenation. A rule's
1656
- // category does not predict fix-safety -- so the override is structural,
1657
- // not a per-rule judgment call.
1658
- //
1659
- // The permanent guarantee this creates is `presets.test.ts`/
1660
- // `preset-google.test.ts`'s "no rule in recheck/google is fixable" test,
1661
- // which reads this LIVE returned object (not a hand-maintained list of
1662
- // rule names) -- the same derive-from-the-preset shape the per-pair
1663
- // coverage gate already uses. Detection is unaffected: `execute()` still
1664
- // runs and reports for every rule; only `fix()` is gated off, via
1665
- // `core/runner.ts`'s `rule.fix !== false` check.
1666
- for (const rule of Object.values(rules)) {
1667
- rule.fix = false;
1668
- }
1669
- return rules;
1670
- }
1671
- //# sourceMappingURL=google.js.map