1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/eslint.md

21 lines
383 B
Markdown
Raw Normal View History

2017-10-30 16:27:33 +07:00
# eslint
2017-10-31 00:04:41 +07: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 16:27:33 +07:00
2023-05-23 07:41:15 +02:00
- Create the ESLint config file:
2017-10-30 16:27:33 +07:00
`eslint --init`
2023-05-23 07:41:15 +02:00
- Lint one or more files:
2017-10-30 16:27:33 +07:00
`eslint {{path/to/file1.js path/to/file2.js ...}}`
2017-10-30 16:27:33 +07:00
2017-10-31 00:04:41 +07:00
- Fix lint issues:
2017-10-30 16:27:33 +07:00
2017-10-31 00:04:41 +07:00
`eslint --fix`
2017-10-30 16:27:33 +07:00
2023-05-23 07:41:15 +02:00
- Lint using the specified config:
2017-10-30 16:27:33 +07:00
2023-05-23 07:41:15 +02:00
`eslint -c {{path/to/config_file}} {{path/to/file1.js path/to/file2.js}}`