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: avoid applying eslint-env comments twice #9278

Merged
merged 1 commit into from Oct 14, 2017

Conversation

not-an-aardvark
Copy link
Member

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

[x] Other, please explain:

What changes did you make? (Give an overview)

/* eslint-env */ comments are processed differently from other directive comments in that they're actually matched by a regex and applied before parsing occurs. This was done as a fix for #2134 in order to allow /* eslint-env */ comments to change the parser options. (A side-effect is that some envs are incorrectly added when /* eslint-env */ appears in a string rather than a comment, like this, but that's a separate concern.)

Since envs are applied before parsing, it's not necessary to also apply them after parsing as part of the normal comment processing step. This commit removes the double-processing.

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

Nothing in particular

@not-an-aardvark not-an-aardvark added the chore This change is not user-facing label Sep 10, 2017
@mention-bot
Copy link

@not-an-aardvark, thanks for your PR! By analyzing the history of the files in this pull request, we identified @nzakas, @BYK and @alberto to be potential reviewers.

@eslintbot
Copy link

LGTM

@eslintbot
Copy link

LGTM

@eslintbot
Copy link

LGTM

@kaicataldo kaicataldo merged commit db41408 into master Oct 14, 2017
@not-an-aardvark not-an-aardvark deleted the double-env-configs branch October 14, 2017 18:22
@kaicataldo
Copy link
Member

Thanks for contributing to ESLint!

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Apr 13, 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 Apr 13, 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 chore This change is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants