Improved precommit
Improved precommit

• separated formatting logic out from precommit to form `yarn format`, so it can be reused in other places like Atom
• handled more edge cases
SouthbankSoftware/dbkoda-ui,SouthbankSoftware/dbkoda-ui,SouthbankSoftware/dbkoda-ui