O'Reilly logo

Continuous Integration, Delivery, and Deployment by Sander Rossel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Linting with JSHint

The next thing we want to do is lint our JavaScript files. Linting is the process of checking code for potential errors or code smells. You can try it manually at http://www.jslint.com/. Be careful though, that thing is merciless! I do not think I have ever had a perfect score on that thing. JSHint is based on the same linter, but a lot more forgiving. You can configure all kinds of rules to make it easier or harder on yourself. It also has a website, http://jshint.com/, where you can lint your JavaScript code on the fly. When you are going to use this linter, be sure to check out the documentation as well, as it has a lot of hints and use cases.

To use JSHint in Gulp, you need JSHint in addition to the Gulp plugin,

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required