Skip to content

Commit 9bb0512

Browse files
committed
Fix repeated --fix-type arg
1 parent 67483f0 commit 9bb0512

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/knip/src/util/create-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export const createOptions = async (options: CreateOptions) => {
118118
if (!value) rules[key] = 'off';
119119
}
120120

121-
const fixTypes = options.fixTypes ?? args['fix-type'] ?? [];
121+
const fixTypes = (options.fixTypes ?? args['fix-type'] ?? []).flatMap(type => type.split(','));
122122
const isFixFiles = args['allow-remove-files'] && (fixTypes.length === 0 || fixTypes.includes('files'));
123123
const tags = splitTags(args.tags ?? options.tags ?? parsedConfig.tags ?? []);
124124

0 commit comments

Comments
 (0)