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