Open sbrandtb opened 8 years ago
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?
+1
Maybe this commit has something to do with it... https://github.com/rubenv/angular-gettext-tools/commit/f5f2dd3f562c2b8aeffe928f94f7e7dd58f3a640
@rubenv could you take a look?
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.
This warning message come from the last PR : https://github.com/rubenv/angular-gettext-tools/pull/143/commits/f5ea8a0f196afd4d7d8a19ca9e51a7e48ea8c681
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.