An Atom package that semantically reformats Javascript based on the window size.
Powered by prettier and inspired by refmt for Reason.
Notice how Atom simply breaks lines at whitespace characters:
Notice how prettier breaks lines at Javascript-specific boundaries, such as blocks, object properties, and function arguments:
Does this package modify my source code?
Yes, in the author of prettier's words: "[Prettier] removes all original styling and ensures that all outputted JavaScript conforms to a consistent style".
Install both atom-auto-prettier and prettier-atom via Atom's Install view or via apm:
apm intall atom-auto-prettier prettier-atom
Use Atom's command palette to toggle auto-prettier on/off or use the CTRL+ALT+SHIFT+F shortcut.
See the Atom contributing guidelines
git clone https://github.com/[YOUR_NAME]/atom-auto-prettier.git && cd atom-auto-prettier
npm install
apm link
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.