Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable automatic annotations on GitHub Actions #497

Merged
merged 2 commits into from Oct 17, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion cli-main.js
Expand Up @@ -4,6 +4,7 @@ const updateNotifier = require('update-notifier');
const getStdin = require('get-stdin');
const meow = require('meow');
const formatterPretty = require('eslint-formatter-pretty');
const formatterCompact = require('eslint/lib/cli-engine/formatters/compact');
const semver = require('semver');
const openReport = require('./lib/open-report');
const xo = require('.');
Expand Down Expand Up @@ -136,7 +137,7 @@ if (typeof options.space === 'string') {
}

const log = report => {
const reporter = options.reporter ? xo.getFormatter(options.reporter) : formatterPretty;
const reporter = options.reporter ? xo.getFormatter(options.reporter) : process.env.GITHUB_ACTIONS ? formatterCompact : formatterPretty;
fregante marked this conversation as resolved.
Show resolved Hide resolved
process.stdout.write(reporter(report.results));
process.exitCode = report.errorCount === 0 ? 0 : 1;
};
Expand Down