Scroll to navigation

ESLINT(1) User Commands ESLINT(1)

NAME

eslint - JavaScript

DESCRIPTION

eslint [options] file.js [file.js] [dir]

Basic configuration:

Disable use of configuration from .eslintrc.*
Use this configuration, overriding .eslintrc.* config options if present
Specify environments
Specify JavaScript file extensions - default: .js
Define global variables
Specify the parser to be used
Specify parser options
A folder where plugins should be resolved from, CWD by default

Specifying rules and plugins:

Use additional rules from this directory
Specify plugins
Specify rules

Fixing problems:

Automatically fix problems
Automatically fix problems without saving the changes to the file system
Specify the types of fixes to apply (problem, suggestion, layout)

Ignoring files:

Specify path of ignore file
Disable use of ignore files and patterns
Pattern of files to ignore (in addition to those in .eslintignore)

Using stdin:

Lint code provided on <STDIN> - default: false
Specify filename to process STDIN as

Handling warnings:

Report errors only - default: false
Number of warnings to trigger nonzero exit code - default: -1

Output:

Specify file to write report to
Use a specific output format - default: stylish
Force enabling/disabling of color

Inline configuration comments:

Prevent comments from changing config or rules
Adds reported errors for unused eslint-disable directives

Caching:

Only check changed files - default: false
Path to the cache file. Deprecated: use --cache-location - default: .eslintcache
Path to the cache file or directory

Miscellaneous:

Run config initialization wizard - default: false
Output debugging information
Show help
Output the version number
Print the configuration for the given file
June 2022 eslint v6.4.0