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

ES6 Parsing seems to be Broken with 2.2.1 #144

Open
sbrandtb opened this issue May 27, 2016 · 4 comments
Open

ES6 Parsing seems to be Broken with 2.2.1 #144

sbrandtb opened this issue May 27, 2016 · 4 comments

Comments

@sbrandtb
Copy link

When using version 2.2.1, parsing ES6 files seem to be broken:

Error parsing factories/<some-file>.js at line 44 column 61, where the file contains ::this.unserializeEvent);

When downgrading to 2.2.0, this does not happen.

@sbrandtb
Copy link
Author

Ok, after looking into the commits, I admit that it's just the warning that's missing. Still, can someone explain why it's not parsing?

@sbrandtb sbrandtb changed the title ES6 Parsing Broken with 2.2.1 ES6 Parsing seems to be Broken with 2.2.1 May 27, 2016
@kwypchlo
Copy link

kwypchlo commented Jun 1, 2016

+1

Maybe this commit has something to do with it...
f5f2dd3

@rubenv could you take a look?

@IShotTheSheriff
Copy link
Collaborator

In my case it's broken because of imports. By default espree engine for parsing use script option. When your project uses modules it has to be set to module.

syntax = espree.parse(src, {
  attachComment: true,
  loc: true,
  ecmaVersion: 6,
  sourceType: 'module',
  ecmaFeatures: {
    jsx: true,
    experimentalObjectRestSpread: true,
    globalReturn: true
  }
}); 

I'm not sure tho if it should be changed globally or passed thru configuration options.

@NicoPennec
Copy link

This warning message come from the last PR : f5ea8a0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants