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): [ban-types] allow selective disable of default options with false value #2137

Merged
merged 1 commit into from May 31, 2020

Conversation

mgcrea
Copy link
Contributor

@mgcrea mgcrea commented May 31, 2020

Following #2115 @bradzacher guidelines, I've added a way to selectively disable a default type rule for ban-types. Currently if you want to keep every banned-types defaults except one, you have to manually inline the remaining types.

This allow a simpler API:

{
  types: {
    '{}': false,
  },
  extendDefaults: true,
}

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @mgcrea!

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
Copy link

codecov bot commented May 31, 2020

Codecov Report

Merging #2137 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #2137   +/-   ##
=======================================
  Coverage   93.54%   93.55%           
=======================================
  Files         171      171           
  Lines        7798     7799    +1     
  Branches     2225     2225           
=======================================
+ Hits         7295     7296    +1     
  Misses        244      244           
  Partials      259      259           
Flag Coverage Δ
#unittest 93.55% <100.00%> (+<0.01%) ⬆️
Impacted Files Coverage Δ
packages/eslint-plugin/src/rules/ban-types.ts 100.00% <100.00%> (ø)

@bradzacher bradzacher added the enhancement: plugin rule option New rule option for an existing eslint-plugin rule label May 31, 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.

LGTM - thanks for your contribution!

@bradzacher bradzacher changed the title feat(eslint-plugin): [ban-types] allow selective disable with false value feat(eslint-plugin): [ban-types] allow selective disable of default options with false value May 31, 2020
@bradzacher bradzacher merged commit 1cb8ca4 into typescript-eslint:master May 31, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 1, 2020
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.

None yet

2 participants