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

Chore: Add extra test, improve docs #12492

Merged
merged 3 commits into from Dec 22, 2019
Merged

Chore: Add extra test, improve docs #12492

merged 3 commits into from Dec 22, 2019

Conversation

platinumazure
Copy link
Member

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

[ ] Documentation update
[ ] 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
[x] Other, please explain: Follow-up to #11275 to address review comments

What changes did you make? (Give an overview)

Added some documentation examples and a valid test, based on review comments from #11275

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

Not really.

@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Oct 25, 2019
@platinumazure platinumazure added chore This change is not user-facing rule Relates to ESLint's core rules and removed triage An ESLint team member will look at this issue soon labels Oct 25, 2019
Copy link
Member

@mdjermanovic mdjermanovic 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 follow-up!

The performance concern is about creating all regexes for each identifier, instead of just once per context? I saw that on review, but find out that the other rules are doing the same, wasn't sure why. Perhaps I should have left a question in the review.

tests/lib/rules/no-param-reassign.js Outdated Show resolved Hide resolved
@platinumazure
Copy link
Member Author

@mdjermanovic Yes, I wasn't sure about the best approach. I could create multiple regular expressions in advance which would save some cycles. I feel the rule could be even more performant if I tried to construct one regular expression with all patterns, but I'm worried about introducing bugs that way.

At this point, I've only done the work requested by you in your previous review (aside from the minor issue with the test options).

barVar.prop = "value";
}

function foo(bar) {
function foo(barrito) {
Copy link
Member

Choose a reason for hiding this comment

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

This variable name is amazing 😆

@aladdin-add
Copy link
Member

@mdjermanovic friendly ping, has your concern been addressed? 😄

@platinumazure
Copy link
Member Author

Nope, I still need to fix that test. Sorry, I've been very busy.

@kaicataldo
Copy link
Member

One more friendly ping

Copy link
Member

@mdjermanovic mdjermanovic 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!

@platinumazure platinumazure merged commit b340304 into master Dec 22, 2019
@platinumazure platinumazure deleted the follow-up-11275 branch December 22, 2019 17:17
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Jun 21, 2020
@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 21, 2020
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 chore This change is not user-facing rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants