Skip to content

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.

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.

Add a comma before the final “and” or “or” in a list of three or more items.

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”.

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.

PropertyValue
Rule IDEK00039
CategorySpelling and grammar
Default severityWarning
Enabled by defaultYes

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.

  • EK00007 — Place commas and periods inside quotation marks
  • EK00025 — Use a single space between words