aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 124 forks source link

How do I use the --fix on eslint with VS 2005 #809

Open ferodom opened 8 years ago

ferodom commented 8 years ago

I looked online to see if I could run the eslint --fix from Visual Studio but I could not find anything.

I instlled eslint -g and then I ran

eslint file.js --fix on the same dire my file is but I got the error below. Can someone point me on the right direction, I apologize if this is not the right place to post this issue

SyntaxError: Use of const in strict mode. at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:501:10) at startup (node.js:129:16) at node.js:814:3

mlorbetske commented 8 years ago

@jodavis any ideas?

jodavis commented 8 years ago

@ferodom Are you using an old version of Node.js, like v0.12? Some quick web searches turned up this StackOverflow answer

Basically, const is a newer ECMAScript feature that was not supported by early versions of Node.js. Upgrading to Node.js 4.x might solve the problem.

(My answer is based solely on web searches. I have no specific knowledge about this issue in Node.js.)