Merge pull request #2096 from lowjoel/lint-format

feat: support specifying lint output format
This commit is contained in:
Fredrik Adelöw
2020-08-25 16:45:30 +02:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ export default async (cmd: Command, cmdArgs: string[]) => {
const args = [
'--ext=js,jsx,ts,tsx',
'--max-warnings=0',
'--format=eslint-formatter-friendly',
`--format=${cmd.format}`,
...(cmdArgs ?? [paths.targetDir]),
];
if (cmd.fix) {
+5
View File
@@ -114,6 +114,11 @@ const main = (argv: string[]) => {
program
.command('lint')
.option(
'--format <format>',
'Lint report output format',
'eslint-formatter-friendly',
)
.option('--fix', 'Attempt to automatically fix violations')
.description('Lint a package')
.action(lazyAction(() => import('./commands/lint'), 'default'));