import / export syntax not supported by CLI tool #1758

Open
sbrl opened this Issue Feb 21, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@sbrl

sbrl commented Feb 21, 2017

Hello,

I've been writing some ES6 modules, and I have been wanting to find a good ES6 validator to validate them with during my build process. I stumbled across this project, and gave it a try.

However, your CLI tool doesn't appear to support the import / export command:

user@local:~$ node_modules/.bin/esvalidate Utilities/Vector.js
Error: Line 228: Unexpected token

Here's that js file for reference: https://hastebin.com/kukebonupe.js

Thoughts?

@ariya

This comment has been minimized.

Show comment
Hide comment
@ariya

ariya Feb 21, 2017

Contributor

The command-line tool does not support script vs module, it needs to be updated.

See also http://esprima.readthedocs.io/en/latest/syntactic-analysis.html#distinguishing-a-script-and-a-module.

Contributor

ariya commented Feb 21, 2017

The command-line tool does not support script vs module, it needs to be updated.

See also http://esprima.readthedocs.io/en/latest/syntactic-analysis.html#distinguishing-a-script-and-a-module.

@adius

This comment has been minimized.

Show comment
Hide comment
@adius

adius Oct 22, 2017

Any news?

adius commented Oct 22, 2017

Any news?

@Kronuz

This comment has been minimized.

Show comment
Hide comment
@Kronuz

Kronuz Oct 23, 2017

In Python’s port of esprima (pip install esprima), I added —module as an option for that purpose

Kronuz commented Oct 23, 2017

In Python’s port of esprima (pip install esprima), I added —module as an option for that purpose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment