LinuxCommandLibrary

jshint

JavaScript code quality tool

TLDR

Lint JavaScript file

$ jshint [file.js]
copy
Lint multiple files
$ jshint [file1.js] [file2.js]
copy
Use config file
$ jshint --config [.jshintrc] [file.js]
copy
Check all JS files
$ jshint [src/]
copy
Verbose output
$ jshint --verbose [file.js]
copy
Show specific warnings
$ jshint --show-non-errors [file.js]
copy

SYNOPSIS

jshint [options] file...

DESCRIPTION

JSHint is a JavaScript code quality tool. It detects errors and potential problems in JavaScript.
The tool is configurable to enforce coding standards. It integrates with editors and build systems.

PARAMETERS

FILE

JavaScript files to lint.
--config FILE
Configuration file.
--verbose
Show error codes.
--reporter NAME
Output format reporter.
--extract MODE
Extract JS from HTML.
--help
Display help information.

CAVEATS

Node.js-based. Consider ESLint for modern projects. Configuration important.

HISTORY

JSHint was forked from JSLint by Anton Kovalyov in 2011 to provide a more configurable JavaScript linter.

SEE ALSO

eslint(1), prettier(1), tslint(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community