HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

eslint — A pluggable linting utility for JavaScript and JSX. More information: <https://eslint.org/docs/lates

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandlintingjavascriptclieslintpluggableforutility

Problem

How to use the eslint command: A pluggable linting utility for JavaScript and JSX. More information: <https://eslint.org/docs/latest/use/command-line-interface>.

Solution

eslint — A pluggable linting utility for JavaScript and JSX. More information: <https://eslint.org/docs/latest/use/command-line-interface>.

Create the ESLint configuration file:
eslint --init


Lint one or more files:
eslint {{path/to/file1.js path/to/file2.js ...}}


Fix lint issues:
eslint --fix


Lint using the specified configuration file:
eslint {{[-c|--config]}} {{path/to/config_file}} {{path/to/file1.js path/to/file2.js ...}}

Code Snippets

Create the ESLint configuration file

eslint --init

Lint one or more files

eslint {{path/to/file1.js path/to/file2.js ...}}

Fix lint issues

eslint --fix

Lint using the specified configuration file

eslint {{[-c|--config]}} {{path/to/config_file}} {{path/to/file1.js path/to/file2.js ...}}

Context

tldr-pages: common/eslint

Revisions (0)

No revisions yet.