Skip to content

Commit

Permalink
Implement a Vale rule for the Oxford comma (#2602)
Browse files Browse the repository at this point in the history
* chore: Implement a Vale rule for serial commas

* chore: Update the rule based on peer review
  • Loading branch information
yuliiiah authored Apr 9, 2024
1 parent be8d5cc commit ebdcefe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vale/styles/spectrocloud/oxford-comma.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: existence
message: "You need to use the Oxford comma in '%s'."
level: suggestion
link: https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro+Cloud+Internal+Style+Guide#Commas
scope: sentence
nonword: true
tokens:
- '(\b(?:\w+(?: \w+)?, )+\b(?:\w+(?: \w+)?) (?:and|or) \w+(?: \w+)?[.?!])'

0 comments on commit ebdcefe

Please sign in to comment.