2 ms·
Great response from the dev, I wonder if this scales for popular projects though. I've started to use Prettier on all projects. I don't even bother with things
by sergiotapia 9y ago
Great response from the dev, I wonder if this scales for popular projects though.
I've started to use Prettier on all projects. I don't even bother with things like these anymore. If the code is valid, it'll format my JS code uniformly, and if it's not I get a big red error telling me something up, precisely at line:x. I'm not sure if it would catch the edge-case this `;` at the beginning of the file is trying to solve though.
>In technical terms: Prettier parses your JavaScript into an AST (Abstract Syntax Tree) and pretty-prints the AST, completely ignoring any of the original formatting*. Say hello to completely consistent syntax!
It's like go fmt for Javascript.
https://github.com/prettier/prettier https://github.com/prettier/prettier
If you're aren't using this you probably should to avoid bikeshedding in your team.