Fix e.g./i.e. punctuation rule to eliminate false positives on real words#35
Merged
Conversation
Co-authored-by: ChrisChinchilla <42080+ChrisChinchilla@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update e.g., i.e. rule for clarity
Fix e.g./i.e. punctuation rule to eliminate false positives on real words
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The old
\b(?:eg|ie)[^,]pattern was matching legitimate words like "egg", "egress", and "ingredient". The rule has been rewritten using proper word boundaries and negative lookahead.New
Punctuation.yml\beg\b/\bie\b— word boundaries prevent matching inside "egg", "egress", etc.nonword: true— required for Vale to tokenize and match period-containing forms like "e.g." and "i.e."(?!,)— skips already-correct usage ("eg,", "e.g.,")e.g.,i.e.) and bare abbreviation (eg,ie), enforcing a trailing comma in both casesTest fixture update
features/rules.featureupdated to match current actual Vale output — removes the false-positive "egg" alert lines and corrects the message format from'eg, or ie,'to'eg,'.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.