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): [explicit-module-boundary-types] add option shouldTrackReferences
#1778
Conversation
Thanks for the PR, @sosukesuzuki! 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. |
Codecov Report
@@ Coverage Diff @@
## master #1778 +/- ##
==========================================
- Coverage 94.48% 94.37% -0.12%
==========================================
Files 162 162
Lines 7494 7551 +57
Branches 2151 2173 +22
==========================================
+ Hits 7081 7126 +45
- Misses 178 182 +4
- Partials 235 243 +8
|
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.
overall code LGTM.
A few comments.
Also there were some lint rule changes recently which are firing on your code.
Address it all and it's good to go.
Thanks for your work!
packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts
Outdated
Show resolved
Hide resolved
packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts
Outdated
Show resolved
Hide resolved
packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts
Outdated
Show resolved
Hide resolved
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.
Thanks for the contribution!
shouldTrackReferences
shouldTrackReferences
Hmmm before I merge this - I'm just wondering if this should just be on by default? It seems like this should just be how the rule works. I think having an option to turn it off is fine, but I feel like all users are going to want this check without needing any configuration. WDYT? |
@bradzacher I agree with you. I set the default value to false because I wasn't familiar with the policy on options for this project. |
When adding checks to a rule, the policy on what is a breaking change depends on what a user would expect the default behaviour to be, and if we think that users might not expect the functionality. I think that users would expect that the rule checks this, so it's not breaking to have it on by default. Please flip it, and we can then merge this :) |
Add new options
shouldTrackReferences
(boolean).I'm not familiar with ESLint, if there is more simply solution, please comment
Fixes #1622, #1583