From the course: Node.js: Testing and Code Quality

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Comparing JavaScript linters

Comparing JavaScript linters

- [Narrator] There are a number of different JavaScript Linters available that can be used to find suspicious code. Believe it or not, you already have a linter installed. Node.js has a built-in checker through the command line, just type node dash dash check and then the path to the file. This checks for syntax errors in a single target file. While this does have some utility, like a quick one-off sanity check, it doesn't scale to an entire project. The three most common JavaScript Linters are, JSLint, JSHint and ESLint. There all JavaScript syntax checkers and validators, each of them supports ES6 standards at a minimum and they're all free and open source software. Let's take a closer look at each. JSLint from jslint.com is by Douglas Crockford author of the fantastic book ''JavaScript: The Good Parts''. JSLint works well out of the box, but that's both its power and its limitation. There are very few configuration…

Contents