What does linting mean?
Linting in software world means analyzing the developed source code for potential errors and warnings such as syntactical, logical (which might have got introduced without the knowledge of a developer) with the help of a program. The program is called as a lint or linter.
Why is linting important?
This mechanism of running lint ensures that the code is bug free and adheres coding guidelines of a particular language. This also helps in maintaining code quality reducing technical debt incurred.
Each language has its own linting tools. For eg. Javascript has JSLint, JSHint, ESLint etc.
- JSLint is a static code analyser which checks if code complies JS coding rules. Its available on jslint.com. The CLI is also available. It was created by Douglas Crockford in the year 2002.
- JSHint was created by Anton Kovalyov in the year 2011 and is a fork of Duoglas Crockford JSLint project. Anton thought that JSLint was “too opinionated and less configurable”. Both, online jshint.com and CLI versions are available for this.
- ESLint was created by Nicholas Zakas in the year 2013 as a static analysis tool which identifies problematic patterns in javascript. This tool is an advanced version of JSLint and JSHint. ESLint covers both code quality and coding style issues which were not covered by JSLint and JSHint. It supports current ECMAScript standards.Online available on eslint.org and as of March 2019 ESLint is a part of OpenJS foundation. Companies such as JetBrains has integrated support for ESLint in their WebStorm code editor and Facebook has published official ESLint plugin for React projects.