Open eatrocks opened 7 years ago
I think whether you change all you codebase at once, or over time via a pre-commit hook, we'll still want the pre-commit hook. I've integrated it in an project I'm working on and it's REALLY nice to not have to worry varying formatting styles between devs.
another option is to use the VS code extension for prettier that will auto format on save.
Probably should consider disabling the "collapse elements" feature in the vs code extension but keep it in the potential pre-commit hook
I haven't tried it yet. I like the idea of parsing the JavaScript into AST so you end up with consistent formatting that addresses max line length. I saw a pre commit hook that processes changed files but I disagree with this approach because it makes changes hard to see. I'd rather the whole repo be prettier at once and not contain other changes