Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

jscs v1.13.0 reports "Unexpected reserved word" for "import" keyword. #1321

Closed
akash1810 opened this issue Apr 29, 2015 · 7 comments
Closed

Comments

@akash1810
Copy link

Contents of .jscsrc file is:

{}

(empty for simplicity of example)

Have a file test.js with:

import angular from 'angular';

./node_modules/.bin/jscs --esnext test.js reports:

Unexpected reserved word at test.js :
     1 |import angular from 'angular';
---------^
     2 |

My current fix/workaround is to freeze on version 1.12.0.

@markelog
Copy link
Member

This is justifies a patch version, you could use workaround for now

@mikesherov i remember you said you have couple bugs you want to fix too? Does tomorrow sounds good?

@markelog
Copy link
Member

@akash1810 or even easier - use esnext option in the config

@hzoo
Copy link
Member

hzoo commented Apr 29, 2015

I think it's an issue with esnext as a cli option.

I tested with putting esnext: true in a .jscsrc and it works (and doesn't with --esnext, so any esnext features don't work).

@akash1810
Copy link
Author

@hzoo nice! Thanks all.

@hzoo
Copy link
Member

hzoo commented Apr 29, 2015

Great! And using --esnext in cli will be fixed in the next release as well.

@mikesherov
Copy link
Contributor

it.only was commited accidentally.

@markelog
Copy link
Member

@mikesherov, please see the full history

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

No branches or pull requests

4 participants