tldr/pages/common/eslint.md

20 lines
288 B
Markdown
Raw Normal View History

2017-10-30 12:27:33 +03:00
# eslint
2017-10-30 20:04:41 +03:00
> A pluggable linting utility for JavaScript and JSX.
2017-10-30 12:27:33 +03:00
- Create eslint config:
`eslint --init`
- Lint on a given set of files:
2017-10-30 12:27:33 +03:00
2017-10-30 20:04:41 +03:00
`eslint {{filename}}.js {{filename1}}.js`
2017-10-30 12:27:33 +03:00
2017-10-30 20:04:41 +03:00
- Fix lint issues:
2017-10-30 12:27:33 +03:00
2017-10-30 20:04:41 +03:00
`eslint --fix`
2017-10-30 12:27:33 +03:00
- Lint with config:
2017-10-30 20:04:41 +03:00
`eslint -c {{path/to/config_file}} {{app/src}}`