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

Fix: new-parens false negative (fixes #6997) #6999

Merged
merged 1 commit into from Sep 1, 2016
Merged

Fix: new-parens false negative (fixes #6997) #6999

merged 1 commit into from Sep 1, 2016

Conversation

mysticatea
Copy link
Member

@mysticatea mysticatea commented Aug 28, 2016

Fixes #6997.

This PR changes the logic of new-parens.
Old logic counts parentheses in a NewExpression node. Then OK if it's 2 or more.
New logic checks a token (except )) preceded by the callee of a NewExpression. Then OK if the token is an opening parenthesis and is inside of the NewExpression node.

NOTE: this needs minor bump.

@mention-bot
Copy link

@mysticatea, thanks for your PR! By analyzing the annotation information on this pull request, we identified @vitorbal, @pmcelhaney and @ilyavolodin to be potential reviewers

@eslintbot
Copy link

LGTM

@nzakas
Copy link
Member

nzakas commented Aug 30, 2016

Minor bumps should have "Update:" instead of "Fix:" for the commit message.

@nzakas
Copy link
Member

nzakas commented Aug 30, 2016

Code LGTM. Can you also update the docs to show this?

@eslintbot
Copy link

LGTM

@eslintbot
Copy link

LGTM

@mysticatea
Copy link
Member Author

Oops, I'm sorry, I had misunderstood that Update: is for enhancements.

@nzakas
Copy link
Member

nzakas commented Sep 1, 2016

Yeah, we changed it to also be when a rule produces more warnings. From http://eslint.org/docs/developer-guide/contributing/pull-requests#step-2-make-your-changesa-namestep2a:

Update - for a backwards-compatible enhancement or a change to a rule that increases the number of reported problems.

@nzakas nzakas merged commit 8e77f16 into master Sep 1, 2016
@platinumazure
Copy link
Member

@nzakas Does that also imply that we should label issues with enhancement as well? I think the docs mention somewhere else that you can/should use the issue label to determine your commit summary prefix.

@mysticatea mysticatea deleted the issue6997 branch September 10, 2016 01:40
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants