Detect Errors Early With Linting
A linter uses static analysis to look for errors in code without having to run the code. It can identify syntax errors, improper usage, and even warn you of possible issues you might encounter at runtime. It won’t catch all bugs, but goes a long way to help you out, especially with the simpler things.
To see a live demo of ESLint in action, head over to eslint.org/demo.
var foo = bar; // 1:5 - 'foo' is assigned a value but never used. // 1:11 - 'bar' is not defined.
Even if you’re an experienced programmer, having a linter set up for your project can be extremely helpful. And if you’re not, it can be a great guide for helping you learn.