Skip to content

Commit fcbaed0

Browse files
committedDec 17, 2023
Run issue fixer if only --fix-type argument is provided
1 parent 7055120 commit fcbaed0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎packages/knip/src/cli.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const run = async () => {
5656
isShowProgress,
5757
isIncludeEntryExports,
5858
isIsolateWorkspaces,
59-
isFix,
59+
isFix: isFix || fixTypes.length > 0,
6060
fixTypes: fixTypes.flatMap(type => type.split(',')),
6161
});
6262

‎packages/knip/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => {
7070
const report = chief.getIssueTypesToReport();
7171
const rules = chief.getRules();
7272
const filters = chief.getFilters();
73-
const fixer = new IssueFixer({ isEnabled: isFix || fixTypes.length > 0, cwd, fixTypes });
73+
const fixer = new IssueFixer({ isEnabled: isFix, cwd, fixTypes });
7474

7575
const isReportDependencies = report.dependencies || report.unlisted || report.unresolved;
7676
const isReportValues = report.exports || report.nsExports || report.classMembers;

0 commit comments

Comments
 (0)
Please sign in to comment.