All rules

Oxford comma use is inconsistent

oxford-comma-consistencyon by default (info)English

Lists that put a comma before the final "and" in some places and not in others

Example

Flagged
We sell apples, pears, and plums. We ship to homes, offices, and schools. We accept cash, cards and vouchers.
What chaff prints
1:75 This list punctuates differently from the rest (1 in this document)
Fixed
We sell apples, pears, and plums. We ship to homes, offices, and schools. We accept cash, cards, and vouchers.
What chaff prints
no finding

How to fix

Match the majority.

Why it matters

Whether to put a comma before the final "and" is a style-guide split. Neither is wrong. Mixed within one document, the reader re-parses every list.

What it does not flag

Whether to use the comma is not decided. A document split evenly has no minority and is not reported. An and / or right after a postal address closed by its postcode ("Leeds LS1 4AB, or email us") follows the address's commas and is not counted as a list, and neither is one after a spaced dash that follows the last comma (a dateline such as "Washington, DC – The Cybersecurity and Infrastructure Security Agency"). Nor is a contrast after a comma ("more correct, not cleaner or more elegant") or an introduction opened by a sequence word ("First, outside a block, …"), and an example phrase set off by commas between a subject and its predicate ("X, such as Y, are excluded and are not…") is not counted as an item. A comma that closes an example phrase holding its own and / or just before the and ("gases, such as ozone and carbon dioxide, and the amount") closes the aside and is not counted. Nor is an and / or inside the name after a numbered division of a code ("Title 44, Public Printing and Documents") or inside a phrase that qualifies the item before it ("any other agency or office, in accordance with law or as directed").

Turning it off or relaxing it

Silence this one spot (in the document)
<!-- stet: oxford-comma-consistency — reason -->
Relax it for the team (the reason is kept as a comment in chaff.yaml)
npx chaffjs relax oxford-comma-consistency --why "reason"
Turn it off for the team (chaff.yaml)
rules: oxford-comma-consistency: off
Technical details
Layer
L3
Status
stable
Severity
info
Languages
en
Suited to
blog, business, technical, legal, docs, academic, literature, speech
Reads from the document
pos

Levels

Set a level for this rule under rules in chaff.yaml. With nothing set, it runs at the level its genre gives it (see By genre below).

strictreported when the minority style appears 3 times or fewer
normalreported when the minority style appears 2 times or fewer
relaxedreported when the minority style appears 1 times or fewer

By genre

Runs by default in
technical/spec, technical/readme, blog/tech, blog/essay, blog/owned-media, business/proposal, business/report, business/email, business/press-release, business/meeting-notes, legal/contract, legal/statute, legal/judgment, legal/patent, docs/manual, docs/faq, docs/glossary, academic/paper, literature/fiction, literature/essay, literature/poetry, literature/play, speech/address, speech/transcript

Genres

Message

This list punctuates differently from the rest ({count} in this document)

This page is built from the rule's definition file:packages/chaff/rules/oxford-comma-consistency.yaml