JSHint

Open Source

by JSHint

Provided by JSHint

Not yet rated
Platform
Web
Pricing
Open Source
Account required
No
Ads
None
Last verified
23 hours ago
Developer
JSHint
Official URL

Overview

JSHint is a community-run static analysis tool for JavaScript. It reads your code without running it and reports likely mistakes such as syntax errors, accidental global variables and bugs caused by implicit type conversion. It began in 2010 as a fork of JSLint.

The quickest way to use it is the editor on jshint.com, where you paste code and see warnings immediately. For real projects it is published on npm and installs as a command-line tool, and standalone builds exist for browser-like environments and Mozilla's Rhino engine. The install page lists plugins for many editors, including Vim, Emacs, Sublime Text, Visual Studio Code and JetBrains IDEs, plus integrations for Grunt, Ant, Maven and Git hooks.

It is configurable, so you can tell it which environment your code runs in and which checks to apply. The project is clear that linting cannot prove a program is correct or fast and should sit alongside tests and code review. JSHint is licensed under the MIT Expat licence; versions before 2.12.0 were partly under the older JSON licence.

Features

  • Detects syntax errors, leaking variables and implicit type conversion bugs
  • Online editor on jshint.com for pasting and checking code
  • Command-line tool installed through npm
  • Standalone builds for browser-like environments and Rhino
  • Configurable checks to match the environment your code runs in
  • Editor plugins for Vim, Emacs, Sublime Text, Visual Studio Code, JetBrains IDEs and others
  • Integrations for Grunt, Ant, Maven and Git pre-commit hooks

Privacy

See the official privacy policy. The jshint.com home page loads Google Analytics.

Pros & Cons

Pros

  • Free and open source under the MIT Expat licence
  • Works in the browser with nothing to install
  • Simple to add to a build or commit hook
  • Long list of editor integrations

Cons

  • Checks for likely mistakes only and cannot verify that code is correct
  • Several listed plugins are for older editors such as Atom, Brackets and TextMate
  • Flags problems but does not fix them itself
  • Older releases carried a non-standard licence, which matters if you are pinned to one

Community Reviews (0)

No written reviews yet — be the first to rate this tool.

Similar Tools

  • Teaches JavaScript from the basics to advanced topics for free.

    Not yet rated
    Free Web
  • Documents the JavaScript language and web APIs.

    Not yet rated
    Free Web
  • JavaScript · Babel

    Compiles modern JavaScript syntax for compatibility with older browsers.

    Not yet rated
    Open Source Web