2017-10-30 09:27:33 +00:00
|
|
|
# eslint
|
|
|
|
|
2017-10-30 17:04:41 +00:00
|
|
|
> A pluggable linting utility for JavaScript and JSX.
|
2019-06-08 01:04:00 +01:00
|
|
|
> More information: <https://eslint.org>.
|
2017-10-30 09:27:33 +00:00
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Create ESLint config:
|
2017-10-30 09:27:33 +00:00
|
|
|
|
|
|
|
`eslint --init`
|
|
|
|
|
2018-11-05 08:22:39 +00:00
|
|
|
- Lint on a given set of files:
|
2017-10-30 09:27:33 +00:00
|
|
|
|
2017-10-30 17:04:41 +00:00
|
|
|
`eslint {{filename}}.js {{filename1}}.js`
|
2017-10-30 09:27:33 +00:00
|
|
|
|
2017-10-30 17:04:41 +00:00
|
|
|
- Fix lint issues:
|
2017-10-30 09:27:33 +00:00
|
|
|
|
2017-10-30 17:04:41 +00:00
|
|
|
`eslint --fix`
|
2017-10-30 09:27:33 +00:00
|
|
|
|
|
|
|
- Lint with config:
|
|
|
|
|
2017-10-30 17:04:41 +00:00
|
|
|
`eslint -c {{path/to/config_file}} {{app/src}}`
|