@redocly/recheck 0.14.0 → 2.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -1869
- package/examples/appendices/google.appendix.yaml +1 -1
- package/examples/appendices/inclusive-language.appendix.yaml +1 -1
- package/examples/appendices/microsoft.appendix.yaml +1 -1
- package/examples/appendices/plain-language.appendix.yaml +1 -1
- package/examples/appendices/technical-english.appendix.yaml +1 -1
- package/examples/google.yaml +7 -7
- package/examples/inclusive-language.yaml +7 -7
- package/examples/microsoft.yaml +7 -7
- package/examples/plain-language.yaml +7 -7
- package/examples/technical-english.yaml +7 -7
- package/lib/actions/baseline.d.ts +15 -0
- package/lib/actions/baseline.d.ts.map +1 -0
- package/lib/actions/baseline.js +51 -0
- package/lib/actions/baseline.js.map +1 -0
- package/lib/actions/lint.d.ts +51 -0
- package/lib/actions/lint.d.ts.map +1 -0
- package/lib/actions/lint.js +123 -0
- package/lib/actions/lint.js.map +1 -0
- package/lib/actions/markdoc-schema.d.ts +34 -0
- package/lib/actions/markdoc-schema.d.ts.map +1 -0
- package/lib/actions/markdoc-schema.js +106 -0
- package/lib/actions/markdoc-schema.js.map +1 -0
- package/lib/actions/readability.d.ts +25 -0
- package/lib/actions/readability.d.ts.map +1 -0
- package/lib/actions/readability.js +47 -0
- package/lib/actions/readability.js.map +1 -0
- package/lib/actions/roots.d.ts +7 -0
- package/lib/actions/roots.d.ts.map +1 -0
- package/lib/actions/roots.js +36 -0
- package/lib/actions/roots.js.map +1 -0
- package/lib/config/presets/api-descriptions.d.ts +8 -0
- package/lib/config/presets/api-descriptions.d.ts.map +1 -0
- package/lib/config/presets/api-descriptions.js +24 -0
- package/lib/config/presets/api-descriptions.js.map +1 -0
- package/lib/config/presets/google.d.ts +3 -0
- package/lib/config/presets/google.d.ts.map +1 -0
- package/lib/config/presets/google.js +1086 -0
- package/lib/config/presets/google.js.map +1 -0
- package/lib/config/presets/inclusive-language.d.ts +3 -0
- package/lib/config/presets/inclusive-language.d.ts.map +1 -0
- package/lib/config/presets/inclusive-language.js +151 -0
- package/lib/config/presets/inclusive-language.js.map +1 -0
- package/lib/config/presets/index.d.ts +16 -0
- package/lib/config/presets/index.d.ts.map +1 -0
- package/lib/config/presets/index.js +38 -0
- package/lib/config/presets/index.js.map +1 -0
- package/lib/config/presets/markdoc.d.ts +3 -0
- package/lib/config/presets/markdoc.d.ts.map +1 -0
- package/lib/config/presets/markdoc.js +45 -0
- package/lib/config/presets/markdoc.js.map +1 -0
- package/lib/config/presets/markdown-relaxed.d.ts +3 -0
- package/lib/config/presets/markdown-relaxed.d.ts.map +1 -0
- package/lib/config/presets/markdown-relaxed.js +34 -0
- package/lib/config/presets/markdown-relaxed.js.map +1 -0
- package/lib/config/presets/markdown.d.ts +11 -0
- package/lib/config/presets/markdown.d.ts.map +1 -0
- package/lib/config/presets/markdown.js +73 -0
- package/lib/config/presets/markdown.js.map +1 -0
- package/lib/config/presets/microsoft.d.ts +3 -0
- package/lib/config/presets/microsoft.d.ts.map +1 -0
- package/lib/config/presets/microsoft.js +1260 -0
- package/lib/config/presets/microsoft.js.map +1 -0
- package/lib/config/presets/minimal.d.ts +3 -0
- package/lib/config/presets/minimal.d.ts.map +1 -0
- package/lib/config/presets/minimal.js +13 -0
- package/lib/config/presets/minimal.js.map +1 -0
- package/lib/config/presets/plain-language.d.ts +3 -0
- package/lib/config/presets/plain-language.d.ts.map +1 -0
- package/lib/config/presets/plain-language.js +175 -0
- package/lib/config/presets/plain-language.js.map +1 -0
- package/lib/config/presets/prose.d.ts +3 -0
- package/lib/config/presets/prose.d.ts.map +1 -0
- package/lib/config/presets/prose.js +60 -0
- package/lib/config/presets/prose.js.map +1 -0
- package/lib/config/presets/technical-english.d.ts +22 -0
- package/lib/config/presets/technical-english.d.ts.map +1 -0
- package/lib/config/presets/technical-english.js +61 -0
- package/lib/config/presets/technical-english.js.map +1 -0
- package/lib/config/resolve.d.ts +36 -0
- package/lib/config/resolve.d.ts.map +1 -0
- package/lib/config/resolve.js +106 -0
- package/lib/config/resolve.js.map +1 -0
- package/lib/config/schema.d.ts +215 -0
- package/lib/config/schema.d.ts.map +1 -0
- package/lib/config/schema.js +152 -0
- package/lib/config/schema.js.map +1 -0
- package/lib/config/validate.d.ts +19 -0
- package/lib/config/validate.d.ts.map +1 -0
- package/lib/config/validate.js +1049 -0
- package/lib/config/validate.js.map +1 -0
- package/lib/core/auto-fix.d.ts.map +1 -0
- package/lib/core/auto-fix.js +94 -0
- package/lib/core/auto-fix.js.map +1 -0
- package/lib/core/baseline.d.ts +43 -0
- package/lib/core/baseline.d.ts.map +1 -0
- package/lib/core/baseline.js +142 -0
- package/lib/core/baseline.js.map +1 -0
- package/lib/core/case-preserve.d.ts +11 -0
- package/lib/core/case-preserve.d.ts.map +1 -0
- package/lib/core/case-preserve.js +22 -0
- package/lib/core/case-preserve.js.map +1 -0
- package/lib/core/directives.d.ts.map +1 -0
- package/lib/core/directives.js +66 -0
- package/lib/core/directives.js.map +1 -0
- package/lib/core/files.d.ts +31 -0
- package/lib/core/files.d.ts.map +1 -0
- package/lib/core/files.js +184 -0
- package/lib/core/files.js.map +1 -0
- package/lib/core/inline-code.d.ts +33 -0
- package/lib/core/inline-code.d.ts.map +1 -0
- package/lib/core/inline-code.js +50 -0
- package/lib/core/inline-code.js.map +1 -0
- package/lib/core/line-endings.d.ts +13 -0
- package/lib/core/line-endings.d.ts.map +1 -0
- package/lib/core/line-endings.js +39 -0
- package/lib/core/line-endings.js.map +1 -0
- package/lib/core/markdoc-tags.d.ts +48 -0
- package/lib/core/markdoc-tags.d.ts.map +1 -0
- package/lib/core/markdoc-tags.js +102 -0
- package/lib/core/markdoc-tags.js.map +1 -0
- package/lib/core/prose-extract.d.ts +6 -0
- package/lib/core/prose-extract.d.ts.map +1 -0
- package/lib/core/prose-extract.js +71 -0
- package/lib/core/prose-extract.js.map +1 -0
- package/lib/core/readability.d.ts +17 -0
- package/lib/core/readability.d.ts.map +1 -0
- package/lib/core/readability.js +34 -0
- package/lib/core/readability.js.map +1 -0
- package/lib/core/rule-filters.d.ts +29 -0
- package/lib/core/rule-filters.d.ts.map +1 -0
- package/lib/core/rule-filters.js +88 -0
- package/lib/core/rule-filters.js.map +1 -0
- package/lib/core/runner.d.ts +60 -0
- package/lib/core/runner.d.ts.map +1 -0
- package/lib/core/runner.js +305 -0
- package/lib/core/runner.js.map +1 -0
- package/lib/core/summary.d.ts +4 -0
- package/lib/core/summary.d.ts.map +1 -0
- package/lib/core/summary.js +37 -0
- package/lib/core/summary.js.map +1 -0
- package/lib/core/timing.d.ts +9 -0
- package/lib/core/timing.d.ts.map +1 -0
- package/lib/core/timing.js +19 -0
- package/lib/core/timing.js.map +1 -0
- package/lib/data/markdoc-realm-schema.d.ts.map +1 -0
- package/lib/data/markdoc-realm-schema.js +782 -0
- package/lib/data/markdoc-realm-schema.js.map +1 -0
- package/lib/data/proper-nouns.d.ts.map +1 -0
- package/lib/data/proper-nouns.js +42 -0
- package/lib/data/proper-nouns.js.map +1 -0
- package/lib/data/realm-front-matter-schema.d.ts +12 -0
- package/lib/data/realm-front-matter-schema.d.ts.map +1 -0
- package/lib/data/realm-front-matter-schema.js +51 -0
- package/lib/data/realm-front-matter-schema.js.map +1 -0
- package/lib/index.d.ts +81 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +114 -0
- package/lib/index.js.map +1 -0
- package/lib/metrics/formulas.d.ts +9 -0
- package/lib/metrics/formulas.d.ts.map +1 -0
- package/lib/metrics/formulas.js +59 -0
- package/lib/metrics/formulas.js.map +1 -0
- package/lib/metrics/statistics.d.ts +14 -0
- package/lib/metrics/statistics.d.ts.map +1 -0
- package/lib/metrics/statistics.js +35 -0
- package/lib/metrics/statistics.js.map +1 -0
- package/lib/parser/index.d.ts +13 -0
- package/lib/parser/index.d.ts.map +1 -0
- package/lib/parser/index.js +123 -0
- package/lib/parser/index.js.map +1 -0
- package/lib/parser/markdoc/extract-statics.d.ts +28 -0
- package/lib/parser/markdoc/extract-statics.d.ts.map +1 -0
- package/lib/parser/markdoc/extract-statics.js +80 -0
- package/lib/parser/markdoc/extract-statics.js.map +1 -0
- package/lib/parser/markdoc/pairing.d.ts +38 -0
- package/lib/parser/markdoc/pairing.d.ts.map +1 -0
- package/lib/parser/markdoc/pairing.js +77 -0
- package/lib/parser/markdoc/pairing.js.map +1 -0
- package/lib/parser/markdoc/schema.d.ts +56 -0
- package/lib/parser/markdoc/schema.d.ts.map +1 -0
- package/lib/parser/markdoc/schema.js +60 -0
- package/lib/parser/markdoc/schema.js.map +1 -0
- package/lib/parser/markdoc/span.d.ts +52 -0
- package/lib/parser/markdoc/span.d.ts.map +1 -0
- package/lib/parser/markdoc/span.js +577 -0
- package/lib/parser/markdoc/span.js.map +1 -0
- package/lib/parser/markdoc/structure.d.ts +17 -0
- package/lib/parser/markdoc/structure.d.ts.map +1 -0
- package/lib/parser/markdoc/structure.js +121 -0
- package/lib/parser/markdoc/structure.js.map +1 -0
- package/lib/parser/markdoc/syntax.d.ts +17 -0
- package/lib/parser/markdoc/syntax.d.ts.map +1 -0
- package/lib/parser/markdoc/syntax.js +262 -0
- package/lib/parser/markdoc/syntax.js.map +1 -0
- package/lib/parser/types.d.ts.map +1 -0
- package/lib/presets.d.ts +6 -0
- package/lib/presets.d.ts.map +1 -0
- package/lib/presets.js +12 -0
- package/lib/presets.js.map +1 -0
- package/lib/rules/registry.d.ts +13 -0
- package/lib/rules/registry.d.ts.map +1 -0
- package/lib/rules/registry.js +54 -0
- package/lib/rules/registry.js.map +1 -0
- package/lib/rules/scope/capitalization.d.ts.map +1 -0
- package/lib/rules/scope/capitalization.js +128 -0
- package/lib/rules/scope/capitalization.js.map +1 -0
- package/lib/rules/scope/conditional.d.ts.map +1 -0
- package/lib/rules/scope/conditional.js +93 -0
- package/lib/rules/scope/conditional.js.map +1 -0
- package/lib/rules/scope/consistency.d.ts.map +1 -0
- package/lib/rules/scope/consistency.js +118 -0
- package/lib/rules/scope/consistency.js.map +1 -0
- package/lib/rules/scope/length.d.ts.map +1 -0
- package/lib/rules/scope/length.js +50 -0
- package/lib/rules/scope/length.js.map +1 -0
- package/lib/rules/scope/max-image-size.d.ts.map +1 -0
- package/lib/rules/scope/max-image-size.js +55 -0
- package/lib/rules/scope/max-image-size.js.map +1 -0
- package/lib/rules/scope/metric.d.ts +3 -0
- package/lib/rules/scope/metric.d.ts.map +1 -0
- package/lib/rules/scope/metric.js +59 -0
- package/lib/rules/scope/metric.js.map +1 -0
- package/lib/rules/scope/occurrence.d.ts.map +1 -0
- package/lib/rules/scope/occurrence.js +41 -0
- package/lib/rules/scope/occurrence.js.map +1 -0
- package/lib/rules/scope/pattern.d.ts.map +1 -0
- package/lib/rules/scope/pattern.js +58 -0
- package/lib/rules/scope/pattern.js.map +1 -0
- package/lib/rules/scope/repetition.d.ts.map +1 -0
- package/lib/rules/scope/repetition.js +134 -0
- package/lib/rules/scope/repetition.js.map +1 -0
- package/lib/rules/scope/semantic-line-breaks.d.ts.map +1 -0
- package/lib/rules/scope/semantic-line-breaks.js +180 -0
- package/lib/rules/scope/semantic-line-breaks.js.map +1 -0
- package/lib/rules/scope/spelling.d.ts +11 -0
- package/lib/rules/scope/spelling.d.ts.map +1 -0
- package/lib/rules/scope/spelling.js +146 -0
- package/lib/rules/scope/spelling.js.map +1 -0
- package/lib/rules/scope/swap.d.ts.map +1 -0
- package/lib/rules/scope/swap.js +111 -0
- package/lib/rules/scope/swap.js.map +1 -0
- package/lib/rules/scope/title-case.d.ts +24 -0
- package/lib/rules/scope/title-case.d.ts.map +1 -0
- package/lib/rules/scope/title-case.js +216 -0
- package/lib/rules/scope/title-case.js.map +1 -0
- package/lib/rules/token/blanks-around-fences.d.ts.map +1 -0
- package/lib/rules/token/blanks-around-fences.js.map +1 -0
- package/lib/rules/token/blanks-around-headings.d.ts.map +1 -0
- package/lib/rules/token/blanks-around-headings.js +96 -0
- package/lib/rules/token/blanks-around-headings.js.map +1 -0
- package/lib/rules/token/blanks-around-lists.d.ts.map +1 -0
- package/lib/rules/token/blanks-around-lists.js +48 -0
- package/lib/rules/token/blanks-around-lists.js.map +1 -0
- package/lib/rules/token/blanks-around-tables.d.ts.map +1 -0
- package/lib/rules/token/blanks-around-tables.js +40 -0
- package/lib/rules/token/blanks-around-tables.js.map +1 -0
- package/lib/rules/token/code-block-style.d.ts.map +1 -0
- package/lib/rules/token/code-block-style.js.map +1 -0
- package/lib/rules/token/code-fence-style.d.ts.map +1 -0
- package/lib/rules/token/code-fence-style.js.map +1 -0
- package/lib/rules/token/commands-show-output.d.ts.map +1 -0
- package/lib/rules/token/commands-show-output.js.map +1 -0
- package/lib/rules/token/descriptive-link-text.d.ts.map +1 -0
- package/lib/rules/token/descriptive-link-text.js +46 -0
- package/lib/rules/token/descriptive-link-text.js.map +1 -0
- package/lib/rules/token/fenced-code-language.d.ts.map +1 -0
- package/lib/rules/token/fenced-code-language.js.map +1 -0
- package/lib/rules/token/first-line-h1.d.ts.map +1 -0
- package/lib/rules/token/first-line-h1.js +83 -0
- package/lib/rules/token/first-line-h1.js.map +1 -0
- package/lib/rules/token/front-matter.d.ts.map +1 -0
- package/lib/rules/token/front-matter.js +169 -0
- package/lib/rules/token/front-matter.js.map +1 -0
- package/lib/rules/token/heading-increment.d.ts.map +1 -0
- package/lib/rules/token/heading-increment.js +26 -0
- package/lib/rules/token/heading-increment.js.map +1 -0
- package/lib/rules/token/heading-start-left.d.ts.map +1 -0
- package/lib/rules/token/heading-start-left.js.map +1 -0
- package/lib/rules/token/heading-style.d.ts.map +1 -0
- package/lib/rules/token/heading-style.js.map +1 -0
- package/lib/rules/token/helpers.d.ts +115 -0
- package/lib/rules/token/helpers.d.ts.map +1 -0
- package/lib/rules/token/helpers.js +502 -0
- package/lib/rules/token/helpers.js.map +1 -0
- package/lib/rules/token/hr-style.d.ts.map +1 -0
- package/lib/rules/token/hr-style.js.map +1 -0
- package/lib/rules/token/index.d.ts +65 -0
- package/lib/rules/token/index.d.ts.map +1 -0
- package/lib/rules/token/index.js +157 -0
- package/lib/rules/token/index.js.map +1 -0
- package/lib/rules/token/line-length.d.ts.map +1 -0
- package/lib/rules/token/line-length.js +96 -0
- package/lib/rules/token/line-length.js.map +1 -0
- package/lib/rules/token/link-fragments.d.ts.map +1 -0
- package/lib/rules/token/link-fragments.js +398 -0
- package/lib/rules/token/link-fragments.js.map +1 -0
- package/lib/rules/token/link-image-reference-definitions.d.ts.map +1 -0
- package/lib/rules/token/link-image-reference-definitions.js.map +1 -0
- package/lib/rules/token/link-image-style.d.ts.map +1 -0
- package/lib/rules/token/link-image-style.js +138 -0
- package/lib/rules/token/link-image-style.js.map +1 -0
- package/lib/rules/token/list-indent.d.ts.map +1 -0
- package/lib/rules/token/list-indent.js.map +1 -0
- package/lib/rules/token/list-length.d.ts.map +1 -0
- package/lib/rules/token/list-length.js +31 -0
- package/lib/rules/token/list-length.js.map +1 -0
- package/lib/rules/token/list-marker-space.d.ts.map +1 -0
- package/lib/rules/token/list-marker-space.js.map +1 -0
- package/lib/rules/token/markdoc-attributes.d.ts.map +1 -0
- package/lib/rules/token/markdoc-attributes.js +198 -0
- package/lib/rules/token/markdoc-attributes.js.map +1 -0
- package/lib/rules/token/markdoc-pairing.d.ts.map +1 -0
- package/lib/rules/token/markdoc-pairing.js +65 -0
- package/lib/rules/token/markdoc-pairing.js.map +1 -0
- package/lib/rules/token/markdoc-syntax.d.ts.map +1 -0
- package/lib/rules/token/markdoc-syntax.js +84 -0
- package/lib/rules/token/markdoc-syntax.js.map +1 -0
- package/lib/rules/token/markdoc-unknown-tag.d.ts.map +1 -0
- package/lib/rules/token/markdoc-unknown-tag.js +44 -0
- package/lib/rules/token/markdoc-unknown-tag.js.map +1 -0
- package/lib/rules/token/no-alt-text.d.ts.map +1 -0
- package/lib/rules/token/no-alt-text.js +43 -0
- package/lib/rules/token/no-alt-text.js.map +1 -0
- package/lib/rules/token/no-bare-urls.d.ts.map +1 -0
- package/lib/rules/token/no-bare-urls.js +74 -0
- package/lib/rules/token/no-bare-urls.js.map +1 -0
- package/lib/rules/token/no-blanks-blockquote.d.ts.map +1 -0
- package/lib/rules/token/no-blanks-blockquote.js.map +1 -0
- package/lib/rules/token/no-duplicate-heading.d.ts.map +1 -0
- package/lib/rules/token/no-duplicate-heading.js +89 -0
- package/lib/rules/token/no-duplicate-heading.js.map +1 -0
- package/lib/rules/token/no-duplicate-link-destinations.d.ts.map +1 -0
- package/lib/rules/token/no-duplicate-link-destinations.js +54 -0
- package/lib/rules/token/no-duplicate-link-destinations.js.map +1 -0
- package/lib/rules/token/no-emphasis-as-heading.d.ts.map +1 -0
- package/lib/rules/token/no-emphasis-as-heading.js +39 -0
- package/lib/rules/token/no-emphasis-as-heading.js.map +1 -0
- package/lib/rules/token/no-empty-headings.d.ts.map +1 -0
- package/lib/rules/token/no-empty-headings.js +21 -0
- package/lib/rules/token/no-empty-headings.js.map +1 -0
- package/lib/rules/token/no-empty-links.d.ts.map +1 -0
- package/lib/rules/token/no-empty-links.js.map +1 -0
- package/lib/rules/token/no-hard-tabs.d.ts.map +1 -0
- package/lib/rules/token/no-hard-tabs.js.map +1 -0
- package/lib/rules/token/no-inline-html.d.ts.map +1 -0
- package/lib/rules/token/no-inline-html.js +41 -0
- package/lib/rules/token/no-inline-html.js.map +1 -0
- package/lib/rules/token/no-multiple-blanks.d.ts.map +1 -0
- package/lib/rules/token/no-multiple-blanks.js.map +1 -0
- package/lib/rules/token/no-multiple-space-atx.d.ts +9 -0
- package/lib/rules/token/no-multiple-space-atx.d.ts.map +1 -0
- package/lib/rules/token/no-multiple-space-atx.js +46 -0
- package/lib/rules/token/no-multiple-space-atx.js.map +1 -0
- package/lib/rules/token/no-multiple-space-closed-atx.d.ts.map +1 -0
- package/lib/rules/token/no-multiple-space-closed-atx.js.map +1 -0
- package/lib/rules/token/no-reversed-links.d.ts.map +1 -0
- package/lib/rules/token/no-reversed-links.js.map +1 -0
- package/lib/rules/token/no-space-in-code.d.ts.map +1 -0
- package/lib/rules/token/no-space-in-code.js.map +1 -0
- package/lib/rules/token/no-space-in-emphasis.d.ts.map +1 -0
- package/lib/rules/token/no-space-in-emphasis.js +72 -0
- package/lib/rules/token/no-space-in-emphasis.js.map +1 -0
- package/lib/rules/token/no-space-in-links.d.ts.map +1 -0
- package/lib/rules/token/no-space-in-links.js.map +1 -0
- package/lib/rules/token/no-trailing-punctuation.d.ts.map +1 -0
- package/lib/rules/token/no-trailing-punctuation.js.map +1 -0
- package/lib/rules/token/no-trailing-spaces.d.ts.map +1 -0
- package/lib/rules/token/no-trailing-spaces.js.map +1 -0
- package/lib/rules/token/ol-prefix.d.ts.map +1 -0
- package/lib/rules/token/ol-prefix.js.map +1 -0
- package/lib/rules/token/proper-names.d.ts.map +1 -0
- package/lib/rules/token/proper-names.js +87 -0
- package/lib/rules/token/proper-names.js.map +1 -0
- package/lib/rules/token/reference-links-images.d.ts.map +1 -0
- package/lib/rules/token/reference-links-images.js.map +1 -0
- package/lib/rules/token/required-headings.d.ts.map +1 -0
- package/lib/rules/token/required-headings.js +73 -0
- package/lib/rules/token/required-headings.js.map +1 -0
- package/lib/rules/token/single-h1.d.ts.map +1 -0
- package/lib/rules/token/single-h1.js +43 -0
- package/lib/rules/token/single-h1.js.map +1 -0
- package/lib/rules/token/table-column-count.d.ts.map +1 -0
- package/lib/rules/token/table-column-count.js.map +1 -0
- package/lib/rules/token/table-column-style.d.ts.map +1 -0
- package/lib/rules/token/table-column-style.js +162 -0
- package/lib/rules/token/table-column-style.js.map +1 -0
- package/lib/rules/token/table-pipe-style.d.ts.map +1 -0
- package/lib/rules/token/table-pipe-style.js.map +1 -0
- package/lib/rules/token/ul-indent.d.ts.map +1 -0
- package/lib/rules/token/ul-indent.js.map +1 -0
- package/lib/rules/token/ul-style.d.ts.map +1 -0
- package/lib/rules/token/ul-style.js +70 -0
- package/lib/rules/token/ul-style.js.map +1 -0
- package/lib/rules/types.d.ts +62 -0
- package/lib/rules/types.d.ts.map +1 -0
- package/lib/rules/utils.d.ts +18 -0
- package/lib/rules/utils.d.ts.map +1 -0
- package/lib/rules/utils.js +75 -0
- package/lib/rules/utils.js.map +1 -0
- package/lib/scopes/extractor.d.ts +6 -0
- package/lib/scopes/extractor.d.ts.map +1 -0
- package/lib/scopes/extractor.js +398 -0
- package/lib/scopes/extractor.js.map +1 -0
- package/lib/scopes/selector.d.ts +26 -0
- package/lib/scopes/selector.d.ts.map +1 -0
- package/lib/scopes/selector.js +78 -0
- package/lib/scopes/selector.js.map +1 -0
- package/lib/scopes/sentences.d.ts +13 -0
- package/lib/scopes/sentences.d.ts.map +1 -0
- package/lib/scopes/sentences.js +237 -0
- package/lib/scopes/sentences.js.map +1 -0
- package/lib/scopes/types.d.ts +35 -0
- package/lib/scopes/types.d.ts.map +1 -0
- package/lib/scopes/vocabulary.d.ts +12 -0
- package/lib/scopes/vocabulary.d.ts.map +1 -0
- package/lib/scopes/vocabulary.js +56 -0
- package/lib/scopes/vocabulary.js.map +1 -0
- package/lib/types/assertions.d.ts +97 -0
- package/lib/types/assertions.d.ts.map +1 -0
- package/lib/types/reporting.d.ts +23 -0
- package/lib/types/reporting.d.ts.map +1 -0
- package/lib/types/rules.d.ts +53 -0
- package/lib/types/rules.d.ts.map +1 -0
- package/lib/types/validation.d.ts +5 -0
- package/lib/types/validation.d.ts.map +1 -0
- package/lib/utils/is-plain-object.d.ts +2 -0
- package/lib/utils/is-plain-object.d.ts.map +1 -0
- package/lib/utils/is-plain-object.js +5 -0
- package/lib/utils/is-plain-object.js.map +1 -0
- package/package.json +58 -61
- package/presets/google/PROVENANCE.md +217 -221
- package/presets/inclusive-language/PROVENANCE.md +20 -19
- package/presets/microsoft/PROVENANCE.md +242 -243
- package/presets/plain-language/PROVENANCE.md +66 -60
- package/presets/technical-english/PROVENANCE.md +5 -5
- package/skills/recheck-config/SKILL.md +70 -20
- package/skills/recheck-lint/SKILL.md +37 -13
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -228
- package/dist/cli.js.map +0 -1
- package/dist/commands/baseline.d.ts +0 -10
- package/dist/commands/baseline.d.ts.map +0 -1
- package/dist/commands/baseline.js +0 -59
- package/dist/commands/baseline.js.map +0 -1
- package/dist/commands/markdoc-schema.d.ts +0 -17
- package/dist/commands/markdoc-schema.d.ts.map +0 -1
- package/dist/commands/markdoc-schema.js +0 -127
- package/dist/commands/markdoc-schema.js.map +0 -1
- package/dist/commands/readability.d.ts +0 -10
- package/dist/commands/readability.d.ts.map +0 -1
- package/dist/commands/readability.js +0 -90
- package/dist/commands/readability.js.map +0 -1
- package/dist/commands/run.d.ts +0 -21
- package/dist/commands/run.d.ts.map +0 -1
- package/dist/commands/run.js +0 -236
- package/dist/commands/run.js.map +0 -1
- package/dist/commands/validate.d.ts +0 -8
- package/dist/commands/validate.d.ts.map +0 -1
- package/dist/commands/validate.js +0 -43
- package/dist/commands/validate.js.map +0 -1
- package/dist/config/load.d.ts +0 -33
- package/dist/config/load.d.ts.map +0 -1
- package/dist/config/load.js +0 -98
- package/dist/config/load.js.map +0 -1
- package/dist/config/presets/api-descriptions.d.ts +0 -8
- package/dist/config/presets/api-descriptions.d.ts.map +0 -1
- package/dist/config/presets/api-descriptions.js +0 -24
- package/dist/config/presets/api-descriptions.js.map +0 -1
- package/dist/config/presets/google.d.ts +0 -3
- package/dist/config/presets/google.d.ts.map +0 -1
- package/dist/config/presets/google.js +0 -1671
- package/dist/config/presets/google.js.map +0 -1
- package/dist/config/presets/inclusive-language.d.ts +0 -3
- package/dist/config/presets/inclusive-language.d.ts.map +0 -1
- package/dist/config/presets/inclusive-language.js +0 -321
- package/dist/config/presets/inclusive-language.js.map +0 -1
- package/dist/config/presets/index.d.ts +0 -67
- package/dist/config/presets/index.d.ts.map +0 -1
- package/dist/config/presets/index.js +0 -141
- package/dist/config/presets/index.js.map +0 -1
- package/dist/config/presets/markdoc.d.ts +0 -21
- package/dist/config/presets/markdoc.d.ts.map +0 -1
- package/dist/config/presets/markdoc.js +0 -101
- package/dist/config/presets/markdoc.js.map +0 -1
- package/dist/config/presets/markdown-relaxed.d.ts +0 -3
- package/dist/config/presets/markdown-relaxed.d.ts.map +0 -1
- package/dist/config/presets/markdown-relaxed.js +0 -98
- package/dist/config/presets/markdown-relaxed.js.map +0 -1
- package/dist/config/presets/markdown.d.ts +0 -43
- package/dist/config/presets/markdown.d.ts.map +0 -1
- package/dist/config/presets/markdown.js +0 -132
- package/dist/config/presets/markdown.js.map +0 -1
- package/dist/config/presets/microsoft.d.ts +0 -3
- package/dist/config/presets/microsoft.d.ts.map +0 -1
- package/dist/config/presets/microsoft.js +0 -2268
- package/dist/config/presets/microsoft.js.map +0 -1
- package/dist/config/presets/minimal.d.ts +0 -3
- package/dist/config/presets/minimal.d.ts.map +0 -1
- package/dist/config/presets/minimal.js +0 -21
- package/dist/config/presets/minimal.js.map +0 -1
- package/dist/config/presets/plain-language.d.ts +0 -3
- package/dist/config/presets/plain-language.d.ts.map +0 -1
- package/dist/config/presets/plain-language.js +0 -351
- package/dist/config/presets/plain-language.js.map +0 -1
- package/dist/config/presets/prose.d.ts +0 -52
- package/dist/config/presets/prose.d.ts.map +0 -1
- package/dist/config/presets/prose.js +0 -138
- package/dist/config/presets/prose.js.map +0 -1
- package/dist/config/presets/technical-english.d.ts +0 -34
- package/dist/config/presets/technical-english.d.ts.map +0 -1
- package/dist/config/presets/technical-english.js +0 -79
- package/dist/config/presets/technical-english.js.map +0 -1
- package/dist/config/schema.d.ts +0 -226
- package/dist/config/schema.d.ts.map +0 -1
- package/dist/config/schema.js +0 -196
- package/dist/config/schema.js.map +0 -1
- package/dist/config/validate.d.ts +0 -22
- package/dist/config/validate.d.ts.map +0 -1
- package/dist/config/validate.js +0 -1296
- package/dist/config/validate.js.map +0 -1
- package/dist/core/auto-fix.d.ts.map +0 -1
- package/dist/core/auto-fix.js +0 -101
- package/dist/core/auto-fix.js.map +0 -1
- package/dist/core/baseline.d.ts +0 -49
- package/dist/core/baseline.d.ts.map +0 -1
- package/dist/core/baseline.js +0 -0
- package/dist/core/baseline.js.map +0 -1
- package/dist/core/case-preserve.d.ts +0 -46
- package/dist/core/case-preserve.d.ts.map +0 -1
- package/dist/core/case-preserve.js +0 -57
- package/dist/core/case-preserve.js.map +0 -1
- package/dist/core/directives.d.ts.map +0 -1
- package/dist/core/directives.js +0 -73
- package/dist/core/directives.js.map +0 -1
- package/dist/core/files.d.ts +0 -69
- package/dist/core/files.d.ts.map +0 -1
- package/dist/core/files.js +0 -260
- package/dist/core/files.js.map +0 -1
- package/dist/core/inline-code.d.ts +0 -87
- package/dist/core/inline-code.d.ts.map +0 -1
- package/dist/core/inline-code.js +0 -104
- package/dist/core/inline-code.js.map +0 -1
- package/dist/core/line-endings.d.ts +0 -32
- package/dist/core/line-endings.d.ts.map +0 -1
- package/dist/core/line-endings.js +0 -65
- package/dist/core/line-endings.js.map +0 -1
- package/dist/core/markdoc-tags.d.ts +0 -79
- package/dist/core/markdoc-tags.d.ts.map +0 -1
- package/dist/core/markdoc-tags.js +0 -131
- package/dist/core/markdoc-tags.js.map +0 -1
- package/dist/core/prose-extract.d.ts +0 -6
- package/dist/core/prose-extract.d.ts.map +0 -1
- package/dist/core/prose-extract.js +0 -79
- package/dist/core/prose-extract.js.map +0 -1
- package/dist/core/readability.d.ts +0 -17
- package/dist/core/readability.d.ts.map +0 -1
- package/dist/core/readability.js +0 -37
- package/dist/core/readability.js.map +0 -1
- package/dist/core/rule-filters.d.ts +0 -45
- package/dist/core/rule-filters.d.ts.map +0 -1
- package/dist/core/rule-filters.js +0 -118
- package/dist/core/rule-filters.js.map +0 -1
- package/dist/core/runner.d.ts +0 -99
- package/dist/core/runner.d.ts.map +0 -1
- package/dist/core/runner.js +0 -401
- package/dist/core/runner.js.map +0 -1
- package/dist/core/timing.d.ts +0 -24
- package/dist/core/timing.d.ts.map +0 -1
- package/dist/core/timing.js +0 -39
- package/dist/core/timing.js.map +0 -1
- package/dist/data/markdoc-realm-schema.d.ts.map +0 -1
- package/dist/data/markdoc-realm-schema.js +0 -798
- package/dist/data/markdoc-realm-schema.js.map +0 -1
- package/dist/data/proper-nouns.d.ts.map +0 -1
- package/dist/data/proper-nouns.js +0 -47
- package/dist/data/proper-nouns.js.map +0 -1
- package/dist/data/realm-front-matter-schema.d.ts +0 -28
- package/dist/data/realm-front-matter-schema.d.ts.map +0 -1
- package/dist/data/realm-front-matter-schema.js +0 -73
- package/dist/data/realm-front-matter-schema.js.map +0 -1
- package/dist/index.d.ts +0 -90
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -152
- package/dist/index.js.map +0 -1
- package/dist/metrics/formulas.d.ts +0 -17
- package/dist/metrics/formulas.d.ts.map +0 -1
- package/dist/metrics/formulas.js +0 -70
- package/dist/metrics/formulas.js.map +0 -1
- package/dist/metrics/statistics.d.ts +0 -27
- package/dist/metrics/statistics.d.ts.map +0 -1
- package/dist/metrics/statistics.js +0 -56
- package/dist/metrics/statistics.js.map +0 -1
- package/dist/parser/index.d.ts +0 -19
- package/dist/parser/index.d.ts.map +0 -1
- package/dist/parser/index.js +0 -174
- package/dist/parser/index.js.map +0 -1
- package/dist/parser/markdoc/extract-statics.d.ts +0 -45
- package/dist/parser/markdoc/extract-statics.d.ts.map +0 -1
- package/dist/parser/markdoc/extract-statics.js +0 -139
- package/dist/parser/markdoc/extract-statics.js.map +0 -1
- package/dist/parser/markdoc/pairing.d.ts +0 -63
- package/dist/parser/markdoc/pairing.d.ts.map +0 -1
- package/dist/parser/markdoc/pairing.js +0 -94
- package/dist/parser/markdoc/pairing.js.map +0 -1
- package/dist/parser/markdoc/schema.d.ts +0 -85
- package/dist/parser/markdoc/schema.d.ts.map +0 -1
- package/dist/parser/markdoc/schema.js +0 -86
- package/dist/parser/markdoc/schema.js.map +0 -1
- package/dist/parser/markdoc/span.d.ts +0 -64
- package/dist/parser/markdoc/span.d.ts.map +0 -1
- package/dist/parser/markdoc/span.js +0 -729
- package/dist/parser/markdoc/span.js.map +0 -1
- package/dist/parser/markdoc/structure.d.ts +0 -28
- package/dist/parser/markdoc/structure.d.ts.map +0 -1
- package/dist/parser/markdoc/structure.js +0 -153
- package/dist/parser/markdoc/structure.js.map +0 -1
- package/dist/parser/markdoc/syntax.d.ts +0 -44
- package/dist/parser/markdoc/syntax.d.ts.map +0 -1
- package/dist/parser/markdoc/syntax.js +0 -317
- package/dist/parser/markdoc/syntax.js.map +0 -1
- package/dist/parser/types.d.ts.map +0 -1
- package/dist/reporter/fixes.d.ts +0 -3
- package/dist/reporter/fixes.d.ts.map +0 -1
- package/dist/reporter/fixes.js +0 -41
- package/dist/reporter/fixes.js.map +0 -1
- package/dist/reporter/formats/github-actions.d.ts +0 -6
- package/dist/reporter/formats/github-actions.d.ts.map +0 -1
- package/dist/reporter/formats/github-actions.js +0 -20
- package/dist/reporter/formats/github-actions.js.map +0 -1
- package/dist/reporter/formats/json.d.ts +0 -10
- package/dist/reporter/formats/json.d.ts.map +0 -1
- package/dist/reporter/formats/json.js +0 -25
- package/dist/reporter/formats/json.js.map +0 -1
- package/dist/reporter/formats/sarif.d.ts +0 -10
- package/dist/reporter/formats/sarif.d.ts.map +0 -1
- package/dist/reporter/formats/sarif.js +0 -66
- package/dist/reporter/formats/sarif.js.map +0 -1
- package/dist/reporter/formats/table.d.ts +0 -6
- package/dist/reporter/formats/table.d.ts.map +0 -1
- package/dist/reporter/formats/table.js +0 -43
- package/dist/reporter/formats/table.js.map +0 -1
- package/dist/reporter/index.d.ts +0 -10
- package/dist/reporter/index.d.ts.map +0 -1
- package/dist/reporter/index.js +0 -42
- package/dist/reporter/index.js.map +0 -1
- package/dist/reporter/prioritize-problems.d.ts +0 -7
- package/dist/reporter/prioritize-problems.d.ts.map +0 -1
- package/dist/reporter/prioritize-problems.js +0 -29
- package/dist/reporter/prioritize-problems.js.map +0 -1
- package/dist/reporter/statistics.d.ts +0 -10
- package/dist/reporter/statistics.d.ts.map +0 -1
- package/dist/reporter/statistics.js +0 -52
- package/dist/reporter/statistics.js.map +0 -1
- package/dist/reporter/summary.d.ts +0 -10
- package/dist/reporter/summary.d.ts.map +0 -1
- package/dist/reporter/summary.js +0 -49
- package/dist/reporter/summary.js.map +0 -1
- package/dist/rules/registry.d.ts +0 -15
- package/dist/rules/registry.d.ts.map +0 -1
- package/dist/rules/registry.js +0 -81
- package/dist/rules/registry.js.map +0 -1
- package/dist/rules/scope/capitalization.d.ts.map +0 -1
- package/dist/rules/scope/capitalization.js +0 -164
- package/dist/rules/scope/capitalization.js.map +0 -1
- package/dist/rules/scope/conditional.d.ts.map +0 -1
- package/dist/rules/scope/conditional.js +0 -112
- package/dist/rules/scope/conditional.js.map +0 -1
- package/dist/rules/scope/consistency.d.ts.map +0 -1
- package/dist/rules/scope/consistency.js +0 -179
- package/dist/rules/scope/consistency.js.map +0 -1
- package/dist/rules/scope/length.d.ts.map +0 -1
- package/dist/rules/scope/length.js +0 -73
- package/dist/rules/scope/length.js.map +0 -1
- package/dist/rules/scope/max-image-size.d.ts.map +0 -1
- package/dist/rules/scope/max-image-size.js +0 -65
- package/dist/rules/scope/max-image-size.js.map +0 -1
- package/dist/rules/scope/metric.d.ts +0 -5
- package/dist/rules/scope/metric.d.ts.map +0 -1
- package/dist/rules/scope/metric.js +0 -59
- package/dist/rules/scope/metric.js.map +0 -1
- package/dist/rules/scope/occurrence.d.ts.map +0 -1
- package/dist/rules/scope/occurrence.js +0 -48
- package/dist/rules/scope/occurrence.js.map +0 -1
- package/dist/rules/scope/pattern.d.ts.map +0 -1
- package/dist/rules/scope/pattern.js +0 -75
- package/dist/rules/scope/pattern.js.map +0 -1
- package/dist/rules/scope/repetition.d.ts.map +0 -1
- package/dist/rules/scope/repetition.js +0 -139
- package/dist/rules/scope/repetition.js.map +0 -1
- package/dist/rules/scope/semantic-line-breaks.d.ts.map +0 -1
- package/dist/rules/scope/semantic-line-breaks.js +0 -236
- package/dist/rules/scope/semantic-line-breaks.js.map +0 -1
- package/dist/rules/scope/spelling.d.ts +0 -27
- package/dist/rules/scope/spelling.d.ts.map +0 -1
- package/dist/rules/scope/spelling.js +0 -227
- package/dist/rules/scope/spelling.js.map +0 -1
- package/dist/rules/scope/swap.d.ts.map +0 -1
- package/dist/rules/scope/swap.js +0 -149
- package/dist/rules/scope/swap.js.map +0 -1
- package/dist/rules/scope/title-case.d.ts +0 -46
- package/dist/rules/scope/title-case.d.ts.map +0 -1
- package/dist/rules/scope/title-case.js +0 -301
- package/dist/rules/scope/title-case.js.map +0 -1
- package/dist/rules/token/blanks-around-fences.d.ts.map +0 -1
- package/dist/rules/token/blanks-around-fences.js.map +0 -1
- package/dist/rules/token/blanks-around-headings.d.ts.map +0 -1
- package/dist/rules/token/blanks-around-headings.js +0 -108
- package/dist/rules/token/blanks-around-headings.js.map +0 -1
- package/dist/rules/token/blanks-around-lists.d.ts.map +0 -1
- package/dist/rules/token/blanks-around-lists.js +0 -56
- package/dist/rules/token/blanks-around-lists.js.map +0 -1
- package/dist/rules/token/blanks-around-tables.d.ts.map +0 -1
- package/dist/rules/token/blanks-around-tables.js +0 -42
- package/dist/rules/token/blanks-around-tables.js.map +0 -1
- package/dist/rules/token/code-block-style.d.ts.map +0 -1
- package/dist/rules/token/code-block-style.js.map +0 -1
- package/dist/rules/token/code-fence-style.d.ts.map +0 -1
- package/dist/rules/token/code-fence-style.js.map +0 -1
- package/dist/rules/token/commands-show-output.d.ts.map +0 -1
- package/dist/rules/token/commands-show-output.js.map +0 -1
- package/dist/rules/token/descriptive-link-text.d.ts.map +0 -1
- package/dist/rules/token/descriptive-link-text.js +0 -53
- package/dist/rules/token/descriptive-link-text.js.map +0 -1
- package/dist/rules/token/fenced-code-language.d.ts.map +0 -1
- package/dist/rules/token/fenced-code-language.js.map +0 -1
- package/dist/rules/token/first-line-h1.d.ts.map +0 -1
- package/dist/rules/token/first-line-h1.js +0 -107
- package/dist/rules/token/first-line-h1.js.map +0 -1
- package/dist/rules/token/front-matter.d.ts.map +0 -1
- package/dist/rules/token/front-matter.js +0 -177
- package/dist/rules/token/front-matter.js.map +0 -1
- package/dist/rules/token/heading-increment.d.ts.map +0 -1
- package/dist/rules/token/heading-increment.js +0 -27
- package/dist/rules/token/heading-increment.js.map +0 -1
- package/dist/rules/token/heading-start-left.d.ts.map +0 -1
- package/dist/rules/token/heading-start-left.js.map +0 -1
- package/dist/rules/token/heading-style.d.ts.map +0 -1
- package/dist/rules/token/heading-style.js.map +0 -1
- package/dist/rules/token/helpers.d.ts +0 -313
- package/dist/rules/token/helpers.d.ts.map +0 -1
- package/dist/rules/token/helpers.js +0 -746
- package/dist/rules/token/helpers.js.map +0 -1
- package/dist/rules/token/hr-style.d.ts.map +0 -1
- package/dist/rules/token/hr-style.js.map +0 -1
- package/dist/rules/token/index.d.ts +0 -76
- package/dist/rules/token/index.d.ts.map +0 -1
- package/dist/rules/token/index.js +0 -229
- package/dist/rules/token/index.js.map +0 -1
- package/dist/rules/token/line-length.d.ts.map +0 -1
- package/dist/rules/token/line-length.js +0 -120
- package/dist/rules/token/line-length.js.map +0 -1
- package/dist/rules/token/link-fragments.d.ts.map +0 -1
- package/dist/rules/token/link-fragments.js +0 -393
- package/dist/rules/token/link-fragments.js.map +0 -1
- package/dist/rules/token/link-image-reference-definitions.d.ts.map +0 -1
- package/dist/rules/token/link-image-reference-definitions.js.map +0 -1
- package/dist/rules/token/link-image-style.d.ts.map +0 -1
- package/dist/rules/token/link-image-style.js +0 -131
- package/dist/rules/token/link-image-style.js.map +0 -1
- package/dist/rules/token/list-indent.d.ts.map +0 -1
- package/dist/rules/token/list-indent.js.map +0 -1
- package/dist/rules/token/list-length.d.ts.map +0 -1
- package/dist/rules/token/list-length.js +0 -55
- package/dist/rules/token/list-length.js.map +0 -1
- package/dist/rules/token/list-marker-space.d.ts.map +0 -1
- package/dist/rules/token/list-marker-space.js.map +0 -1
- package/dist/rules/token/markdoc-attributes.d.ts.map +0 -1
- package/dist/rules/token/markdoc-attributes.js +0 -269
- package/dist/rules/token/markdoc-attributes.js.map +0 -1
- package/dist/rules/token/markdoc-pairing.d.ts.map +0 -1
- package/dist/rules/token/markdoc-pairing.js +0 -73
- package/dist/rules/token/markdoc-pairing.js.map +0 -1
- package/dist/rules/token/markdoc-syntax.d.ts.map +0 -1
- package/dist/rules/token/markdoc-syntax.js +0 -119
- package/dist/rules/token/markdoc-syntax.js.map +0 -1
- package/dist/rules/token/markdoc-unknown-tag.d.ts.map +0 -1
- package/dist/rules/token/markdoc-unknown-tag.js +0 -64
- package/dist/rules/token/markdoc-unknown-tag.js.map +0 -1
- package/dist/rules/token/no-alt-text.d.ts.map +0 -1
- package/dist/rules/token/no-alt-text.js +0 -47
- package/dist/rules/token/no-alt-text.js.map +0 -1
- package/dist/rules/token/no-bare-urls.d.ts.map +0 -1
- package/dist/rules/token/no-bare-urls.js +0 -88
- package/dist/rules/token/no-bare-urls.js.map +0 -1
- package/dist/rules/token/no-blanks-blockquote.d.ts.map +0 -1
- package/dist/rules/token/no-blanks-blockquote.js.map +0 -1
- package/dist/rules/token/no-duplicate-heading.d.ts.map +0 -1
- package/dist/rules/token/no-duplicate-heading.js +0 -101
- package/dist/rules/token/no-duplicate-heading.js.map +0 -1
- package/dist/rules/token/no-duplicate-link-destinations.d.ts.map +0 -1
- package/dist/rules/token/no-duplicate-link-destinations.js +0 -65
- package/dist/rules/token/no-duplicate-link-destinations.js.map +0 -1
- package/dist/rules/token/no-emphasis-as-heading.d.ts.map +0 -1
- package/dist/rules/token/no-emphasis-as-heading.js +0 -44
- package/dist/rules/token/no-emphasis-as-heading.js.map +0 -1
- package/dist/rules/token/no-empty-headings.d.ts.map +0 -1
- package/dist/rules/token/no-empty-headings.js +0 -28
- package/dist/rules/token/no-empty-headings.js.map +0 -1
- package/dist/rules/token/no-empty-links.d.ts.map +0 -1
- package/dist/rules/token/no-empty-links.js.map +0 -1
- package/dist/rules/token/no-hard-tabs.d.ts.map +0 -1
- package/dist/rules/token/no-hard-tabs.js.map +0 -1
- package/dist/rules/token/no-inline-html.d.ts.map +0 -1
- package/dist/rules/token/no-inline-html.js +0 -45
- package/dist/rules/token/no-inline-html.js.map +0 -1
- package/dist/rules/token/no-multiple-blanks.d.ts.map +0 -1
- package/dist/rules/token/no-multiple-blanks.js.map +0 -1
- package/dist/rules/token/no-multiple-space-atx.d.ts +0 -13
- package/dist/rules/token/no-multiple-space-atx.d.ts.map +0 -1
- package/dist/rules/token/no-multiple-space-atx.js +0 -50
- package/dist/rules/token/no-multiple-space-atx.js.map +0 -1
- package/dist/rules/token/no-multiple-space-closed-atx.d.ts.map +0 -1
- package/dist/rules/token/no-multiple-space-closed-atx.js.map +0 -1
- package/dist/rules/token/no-reversed-links.d.ts.map +0 -1
- package/dist/rules/token/no-reversed-links.js.map +0 -1
- package/dist/rules/token/no-space-in-code.d.ts.map +0 -1
- package/dist/rules/token/no-space-in-code.js.map +0 -1
- package/dist/rules/token/no-space-in-emphasis.d.ts.map +0 -1
- package/dist/rules/token/no-space-in-emphasis.js +0 -79
- package/dist/rules/token/no-space-in-emphasis.js.map +0 -1
- package/dist/rules/token/no-space-in-links.d.ts.map +0 -1
- package/dist/rules/token/no-space-in-links.js.map +0 -1
- package/dist/rules/token/no-trailing-punctuation.d.ts.map +0 -1
- package/dist/rules/token/no-trailing-punctuation.js.map +0 -1
- package/dist/rules/token/no-trailing-spaces.d.ts.map +0 -1
- package/dist/rules/token/no-trailing-spaces.js.map +0 -1
- package/dist/rules/token/ol-prefix.d.ts.map +0 -1
- package/dist/rules/token/ol-prefix.js.map +0 -1
- package/dist/rules/token/proper-names.d.ts.map +0 -1
- package/dist/rules/token/proper-names.js +0 -93
- package/dist/rules/token/proper-names.js.map +0 -1
- package/dist/rules/token/reference-links-images.d.ts.map +0 -1
- package/dist/rules/token/reference-links-images.js.map +0 -1
- package/dist/rules/token/required-headings.d.ts.map +0 -1
- package/dist/rules/token/required-headings.js +0 -83
- package/dist/rules/token/required-headings.js.map +0 -1
- package/dist/rules/token/single-h1.d.ts.map +0 -1
- package/dist/rules/token/single-h1.js +0 -56
- package/dist/rules/token/single-h1.js.map +0 -1
- package/dist/rules/token/table-column-count.d.ts.map +0 -1
- package/dist/rules/token/table-column-count.js.map +0 -1
- package/dist/rules/token/table-column-style.d.ts.map +0 -1
- package/dist/rules/token/table-column-style.js +0 -179
- package/dist/rules/token/table-column-style.js.map +0 -1
- package/dist/rules/token/table-pipe-style.d.ts.map +0 -1
- package/dist/rules/token/table-pipe-style.js.map +0 -1
- package/dist/rules/token/ul-indent.d.ts.map +0 -1
- package/dist/rules/token/ul-indent.js.map +0 -1
- package/dist/rules/token/ul-style.d.ts.map +0 -1
- package/dist/rules/token/ul-style.js +0 -80
- package/dist/rules/token/ul-style.js.map +0 -1
- package/dist/rules/types.d.ts +0 -83
- package/dist/rules/types.d.ts.map +0 -1
- package/dist/rules/utils.d.ts +0 -31
- package/dist/rules/utils.d.ts.map +0 -1
- package/dist/rules/utils.js +0 -90
- package/dist/rules/utils.js.map +0 -1
- package/dist/scopes/extractor.d.ts +0 -7
- package/dist/scopes/extractor.d.ts.map +0 -1
- package/dist/scopes/extractor.js +0 -536
- package/dist/scopes/extractor.js.map +0 -1
- package/dist/scopes/selector.d.ts +0 -51
- package/dist/scopes/selector.d.ts.map +0 -1
- package/dist/scopes/selector.js +0 -121
- package/dist/scopes/selector.js.map +0 -1
- package/dist/scopes/sentences.d.ts +0 -15
- package/dist/scopes/sentences.d.ts.map +0 -1
- package/dist/scopes/sentences.js +0 -202
- package/dist/scopes/sentences.js.map +0 -1
- package/dist/scopes/types.d.ts +0 -46
- package/dist/scopes/types.d.ts.map +0 -1
- package/dist/scopes/vocabulary.d.ts +0 -16
- package/dist/scopes/vocabulary.d.ts.map +0 -1
- package/dist/scopes/vocabulary.js +0 -70
- package/dist/scopes/vocabulary.js.map +0 -1
- package/dist/types/assertions.d.ts +0 -119
- package/dist/types/assertions.d.ts.map +0 -1
- package/dist/types/reporting.d.ts +0 -32
- package/dist/types/reporting.d.ts.map +0 -1
- package/dist/types/rules.d.ts +0 -41
- package/dist/types/rules.d.ts.map +0 -1
- package/dist/types/validation.d.ts +0 -6
- package/dist/types/validation.d.ts.map +0 -1
- /package/{dist → lib}/core/auto-fix.d.ts +0 -0
- /package/{dist → lib}/core/directives.d.ts +0 -0
- /package/{dist → lib}/data/markdoc-realm-schema.d.ts +0 -0
- /package/{dist → lib}/data/proper-nouns.d.ts +0 -0
- /package/{dist → lib}/metrics/index.d.ts +0 -0
- /package/{dist → lib}/metrics/index.d.ts.map +0 -0
- /package/{dist → lib}/metrics/index.js +0 -0
- /package/{dist → lib}/metrics/index.js.map +0 -0
- /package/{dist → lib}/parser/types.d.ts +0 -0
- /package/{dist → lib}/parser/types.js +0 -0
- /package/{dist → lib}/parser/types.js.map +0 -0
- /package/{dist → lib}/rules/scope/capitalization.d.ts +0 -0
- /package/{dist → lib}/rules/scope/conditional.d.ts +0 -0
- /package/{dist → lib}/rules/scope/consistency.d.ts +0 -0
- /package/{dist → lib}/rules/scope/length.d.ts +0 -0
- /package/{dist → lib}/rules/scope/max-image-size.d.ts +0 -0
- /package/{dist → lib}/rules/scope/occurrence.d.ts +0 -0
- /package/{dist → lib}/rules/scope/pattern.d.ts +0 -0
- /package/{dist → lib}/rules/scope/repetition.d.ts +0 -0
- /package/{dist → lib}/rules/scope/semantic-line-breaks.d.ts +0 -0
- /package/{dist → lib}/rules/scope/swap.d.ts +0 -0
- /package/{dist → lib}/rules/token/blanks-around-fences.d.ts +0 -0
- /package/{dist → lib}/rules/token/blanks-around-fences.js +0 -0
- /package/{dist → lib}/rules/token/blanks-around-headings.d.ts +0 -0
- /package/{dist → lib}/rules/token/blanks-around-lists.d.ts +0 -0
- /package/{dist → lib}/rules/token/blanks-around-tables.d.ts +0 -0
- /package/{dist → lib}/rules/token/code-block-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/code-block-style.js +0 -0
- /package/{dist → lib}/rules/token/code-fence-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/code-fence-style.js +0 -0
- /package/{dist → lib}/rules/token/commands-show-output.d.ts +0 -0
- /package/{dist → lib}/rules/token/commands-show-output.js +0 -0
- /package/{dist → lib}/rules/token/descriptive-link-text.d.ts +0 -0
- /package/{dist → lib}/rules/token/emphasis-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/emphasis-style.d.ts.map +0 -0
- /package/{dist → lib}/rules/token/emphasis-style.js +0 -0
- /package/{dist → lib}/rules/token/emphasis-style.js.map +0 -0
- /package/{dist → lib}/rules/token/fenced-code-language.d.ts +0 -0
- /package/{dist → lib}/rules/token/fenced-code-language.js +0 -0
- /package/{dist → lib}/rules/token/first-line-h1.d.ts +0 -0
- /package/{dist → lib}/rules/token/front-matter.d.ts +0 -0
- /package/{dist → lib}/rules/token/heading-increment.d.ts +0 -0
- /package/{dist → lib}/rules/token/heading-start-left.d.ts +0 -0
- /package/{dist → lib}/rules/token/heading-start-left.js +0 -0
- /package/{dist → lib}/rules/token/heading-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/heading-style.js +0 -0
- /package/{dist → lib}/rules/token/hr-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/hr-style.js +0 -0
- /package/{dist → lib}/rules/token/line-length.d.ts +0 -0
- /package/{dist → lib}/rules/token/link-fragments.d.ts +0 -0
- /package/{dist → lib}/rules/token/link-image-reference-definitions.d.ts +0 -0
- /package/{dist → lib}/rules/token/link-image-reference-definitions.js +0 -0
- /package/{dist → lib}/rules/token/link-image-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/list-indent.d.ts +0 -0
- /package/{dist → lib}/rules/token/list-indent.js +0 -0
- /package/{dist → lib}/rules/token/list-length.d.ts +0 -0
- /package/{dist → lib}/rules/token/list-marker-space.d.ts +0 -0
- /package/{dist → lib}/rules/token/list-marker-space.js +0 -0
- /package/{dist → lib}/rules/token/markdoc-attributes.d.ts +0 -0
- /package/{dist → lib}/rules/token/markdoc-pairing.d.ts +0 -0
- /package/{dist → lib}/rules/token/markdoc-syntax.d.ts +0 -0
- /package/{dist → lib}/rules/token/markdoc-unknown-tag.d.ts +0 -0
- /package/{dist → lib}/rules/token/messages.d.ts +0 -0
- /package/{dist → lib}/rules/token/messages.d.ts.map +0 -0
- /package/{dist → lib}/rules/token/messages.js +0 -0
- /package/{dist → lib}/rules/token/messages.js.map +0 -0
- /package/{dist → lib}/rules/token/no-alt-text.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-bare-urls.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-blanks-blockquote.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-blanks-blockquote.js +0 -0
- /package/{dist → lib}/rules/token/no-duplicate-heading.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-duplicate-link-destinations.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-emphasis-as-heading.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-empty-headings.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-empty-links.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-empty-links.js +0 -0
- /package/{dist → lib}/rules/token/no-hard-tabs.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-hard-tabs.js +0 -0
- /package/{dist → lib}/rules/token/no-inline-html.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-missing-space-atx.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-missing-space-atx.d.ts.map +0 -0
- /package/{dist → lib}/rules/token/no-missing-space-atx.js +0 -0
- /package/{dist → lib}/rules/token/no-missing-space-atx.js.map +0 -0
- /package/{dist → lib}/rules/token/no-missing-space-closed-atx.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-missing-space-closed-atx.d.ts.map +0 -0
- /package/{dist → lib}/rules/token/no-missing-space-closed-atx.js +0 -0
- /package/{dist → lib}/rules/token/no-missing-space-closed-atx.js.map +0 -0
- /package/{dist → lib}/rules/token/no-multiple-blanks.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-multiple-blanks.js +0 -0
- /package/{dist → lib}/rules/token/no-multiple-space-blockquote.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-multiple-space-blockquote.d.ts.map +0 -0
- /package/{dist → lib}/rules/token/no-multiple-space-blockquote.js +0 -0
- /package/{dist → lib}/rules/token/no-multiple-space-blockquote.js.map +0 -0
- /package/{dist → lib}/rules/token/no-multiple-space-closed-atx.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-multiple-space-closed-atx.js +0 -0
- /package/{dist → lib}/rules/token/no-reversed-links.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-reversed-links.js +0 -0
- /package/{dist → lib}/rules/token/no-space-in-code.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-space-in-code.js +0 -0
- /package/{dist → lib}/rules/token/no-space-in-emphasis.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-space-in-links.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-space-in-links.js +0 -0
- /package/{dist → lib}/rules/token/no-trailing-punctuation.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-trailing-punctuation.js +0 -0
- /package/{dist → lib}/rules/token/no-trailing-spaces.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-trailing-spaces.js +0 -0
- /package/{dist → lib}/rules/token/ol-prefix.d.ts +0 -0
- /package/{dist → lib}/rules/token/ol-prefix.js +0 -0
- /package/{dist → lib}/rules/token/proper-names.d.ts +0 -0
- /package/{dist → lib}/rules/token/reference-links-images.d.ts +0 -0
- /package/{dist → lib}/rules/token/reference-links-images.js +0 -0
- /package/{dist → lib}/rules/token/required-headings.d.ts +0 -0
- /package/{dist → lib}/rules/token/single-h1.d.ts +0 -0
- /package/{dist → lib}/rules/token/single-trailing-newline.d.ts +0 -0
- /package/{dist → lib}/rules/token/single-trailing-newline.d.ts.map +0 -0
- /package/{dist → lib}/rules/token/single-trailing-newline.js +0 -0
- /package/{dist → lib}/rules/token/single-trailing-newline.js.map +0 -0
- /package/{dist → lib}/rules/token/strong-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/strong-style.d.ts.map +0 -0
- /package/{dist → lib}/rules/token/strong-style.js +0 -0
- /package/{dist → lib}/rules/token/strong-style.js.map +0 -0
- /package/{dist → lib}/rules/token/table-column-count.d.ts +0 -0
- /package/{dist → lib}/rules/token/table-column-count.js +0 -0
- /package/{dist → lib}/rules/token/table-column-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/table-pipe-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/table-pipe-style.js +0 -0
- /package/{dist → lib}/rules/token/ul-indent.d.ts +0 -0
- /package/{dist → lib}/rules/token/ul-indent.js +0 -0
- /package/{dist → lib}/rules/token/ul-style.d.ts +0 -0
- /package/{dist → lib}/rules/types.js +0 -0
- /package/{dist → lib}/rules/types.js.map +0 -0
- /package/{dist → lib}/scopes/types.js +0 -0
- /package/{dist → lib}/scopes/types.js.map +0 -0
- /package/{dist → lib}/types/assertions.js +0 -0
- /package/{dist → lib}/types/assertions.js.map +0 -0
- /package/{dist → lib}/types/index.d.ts +0 -0
- /package/{dist → lib}/types/index.d.ts.map +0 -0
- /package/{dist → lib}/types/index.js +0 -0
- /package/{dist → lib}/types/index.js.map +0 -0
- /package/{dist → lib}/types/problems.d.ts +0 -0
- /package/{dist → lib}/types/problems.d.ts.map +0 -0
- /package/{dist → lib}/types/problems.js +0 -0
- /package/{dist → lib}/types/problems.js.map +0 -0
- /package/{dist → lib}/types/reporting.js +0 -0
- /package/{dist → lib}/types/reporting.js.map +0 -0
- /package/{dist → lib}/types/rules.js +0 -0
- /package/{dist → lib}/types/rules.js.map +0 -0
- /package/{dist → lib}/types/validation.js +0 -0
- /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 (`&`) 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
|