Using ES6 in VS Code Editor

I’m trying to use ES6 syntax on a Javascript file in my project, but every time I try using ES6 syntax I get an error from jshint that says, "‘let’ is available in ES6 (use ‘esversion: 6’) or Mozilla JS extensions (use moz). (W104) How do I use ES6 in my VS code editor? Do I need to install something or use a special file? I’ve been Googling for the past hour and I can’t seem to figure out what to do.

1 Like

Have you got a very old version of VSCode running, or have you installed a linter plugin (eg jshint) over the top of the one it ships with? Because you shouldn’t be getting those errors otherwise

Sorry, I’m very new to coding. What do you mean by installing a linter plugin over the top of the one it ships with?

What I mean is that if you install VSCode on your computer, it works, out of the box, with modern JS syntax; that’s what it’s built primarily to do. It shouldn’t be highlighting what is valid code with errors.

1 Like

Oh, I understand. I had installed a jshint extension and as soon as I disabled it, I didn’t get any errors and the ES6 code worked.

1 Like

Yup, you don’t need it, it’s already got it set up and ready :wink: — ESLint is what’s used (and is the current de facto standard) I would avoid JSHint

2 Likes