Skip to content
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

Merged
merged 5 commits into from Apr 13, 2020

Conversation

sosukesuzuki
Copy link
Contributor

Add new options shouldTrackReferences(boolean).

I'm not familiar with ESLint, if there is more simply solution, please comment

Fixes #1622, #1583

@typescript-eslint
Copy link
Contributor

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.

@bradzacher bradzacher added the enhancement: plugin rule option New rule option for an existing eslint-plugin rule label Mar 21, 2020
@codecov
Copy link

codecov bot commented Mar 21, 2020

Codecov Report

Merging #1778 into master will decrease coverage by 0.11%.
The diff coverage is 82.35%.

@@            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     
Flag Coverage Δ
#unittest 94.37% <82.35%> (-0.12%) ⬇️
Impacted Files Coverage Δ
packages/eslint-plugin/src/rules/ban-ts-ignore.ts 100.00% <ø> (ø)
...plugin/src/rules/explicit-module-boundary-types.ts 82.60% <82.35%> (-3.60%) ⬇️

Copy link
Member

@bradzacher bradzacher left a 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!

@bradzacher bradzacher added the awaiting response Issues waiting for a reply from the OP or another party label Apr 12, 2020
@bradzacher bradzacher removed the awaiting response Issues waiting for a reply from the OP or another party label Apr 12, 2020
bradzacher
bradzacher previously approved these changes Apr 12, 2020
Copy link
Member

@bradzacher bradzacher left a 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!

@bradzacher bradzacher changed the title feat(eslint-plugin): [explicit-module-boundary-types] add new option shouldTrackReferences feat(eslint-plugin): [explicit-module-boundary-types] add option shouldTrackReferences Apr 12, 2020
@bradzacher
Copy link
Member

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?

@sosukesuzuki
Copy link
Contributor Author

@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.

@bradzacher
Copy link
Member

bradzacher commented Apr 12, 2020

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 :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement: plugin rule option New rule option for an existing eslint-plugin rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[explicit-module-boundary-types] Does not work when the object is exported
2 participants