4
votes

We are teaching fundamental JavaScript to beginners and have recently switched from the Atom editor to VSCode. The problem with this is that VSCode requires us to install node and then npm install eslint, whereas in Atom, we can use the atom package manager to download a linter-eslint package that we can then point directly at a gloabl .eslint file. While it's not a huge deal to install and use node, we are trying to reserve all things node related for a later more advanced class so we can focus on fundamentals.

Is there a way to use ESlint in VSCode without downloading and installing it through node, or is there another alternative extension that we can use that would give us similar functionality?

1
By "fundamental JavaScript" I assume you are talking about the language and not all the mess that browsers and the DOM make, so you probably were going to use node as a REPL anyway? - Bergi
Good point, that's accidentally misleading. For clarity, we are teaching the fundamentals of web development, so basic HTML, CSS, and JavaScript. We use the Chrome dev tools, and use repl.it and codepen as alternative repl environments. We introduce node in 5 instead of week 1 in order to reduce complexity, and so the students can focus on more fundamental stuff. - Michael Treat
TBH, I think beginners will do fine without a linter for the first 4 weeks. How exactly do you plan to use the linter in your course? - Bergi
We use the linter to enforce a strict style, and helps prevent them from forming bad habits while they are learning. - Michael Treat

1 Answers

2
votes

There is an eslint extension for VS Code that MS supports: https://github.com/Microsoft/vscode-eslint

FWIW, I found that by googling "ESLint vscode". ;)

Given that the MS supported version still wants you to install eslint via npm, this is probably the only way to go.

FWIW, Atom itself is written in Node, so I'm guessing that it's doing the same thing, just hidden behind some UI snazziness.