1
0
Fork 0

feat: make mutate an option within fix mode (fixes #144)

This commit is contained in:
ssube 2019-11-12 08:26:31 -06:00
parent 41ac1b5849
commit 705af893a3
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 6 additions and 1 deletions

View File

@ -37,7 +37,7 @@ export async function main(argv: Array<string>): Promise<number> {
schemaOptions: { schemaOptions: {
coerce: args.coerce, coerce: args.coerce,
defaults: args.defaults, defaults: args.defaults,
mutate: mode === MODE.fix, mutate: args.mutate,
}, },
}); });

View File

@ -36,6 +36,7 @@ export interface ParsedArgs extends RuleSelector, RuleSources {
defaults: boolean; defaults: boolean;
dest: string; dest: string;
mode: string; mode: string;
mutate: boolean;
source: string; source: string;
} }
@ -68,6 +69,10 @@ export async function parseArgs(argv: Array<string>): Promise<ParseResults> {
default: true, default: true,
type: 'boolean', type: 'boolean',
}, },
mutate: {
default: true,
type: 'boolean',
},
}), }),
command: ['fix'], command: ['fix'],
describe: 'validate the source document and insert defaults', describe: 'validate the source document and insert defaults',