Use Title Case in h1 headings and sentence case in all others

- I wrote about the implications of (not) doing this in the PR
  (https://github.com/Homebrew/brew/pull/6826#issuecomment-564273209),
  but in summary:

  - It looks like pretty much the only place we've ever adhered to the
    sentence case rule is the Prose Guidelines itself.
  - Correcting all these to sentence case would be a lot of work (and
    sometimes not even make sense).
  - Admittedly, some of the title case ones look a bit horrible, but
    even with some allowed exceptions, but it's better than being
    consistently inconsistent.
  - Only lint for title case in h1 headings. H2s and H3s etc. can be
    sentence case. There's not currently a lint for that.
This commit is contained in:
Issy Long 2019-12-10 22:29:55 +00:00
parent b90e01c524
commit a5ffdc6c5a
No known key found for this signature in database
GPG Key ID: 8247C390DADC67D4
2 changed files with 9 additions and 5 deletions

View File

@ -41,7 +41,7 @@ We prefer:
### Structure and markup
* Sentence case in section headings, not Title Case
* Title Case in `h1` headings; sentence case in all other headings
* Periods at the ends of list items where most items in that list are complete sentences
* More generally, parallel list item structure
* Capitalise all list items if you want, even if they're not complete sentences; just be consistent within each list, and preferably, throughout the whole page

View File

@ -1,6 +1,10 @@
---
extends: capitalization
message: "'%s' should be in sentence case"
message: "'%s' should be in title case"
level: warning
scope: heading
match: $sentence
scope: heading.h1
match: $title
style: AP
exceptions:
- brew(1)
- Homebrew/homebrew-core
- Homebrew/linuxbrew-core