Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
fix(eslint-plugin): replace auto-fix of class literal property style rule with suggestion#7054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Thanks for the PR,@Melandra! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently onhttps://opencollective.com/typescript-eslint. |
netlifybot commentedMay 23, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview fortypescript-eslint ready!
To edit notification comments on pull requests, go to yourNetlify site configuration. |
nx-cloudbot commentedMay 23, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
codecovbot commentedMay 23, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@## main #7054 +/- ##==========================================+ Coverage 87.38% 87.41% +0.02%========================================== Files 386 386 Lines 13193 13216 +23 Branches 3867 3879 +12 ==========================================+ Hits 11529 11553 +24+ Misses 1298 1296 -2- Partials 366 367 +1
Flags with carried forward coverage won't be shown.Click here to find out more.
|
| messages:{ | ||
| preferFieldStyle:'Literals should be exposed using readonly fields.', | ||
| preferFieldStyleSuggestion: | ||
| 'Try replacing the literals with readonly fields.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I wasn't sure what messaging to use here, I'm open for other suggestions 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Ah yeah these can be tricky. Searching around other rules that havehasSuggestions: true, we normally go with language like"Do X with Y". Here I think that'd be:
- 'Try replacing the literals with readonly fields.'+ 'Replace the literals with readonly fields.'
What do you think about that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yes, that sounds good, I've updated both suggestion messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
🙌 The code looks great - love a clean swap like this one!
Just requesting changes to suggest a change to the text, as you brought up. Thoughts?
If you're happy with the suggestion or have one of your own then ✅ we can merge!
(sorry for the delay in reviewing - we've been focusing onv6...)
No worries 🙂 |
JoshuaKGoldberg left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
🙌 Super, thanks@Melandra!

Uh oh!
There was an error while loading.Please reload this page.
PR Checklist
Overview
This PR changes the fixer for the class literal property style rule in the eslint-plugin package from an autofixer to a suggestion fixer.