Enforce the Oxford Comma
Many style guides want you to use the Oxford, or serial, comma.
This rule, originally from the Microsoft style guide implementation, implements that check:
extends: existence
message: "Use the Oxford comma in '%s'."
link: https://docs.microsoft.com/en-us/style-guide/punctuation/commas
scope: sentence
level: error
nonword: true
tokens:
- '(?:[^\s,]+,){1,} \w+ (?:and|or) \w+[.?!]'
Comma usage is a consistency issue, so it should raise an error instead of a warning.
Tags:
Found this useful?
Buy the book