Prevent triggering events


#1

I’ve written a package with two commands: sortImports and checkImports.

My problem is, when the config option “sortOnSave” is enabled, the checkImports command is useless because the file must be saved before the checkImports command can be run… after saving, the imports are sorted.

Anyone know, how to prevent “sortOnSave” stuff while saving the file to run checkImports?


#2

Why would you need to check the imports if sortOnSave is enabled? You’re checking the imports with the same tool that you used to sort them? Why would the two ever disagree?