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: vars-on-top conflict with ES6 import (fixes #2099) #2104

Merged
merged 1 commit into from
Mar 18, 2015
Merged

Fix: vars-on-top conflict with ES6 import (fixes #2099) #2104

merged 1 commit into from
Mar 18, 2015

Conversation

gyandeeps
Copy link
Member

Just checking for import right now.
Any others I should be looking at?

* @returns {Boolean} whether the given node represents a import declaration
*/
function looksLikeImport(node) {
return node.type === "ImportDeclaration";
Copy link
Member

Choose a reason for hiding this comment

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

ESTree split this up into multiple node types - see https://github.com/estree/estree/blob/master/es6.md#modules, though I don't recall whether Espree implements them yet. Should be able to check them all here for forward-compatibility even if they aren't parsed that way yet.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good to me. I will have that implemented in few mins.

@nzakas
Copy link
Member

nzakas commented Mar 18, 2015

LGTM.

nzakas added a commit that referenced this pull request Mar 18, 2015
Fix: vars-on-top conflict with ES6 import (fixes #2099)
@nzakas nzakas merged commit 7e3d931 into eslint:master Mar 18, 2015
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 7, 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 7, 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

3 participants