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: fix separateRequires tests for one-var rule #12709

Merged
merged 1 commit into from Jan 4, 2020
Merged

Conversation

mdjermanovic
Copy link
Member

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

[X] Other, please explain:

Some tests for the separateRequires option of the one-var rule had this:

parserOptions: { env: { node: true } }

These are incorrect settings because env shouldn't be in parserOptions. It's just ignored as an unknown parser option.

What changes did you make? (Give an overview)

Since the tests are passing without the node environment being actually set, I wasn't sure if the rule was working as intended. In particular, should the option apply to global require or any require call.

By #9441, in particular this thread and this comment it seems that the rule wasn't supposed to check if the require reference is global, so instead of fixing env I just removed these.

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

One test became a duplicate, so it's completely removed.

@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Dec 25, 2019
@mdjermanovic mdjermanovic added chore This change is not user-facing and removed triage An ESLint team member will look at this issue soon labels Dec 25, 2019
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, thanks!

@kaicataldo kaicataldo merged commit b77b858 into master Jan 4, 2020
@kaicataldo kaicataldo deleted the onevar-envnode branch January 4, 2020 01:33
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Jul 4, 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 Jul 4, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants