Skip to content

feat(eslint-plugin): [naming-convention] add requireDouble, allowDouble, allowSingleOrDouble options for underscores #2812

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

Merged
merged 1 commit into from
Nov 25, 2020

Conversation

bradzacher
Copy link
Member

Fixes #1712

I chose not to add an unbounded allowMultiple for now. I don't think that it's a commonly used pattern.
Single and double I've seen, but I don't believe I've ever seen more than that.
I'd like to avoid adding something unbounded unless there's a strong usecase for it.

@bradzacher bradzacher added the enhancement: plugin rule option New rule option for an existing eslint-plugin rule label Nov 24, 2020
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @bradzacher!

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 Nov 24, 2020

Codecov Report

Merging #2812 (e164bf6) into master (6a06944) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2812      +/-   ##
==========================================
+ Coverage   92.74%   92.76%   +0.01%     
==========================================
  Files         301      301              
  Lines       10232    10257      +25     
  Branches     2902     2905       +3     
==========================================
+ Hits         9490     9515      +25     
  Misses        344      344              
  Partials      398      398              
Flag Coverage Δ
unittest 92.76% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...kages/eslint-plugin/src/rules/naming-convention.ts 89.49% <100.00%> (+0.58%) ⬆️

…ouble`, `allowSingleOrDouble` options for underscores

Fixes #1712

I chose not to add an unbounded `allowMultiple` for now. I don't think that it's a commonly used pattern.
Single and double I've seen, but I don't believe I've ever seen more than that.
@bradzacher bradzacher force-pushed the naming-convention-double-underscore branch from dc26c17 to e164bf6 Compare November 24, 2020 23:38
@bradzacher bradzacher merged commit dd0576a into master Nov 25, 2020
@bradzacher bradzacher deleted the naming-convention-double-underscore branch November 25, 2020 01:20
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 26, 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.

[naming-convention] Allow multiple underscore
1 participant