We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d34ca3f commit 0ba0c63Copy full SHA for 0ba0c63
src/conductor/organize-imports.ts
@@ -45,8 +45,9 @@ export async function organizeImportsForFile(filePath: string): Promise<string>
45
const { staged, autoAdd, dryRun } = getConfig();
46
const fileWithOrganizedImports = await organizeImports(fileContent);
47
const fileHasChanged = fileWithOrganizedImports !== fileContent;
48
+ const isValidAction = [actions.none, actions.skipped].every(action => action !== fileWithOrganizedImports);
49
- if (fileHasChanged) {
50
+ if (fileHasChanged && isValidAction) {
51
!dryRun && writeFileSync(filePath, fileWithOrganizedImports);
52
let msg = 'imports reordered';
53
if (staged && autoAdd) {
0 commit comments