feat(core): new AvoidContractions rule#3397
Merged
Merged
Conversation
hippietrail
suggested changes
May 16, 2026
Collaborator
hippietrail
left a comment
There was a problem hiding this comment.
List of all the missing ones from dictionary.dict found using the regex ^[^/]*'[^/]*/
I made the full list before I went back to check for and find your note saying you left out the ones with multiple expansions intentionally. So those are mixed in with the missing ones with only a single expansion sorry.
| "aren't", | ||
| "wasn't", | ||
| "weren't", | ||
| "don't", |
Collaborator
There was a problem hiding this comment.
Would be easier for us to scan for missing ones if these were alphasorted.
Missing, but this includes the ones with multiple expansions:
- couldn't've
- could've
- he'd
- he's
- how'd
- how're
- I'd
- I'd've
- it'd
- it's
- mayn't
- mightn't
- might've
- must've
- oughtn't
- shan't
- she'd
- she's
- should've
- that'd
- that'll
- that's
- there'd
- there'll
- there's
- they'd
- we'd
- what'll
- what's
- where'd
- who'd
- who'll
- who're
- who's
- who've
- why'd
- would've
- you'd
Maybe? Maybe not?
- ne'er
- nor'easter
- sou'wester
- y'all
Collaborator
Author
|
I went ahead and sorted it. I also added some of the unambiguous ones you listed. Free to take another look? |
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.
Issues
No linked issue.
Description
Adds a new opt-in
AvoidContractionslinter that suggests expanded forms for common English contractions.The rule covers deterministic contraction expansions such as:
isn't→is notwasn't→was notdon't→do notcan't→cannotI'm→I amyou're→you arethey'll→they willThe rule is registered in the lint group and added to
default_config.jsonunder Style and Redundancy withstate: false, so it is available but disabled by default.Ambiguous contractions such as
it's,he'd, andshe'sare intentionally excluded from this first implementation.Demo
N/A
How Has This Been Tested?
Added unit tests for the new linter covering positive matches, suggestion output, casing behavior, typographic apostrophes, possessives/names, and intentionally excluded ambiguous contractions.
AI Disclosure
If Your PR Implements or Enhances a Linter
Checklist