Unexpected token ERROR
See original GitHub issueI have been trying to figure this out for months…
I have uninstalled and reinstalled the package numerous times, tried changing settings, etc.
I am using Node v8.9 so the spread operator should be allowed.
I am only using a local version of eslint@5.8.0 installed in node_modules
SublimeLinter: #1 eslint Terrain.js ERROR:
==========================================
.../node_modules/eslint/lib/linter.js:288
disableDirectives.push(...createDisableDirectives(directiveType, comment.loc.start, directiveValue));
^^^
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (.../node_modules/eslint/lib/cli-engine.js:21:14)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Have a JavaScript Unexpected Token Error? Check Your Syntax
The JavaScript's parser expects tokens and symbols in a particular order, with relevant values or variables in between. Often, an Unexpected ...
Read more >JavaScript Error Handling: Unexpected Token - GeeksforGeeks
Not follow them throws an error.An unexpected token occurs if JavaScript code has a missing or extra character { like, ) + –...
Read more >How to fix: "SyntaxError: Unexpected token" in JavaScript
One common cause of the SyntaxError: Unexpected token error is a missing semicolon. In JavaScript, semicolons are used to indicate the end of...
Read more >How to fix JavaScript unexpected token error
As you write your JavaScript application, the unexpected token error always occurs because JavaScript expected a specific syntax that's not ...
Read more >syntax error: unexpected token - javascript - Stack Overflow
The error SyntaxError: Unexpected token < likely means the API endpoint didn't return JSON in its document body, such as due to a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If it throws syntax error on spread operator then it must be using older version of node. Maybe run this in Sublime’s console and see what it outputs:
Oh wow. I just had the idea of downgrading eslint to “4.19.1”
That actually worked!
Soo… SublimeLinter doesn’t like something in v5 of eslint