Lint the Code

Get introduced to different types of lint tools and learn how to ensure secure, error-free code by linting code.

Introduction

The 'use strict'; directive certainly provides much-needed relief, but it would be nice to know about potential errors before running the code. This is where the lint tools come in. Some notable lint tools are:

  • JSLint
  • JSHint
  • ESLint

💡 These tools can be installed easily with an npm install command.

JSLint

JSLint is an aggressive tool and, in fact, maybe a bit overly so when verifying code for compliance to the code quality standards it sets.

As soon as you unleash it on a piece of code, it will probably hurt your feelings.

JSHint

JSHint is also an aggressive tool, but at least it will give you a hug at the end of the ordeal.

It’s gentler and the more easily ...

Access this course and 1400+ top-rated courses and projects.