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: camelcase destructure leading/trailing underscore (fixes #9700) #9701

Merged
merged 1 commit into from
Dec 11, 2017

Conversation

platinumazure
Copy link
Member

What is the purpose of this pull request? (put an "X" next to item)

[ ] Documentation update
[x] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

See #9700.

What changes did you make? (Give an overview)

The camelcase rule has a subtle requirement that we keep track of both the original property/identifier name, as well as a version of the name with leading and trailing underscores stripped out. During review, we missed that the original property/identifier name was being checked in the new destructuring case.

This pull request should be followed with a chore to ensure that all underscore checks will strip leading/trailing underscores, to make future contributions to this rule easier.

Is there anything you'd like reviewers to focus on?

I've added a few different test cases. Have I missed anything?

@platinumazure platinumazure added accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly rule Relates to ESLint's core rules labels Dec 9, 2017
@platinumazure platinumazure added the patch candidate This issue may necessitate a patch release in the next few days label Dec 9, 2017
Copy link
Contributor

@guyellis guyellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I tested this on my project that's failing linting on 4.13.0. More details in the Issue. Thanks for fixing this!

Copy link
Member

@mysticatea mysticatea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

Copy link
Member

@kaicataldo kaicataldo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ilyavolodin ilyavolodin merged commit d80aa7c into master Dec 11, 2017
@ilyavolodin ilyavolodin deleted the camelcase-destructuring-leading-trailing branch December 11, 2017 23:00
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Jun 10, 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 Jun 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly patch candidate This issue may necessitate a patch release in the next few days rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants