Use the Oxford comma (EK00039)
The Oxford comma before the final "and" or "or" in a list prevents ambiguity and keeps documentation consistent. Learn why to add it, with fixes.
The Oxford comma before the final “and” or “or” in a list of three or more items prevents ambiguity, so add it before the closing conjunction. EkLine flags a list that omits this serial comma (rule EK00039).
Why use the Oxford comma in documentation?
Section titled “Why use the Oxford comma in documentation?”The serial comma removes ambiguity about where one list item ends and the next begins, which matters when you document features, options, or steps. Adding it keeps lists consistent across your documentation and avoids the misreadings that a missing comma can cause. A predictable list style also reads faster for your audience.
What EkLine flags
Section titled “What EkLine flags”EK00039 matches a list of three or more items with no comma before the closing “and” or “or”.
- ❌ Incorrect: EkLine works with the CLI, VS Code and GitHub.
- ✅ Correct: EkLine works with the CLI, VS Code, and GitHub.
- ❌ Incorrect: Choose red, green or blue.
- ✅ Correct: Choose red, green, or blue.
How to fix
Section titled “How to fix”Add a comma before the final “and” or “or” in a list of three or more items.
What is the Oxford comma?
Section titled “What is the Oxford comma?”The Oxford comma, also called the serial comma, is the comma placed before the final “and” or “or” in a list of three or more items, as in “the CLI, VS Code, and GitHub”.
Does the Oxford comma change meaning?
Section titled “Does the Oxford comma change meaning?”It can. Without it, a list like “red, green and blue” can blur where one item ends and the next begins. The serial comma removes that ambiguity.
Rule details
Section titled “Rule details”| Property | Value |
|---|---|
| Rule ID | EK00039 |
| Category | Spelling and grammar |
| Default severity | Warning |
| Enabled by default | Yes |
Ignore this rule
Section titled “Ignore this rule”To keep a list without the serial comma on one line, add an inline comment:
<!-- ekline-ignore-next-line EK00039 -- house style omits the serial comma -->EkLine works with the CLI, VS Code and GitHub.To disable the rule across your project, add it to the ignore list in your configuration file.