Skip to content

Commit 5abc30b

Browse files
committed
docs(km): add Chicago title case, Oxford comma, and number formatting rules
- Extend titleCase rule to apply to H1, H2, and H3 (was H1/H2 only) - Document Chicago-style title case: lowercase articles, short prepositions (four letters or fewer), and coordinating conjunctions unless first/last word - Add Oxford comma rule: required in all lists of three or more items - Add number formatting rules: spell out one through ten in prose, use numerals for 11 and above; exceptions for version numbers, code values, measurements, percentages, and ranges - Update km-style-guide.md with full examples and rationale for each rule - Update last-updated date to March 2026
1 parent 4ddb4e9 commit 5abc30b

2 files changed

Lines changed: 62 additions & 8 deletions

File tree

docs-linter/rules/formatting.json

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"headings": {
33
"titleCase": {
4-
"applyTo": ["h1", "h2"],
4+
"applyTo": ["h1", "h2", "h3"],
5+
"style": "chicago",
6+
"description": "Chicago title case: capitalize all major words; lowercase articles (a, an, the), short prepositions (in, of, on, for, to, at, by, up), and coordinating conjunctions (and, but, or, nor, yet, so) unless first or last word",
57
"severity": "info",
6-
"message": "Consider using title case for main headings"
8+
"message": "Use Chicago-style title case for H1, H2, and H3 headings"
79
},
810
"sentenceCase": {
911
"applyTo": ["h4", "h5", "h6"],
@@ -97,5 +99,24 @@
9799
"severity": "info",
98100
"message": "Remove trailing spaces"
99101
}
102+
},
103+
"punctuation": {
104+
"oxfordComma": {
105+
"severity": "warning",
106+
"message": "Use the Oxford comma in lists of three or more items (e.g. 'red, white, and blue')"
107+
}
108+
},
109+
"numbers": {
110+
"spellOut": {
111+
"range": [1, 10],
112+
"severity": "info",
113+
"message": "Spell out numbers one through ten in prose (e.g. 'three steps', not '3 steps')"
114+
},
115+
"useNumerals": {
116+
"threshold": 11,
117+
"severity": "info",
118+
"message": "Use numerals for numbers 11 and above (e.g. '12 files', not 'twelve files')"
119+
},
120+
"exceptions": ["version numbers", "code values", "measurements", "percentages", "ranges"]
100121
}
101122
}

docs/km-style-guide.md

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,33 @@ Follow this standard order based on quality examples:
3636
- Use descriptive, specific headings
3737

3838
### Capitalization
39-
- **Main sections (H1, H2)**: Use title case
40-
- ✅ "Checklist for Support Tickets"
41-
- ❌ "Support ticket checklist"
42-
- **Subsections (H3+)**: Use sentence case
39+
40+
Headings follow **Chicago-style title case** for H1, H2, and H3. H4 and below use sentence case.
41+
42+
#### Chicago title case rules (H1, H2, H3)
43+
44+
- Capitalize the first and last word always.
45+
- Capitalize all major words: nouns, verbs, adjectives, and adverbs.
46+
- Lowercase articles: *a*, *an*, *the*.
47+
- Lowercase short prepositions (four letters or fewer): *in*, *of*, *on*, *for*, *to*, *at*, *by*, *up*.
48+
- Lowercase coordinating conjunctions: *and*, *but*, *or*, *nor*, *yet*, *so*.
49+
50+
Examples:
51+
- ✅ "Checklist for Support Tickets" (*for* is lowercase)
52+
- ✅ "Additional Resources for Deployment" (*for* is lowercase)
53+
- ✅ "How It Works" (*It* is capitalized as a pronoun)
54+
- ❌ "Support ticket checklist" (not title case)
55+
- ❌ "Additional Resources For Deployment" (*For* should be lowercase)
56+
57+
#### Sentence case (H4+)
58+
59+
- Capitalize the first word and proper nouns only.
4360
- ✅ "Common causes for deployment errors"
4461
- ❌ "Common Causes For Deployment Errors"
45-
- **Table of Contents label**: Use title case — "Table of Contents" not "Table of contents"
62+
63+
#### Other rules
64+
65+
- **Table of Contents label**: Use title case — "Table of Contents" not "Table of contents".
4666
- **Headings must not end with a question mark** — ✅ "What this test validates", ❌ "What This Test Validates?"
4767

4868
### Examples from KM Feedback
@@ -59,6 +79,19 @@ Follow this standard order based on quality examples:
5979
- **Spacing**: Single space after marker
6080
- **Parallel structure**: Keep list items grammatically consistent
6181
- **Punctuation**: Use periods after complete sentences in list items
82+
- **Oxford comma**: Always use the Oxford comma in lists of three or more items
83+
- ✅ "Configure the URL, authentication, and proxy type"
84+
- ❌ "Configure the URL, authentication and proxy type"
85+
86+
### Numbers
87+
88+
- **Spell out** numbers one through ten in prose text.
89+
- ✅ "There are three configuration steps."
90+
- ❌ "There are 3 configuration steps."
91+
- **Use numerals** for 11 and above.
92+
- ✅ "The timeout is set to 60000 milliseconds."
93+
- ✅ "There are 15 properties in this destination."
94+
- **Exceptions**: Always use numerals for version numbers, code values, measurements, percentages, and numeric ranges regardless of size.
6295

6396
### Links
6497
- **Context phrases**: Use "see" instead of "refer to"
@@ -229,4 +262,4 @@ For updates or suggestions, please refer to the latest KM feedback patterns and
229262

230263
---
231264
*Based on analysis of 30+ KM feedback commits and 5 quality documentation examples*
232-
*Last updated: January 2026*
265+
*Last updated: March 2026*

0 commit comments

Comments
 (0)