-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(eslint-plugin): [prefer-readonly-parameter-types] Added option utilityTypeSufficient
which makes Readonly<>
sufficient to satisfy the rule
#4053
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(eslint-plugin): [prefer-readonly-parameter-types] Added option utilityTypeSufficient
which makes Readonly<>
sufficient to satisfy the rule
#4053
Conversation
…ter-types option utilityTypeSufficient
…ter-types option utilityTypeSufficient
…tilityTypeSufficient which makes Readonly<> sufficient to satisfy the rule
Thanks for the PR, @marekdedic! 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 on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day. |
… the option utilityTypeSufficient
Codecov Report
@@ Coverage Diff @@
## master #4053 +/- ##
=======================================
Coverage 93.33% 93.33%
=======================================
Files 152 152
Lines 8014 8018 +4
Branches 2568 2571 +3
=======================================
+ Hits 7480 7484 +4
Misses 180 180
Partials 354 354
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Hey @marekdedic, thanks for sending this PR! It looks like the issue you're referencing from last year was not marked as accepting PRs: #2699 (comment). We generally ask that PRs address accepted issues, to save you the time of writing up the PR in case the issue isn't something the project should take in. If you'd like to make the case that the rule should have an option to allow |
I can see why... |
PR Checklist
Readonly<>
to satisfy the rule #4061Overview
Added the option
utilityTypeSufficient
to the ruleprefer-readonly-parameter-types
which makes it so thatReadonly<>
is enough to satisfy the rule. Turning this option on is a sort of a compromise as it makes it not so strict, but much easier to use.This could "solve" #2699.