Sentence-Style Capitalization for Headings

This rule enforces sentence-style capitalization in headings, following Microsoft's documentation style guide. The rule helps maintain consistency across documentation and improves readability by ensuring headings follow a standardized capitalization pattern. In sentence-style capitalization, only the first word and proper nouns are capitalized, making the content more approachable and less formal than title case.

Examples:

✅ Correct:

  • Getting started with Docker
  • How to configure your Windows settings
  • Understanding TypeScript interfaces

❌ Incorrect:

  • Getting Started With Docker
  • How To Configure Your Windows Settings
  • Understanding Typescript Interfaces

The rule includes a list of exceptions for proper nouns and product names (like Azure, Docker, Linux, etc.) that should always maintain their proper capitalization regardless of position in the heading. The rule is triggered when a heading contains capitalization that doesn't follow the sentence-style pattern, while respecting these exceptions.

Note that the rule specifically looks for headings that might be followed by a colon (:) as an indicator, and only applies to heading-level content as specified by its scope.

Rule Source

This rule comes from: https://github.com/mesosphere/dcos-docs-site

Rule Definition

extends: capitalization
message: "'%s' should use sentence-style capitalization."
link: https://docs.microsoft.com/en-us/style-guide/capitalization
level: suggestion
scope: heading
match: $sentence
indicators:
  - ':'
exceptions:
  - Azure
  - CLI
  - Code
  - Cosmos
  - Docker
  - Emmet
  - I
  - Kubernetes
  - Linux
  - macOS
  - Marketplace
  - MongoDB
  - REPL
  - Studio
  - TypeScript
  - URLs
  - Visual
  - VS
  - Windows