Skip to content

Commit

Permalink
Merge e61e133 into 4f40389
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Nov 22, 2020
2 parents 4f40389 + e61e133 commit 47d0882
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli-main.js
Expand Up @@ -135,6 +135,10 @@ if (typeof options.space === 'string') {
}
}

if (process.env.GITHUB_ACTIONS) {
options.quiet = true;
}

const log = report => {
const reporter = options.reporter || process.env.GITHUB_ACTIONS ? xo.getFormatter(options.reporter || 'compact') : formatterPretty;
process.stdout.write(reporter(report.results));
Expand Down
4 changes: 4 additions & 0 deletions readme.md
Expand Up @@ -292,6 +292,10 @@ XO will handle the [@typescript-eslint/parser `project` option](https://github.c

See [eslint-config-xo-flow#use-with-xo](https://github.com/xojs/eslint-config-xo-flow#use-with-xo)

## GitHub Actions

XO uses a different formatter when running in a GitHub Actions workflow to be able to get inline annotations. XO also disables warnings here.

## Config Overrides

XO makes it easy to override configs for specific files. The `overrides` property must be an array of override objects. Each override object must contain a `files` property which is a glob string, or an array of glob strings, relative to the config file. The remaining properties are identical to those described above, and will override the settings of the base config. If multiple override configs match the same file, each matching override is applied in the order it appears in the array. This means the last override in the array takes precedence over earlier ones. Consider the following example:
Expand Down

0 comments on commit 47d0882

Please sign in to comment.