feat: support specifying lint output format
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -113,6 +113,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'));
|
||||
|
||||
Reference in New Issue
Block a user