Closed firejune closed 4 years ago
Right. Sorry for the delay, I was travelling last week, didn't really find the time to take a look.
This looks good, but I do have a suggestion. It is generally not a good idea to rely on atom.workspace.getActiveTextEditor()
, especially in async code, especially from a TextBuffer event (multiple editors can share the same buffer), since it can, under some hard-to-reproduce circumstances, return a wrong editor instance. That's the reason why in my "mock code" I suggested changes to typescriptEditorPane.ts
, and not to typescriptBuffer.ts
. So I suggest moving the code that runs checkAllFiles
to typescriptEditorPane.ts
, and avoiding getActiveTextEditor
altogether.
When this option enabled, It will be report all problems in current project when on file saved.