Skip to content

Commit a6b2dbe

Browse files
committed
Added format on save
1 parent 4085621 commit a6b2dbe

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

dist/main/atom/onSaveHandler.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ function handle(event) {
2727
if (fileDetails.project.buildOnSave) {
2828
atom.commands.dispatch(atom.views.getView(event.editor), 'typescript:build');
2929
}
30+
if (true) {
31+
atom.commands.dispatch(atom.views.getView(event.editor), 'typescript:format-code');
32+
}
3033
});
3134
}
3235
exports.handle = handle;

lib/main/atom/onSaveHandler.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,11 @@ export function handle(event: { filePath: string; editor: AtomCore.IEditor }) {
5353
'typescript:build');
5454
}
5555

56+
if(true){
57+
atom.commands.dispatch(
58+
atom.views.getView(event.editor),
59+
'typescript:format-code');
60+
}
61+
5662
});
5763
}

0 commit comments

Comments
 (0)