tldr/pages/common/xo.md

25 lines
409 B
Markdown
Raw Normal View History

2018-11-06 08:57:21 +00:00
# xo
2019-05-12 15:34:53 +01:00
> A pluggable, zero-configuration linting utility for JavaScript.
> More information: <https://github.com/xojs/xo>.
2018-11-06 08:57:21 +00:00
2019-05-12 15:34:53 +01:00
- Lint files in the "src" directory:
2018-11-06 08:57:21 +00:00
`xo`
2019-05-12 15:34:53 +01:00
- Lint a given set of files:
2018-11-06 08:57:21 +00:00
2019-05-12 15:34:53 +01:00
`xo {{file1}}.js {{file2}}.js`
2018-11-06 08:57:21 +00:00
2019-05-12 15:34:53 +01:00
- Automatically fix any lint issues found:
2018-11-06 08:57:21 +00:00
`xo --fix`
2019-05-12 15:34:53 +01:00
- Lint using spaces as indentation instead of tabs:
2018-11-06 08:57:21 +00:00
`xo --space`
2019-05-12 15:34:53 +01:00
- Lint using the "prettier" code style:
2018-11-06 08:57:21 +00:00
`xo --prettier`