Home

Awesome

remark-lint-heading-capitalization

remark-lint plugin to ensure that your Markdown headings capitalization is correct.

  1. Capitalize the first word, as well as all nouns, pronouns, verbs, adjectives, and adverbs.
  2. Articles, conjunctions, and prepositions should remain lowercase.
  3. Capitalize the first element in a hyphenated compound. The other elements are generally capitalized unless they are articles, conjunctions, or prepositions.

Some additional points to note:

Install

npm install remark-lint-heading-capitalization

Usage

Use like any other remark-lint plugin. Check out the remark-lint documentation for details.

Options

Configuration (TypeScript type).

Fields

Examples

When this rule is turned on, the following valid.md is ok:

## Where to Ask Questions
## An Apple
## Enable 2FA on GitHub
## Flight-or-Fight

When this rule is turned on, the following invalid.md is not ok:

## Where To Ask questions
## an Apple
## Enable 2FA On GitHub
## Flight-Or-fight
1:1-1:26 warning Heading capitalization error. Expected: 'Where to Ask Questions' found: 'Where To Ask questions' heading-capitalization remark-lint

2:1-2:12 warning Heading capitalization error. Expected: 'An Apple' found: 'an Apple'                             heading-capitalization remark-lint

3:1-3:24 warning Heading capitalization error. Expected: 'Enable 2FA on GitHub' found: 'Enable 2FA On GitHub'     heading-capitalization remark-lint

4:1-4:19 warning Heading capitalization error. Expected: 'Flight-or-Fight' found: 'Flight-Or-fight'               heading-capitalization remark-lint