Live data from Hacker News

Why is Prettier rock solid?

mrmr.io

161–163 of 163 posts

Re: Why is Prettier rock solid?

#161
post #122

Earlier quoted context omitted.

ESLint deprecated its formatting rules and recommends Prettier and dprint - https://eslint.org/blog/2023/10/deprecating-formatting-rules...

Or stylistic eslint community plugin which started by forking the deprecated rules/plugins. It's the most promising option IMO, since unlike prettier they're actually receptive to making changes / adding config options that will allow making code and in particular diffs, err, prettier.

Yeah the eslint stylistic plugin basically deprecated Prettier for all my purposes (+ my team just moved to it too.) I wish it could autofix line length warnings like Prettier but I understand the reasons why it doesn't and it's easy to manually fix those anyway.

Re: Why is Prettier rock solid?

#162
post #70

Hmm I just had a (perhaps esoteric) issue in an Astro file. Specifying above a would cause the block at the bottom to become duplicated on save. Weird as, and I couldn’t be bothered troubleshooting, I just added the file to .prettierignore. But still.

Prettier does not support Astro files natively, so it's the Astro plugin's fault in this case. (I maintain said plugin, so, well, it's my fault)

Ha! Well, I’m happy to help troubleshoot if you’d like?

Re: Why is Prettier rock solid?

#163
post #41

Earlier quoted context omitted.

I switched to Python Black and isort for the exact same reason. It just takes all of the thinking out of it. Even better, these tools mean I don't have to teach (and police) code style. I let a pre-commit hook handle that.

I prefer https://github.com/asottile/reorder-python-imports over isort because isort has over 100 configuration options.

The whole point of using opinionated code formatters is to offload the mental effort of forming (and enforcing) opinions to a third party, so I very purposefully rely on isort's and black's defaults.
Post reply on HN