If you are using Atom which is a powerful editor and my favorite programming editor, you can install it on your atom package manager or use command:
apm install prettier-atom
There is a downside tough. There is still some bug and the options are pretty limited. But since it still a new project, give it some time. It will be better. Regardless, it is a promising project and really useful especially if you have trouble or being overwhelmed by messy code in your project.
One note on the stability. Based on their blog post, it being used to format React, Jest, immutable-js, Haul, and many more. So you can expect good stability and less bug. You don’t have yo worry that much.
No longer tabs vs space war now. Go ahead, try it yourself..[Github Project] [Atom Package]