id = "jshint"
name = "JSHint"
homepage = "https://jshint.com"
description = "A community-driven tool that detects errors and potential problems in JavaScript code."
icon = "https://github.com/jshint.png"
executables = ["jshint"]
[dotfiles]
paths = ["~/.jshintrc"]
exclude = []
secret = []
side_effect = false
[commands]
format = 1
label = "Lint JavaScript"
description = "Lint files or directories with JSHint. Inline linting options and custom reporter files are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.source]]
id = "docs"
kind = "manual"
url = "https://jshint.com/docs/cli/"
revision = "2026-10-27"
evidence = """
The jshint executable accepts file system paths as command-line arguments.
If a file path is a dash (-) then JSHint will read from standard input.
--config
Explicitly sets the location on the file system from which jshint should load linting options.
--reporter
This flag also supports two pre-defined reporters: jslint, to make output compatible with JSLint, and checkstyle, to make output compatible with CheckStyle XML.
$ jshint --reporter=checkstyle myfile.js
--verbose
Adds message codes to the JSHint output.
--show-non-errors
Shows additional data generated by JSHint.
--extra-ext
Allows you to specify additional file extensions to check (default is .js).
--extract=[auto|always|never]
--exclude
Allows you to specify directories which you DON'T want to be linted.
--exclude-path
Allows you to provide your own .jshintignore file.
"""
[[commands.field]]
id = "paths"
label = "Files or directories"
description = "Directories are traversed recursively. Use - for standard input."
type = "path"
path = { kind = "any", role = "input" }
position = 0
multiple = true
sources = ["docs"]
[[commands.field]]
id = "config"
label = "Config file"
type = "path"
path = { kind = "file", role = "input" }
option = ["--config"]
sources = ["docs"]
[[commands.field]]
id = "reporter"
label = "Reporter"
type = "string"
option = ["--reporter"]
suggestions = [{ value = "jslint", label = "JSLint" }, { value = "checkstyle", label = "CheckStyle XML" }]
sources = ["docs"]
[[commands.field]]
id = "verbose"
label = "Show message codes"
type = "boolean"
option = ["--verbose"]
sources = ["docs"]
[[commands.field]]
id = "show_non_errors"
label = "Show additional data"
type = "boolean"
option = ["--show-non-errors"]
sources = ["docs"]
[[commands.field]]
id = "extract"
label = "Extract JavaScript from HTML"
type = "enum"
option = ["--extract"]
choices = [{ value = "auto", label = "Auto" }, { value = "always", label = "Always" }, { value = "never", label = "Never" }]
sources = ["docs"]
[[commands.field]]
id = "extra_ext"
label = "Extra file extensions"
type = "string"
option = ["--extra-ext"]
sources = ["docs"]
[[commands.field]]
id = "exclude"
label = "Exclude directories"
type = "string"
option = ["--exclude"]
sources = ["docs"]
[[commands.field]]
id = "exclude_path"
label = "Ignore file"
type = "path"
path = { kind = "file", role = "input" }
option = ["--exclude-path"]
sources = ["docs"]
[[commands.task]]
id = "lint"
label = "Lint files"
fields = ["paths", "config"]
required = ["paths"]
[[commands.task]]
id = "lint_html"
label = "Lint scripts inside HTML"
fields = ["paths", "extract"]
required = ["paths"]
set = { extract = ["always"] }
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["paths", "config", "reporter", "verbose"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["show_non_errors", "extract", "extra_ext", "exclude", "exclude_path"]