feat: make mutate an option within fix mode (fixes #144)
This commit is contained in:
parent
41ac1b5849
commit
705af893a3
|
@ -37,7 +37,7 @@ export async function main(argv: Array<string>): Promise<number> {
|
|||
schemaOptions: {
|
||||
coerce: args.coerce,
|
||||
defaults: args.defaults,
|
||||
mutate: mode === MODE.fix,
|
||||
mutate: args.mutate,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ export interface ParsedArgs extends RuleSelector, RuleSources {
|
|||
defaults: boolean;
|
||||
dest: string;
|
||||
mode: string;
|
||||
mutate: boolean;
|
||||
source: string;
|
||||
}
|
||||
|
||||
|
@ -68,6 +69,10 @@ export async function parseArgs(argv: Array<string>): Promise<ParseResults> {
|
|||
default: true,
|
||||
type: 'boolean',
|
||||
},
|
||||
mutate: {
|
||||
default: true,
|
||||
type: 'boolean',
|
||||
},
|
||||
}),
|
||||
command: ['fix'],
|
||||
describe: 'validate the source document and insert defaults',
|
||||
|
|
Loading…
Reference in New Issue