5 ms·
What’s an example of Prettier breaking code?
by goodoldneon 3y ago
What’s an example of Prettier breaking code?
- wildpeaks 3y agoAnother example: https://github.com/prettier/prettier/issues/187 https://github.com/prettier/prettier/issues/187 That issue has been open for 7 years.
- blopker 3y agoThe biggest issue I run in to is with Django HTML. It's unusable. They know about it and they said they won't fix it.
- exac 3y agoFor example, the latest Prettier makes XHTML files invalid by changing DOCTYPE to lowercase: https://github.com/prettier/prettier/issues/15476 https://github.com/prettier/prettier/issues/15476 Prettier moves ts-ignore comments which can cause TypeScript errors: https://github.com/prettier/prettier/issues/15876 https://github.com/prettier/prettier/issues/15876 Interpreting nested CSS functions' "-" as minus and inserting a space: https://github.com/prettier/prettier/issues/15369 https://github.com/prettier/prettier/issues/15369
- deepfriedrice 3y ago1.1k open issues. OOF
- berkes 3y agoI don't know enough about prettier. But in general linters (which have overlap with formatters but aren't the same) have a lot of issues that fall in the "this is not my preference. It must therefore be changed" category. "Gofmt's style is no one's favorite, yet gofmt is everyone's favorite." I guess.
- mattrick 3y ago1.1k isn't bad for a project with ~33 million weekly downloads[1], imo. Yes, I know that's not necessarily a good metric, but it's ~10 million more than React[2] which also has a similar number of open issues[3]. [1]: https://www.npmjs.com/package/prettier https://www.npmjs.com/package/prettier [2]: https://www.npmjs.com/package/react https://www.npmjs.com/package/react [3]: https://github.com/facebook/react https://github.com/facebook/react
- sph 3y agoA code formatter has no business having 1100 open issues (5k closed). It is not rocket science. In my experience, the number of open issues not only correlates with popularity, but how crappy the language is. Javascript projects, with its myriad of dependencies and attracting junior, inexperienced devs, tend to accumulate a great number of bugs. For reference, curl has 24 open issues (4k closed), it is a couple orders of magnitude more complex AND more used than prettier.
- xrisk 3y agoIs that because they don’t use a bot to auto-close issues like a lot of other projects?
- withinboredom 3y agoThat annoys the crap out of me. Closing stale issues doesn’t make the issues go away, it just means that edge cases aren’t addressed. If I have an issue and find myself in a stale-closed issue, I’m not even going to bother reporting it. I’m either going to look for a different library altogether, one that actually tries to solve edge cases; or I’m going to create my own library as a big middle-finger to the project. At work, I’ll just open a new issue, which will probably just be ignored.
- haburka 3y agoI don’t want to post a specific issue without doxxing myself but you can browse through the open issues on GitHub to find some. Some are years old! I think the more popular languages tend to be better supported so you probably don’t know about it but prettier is a massive monolith with support for many languages and use cases. Sometimes there are bugs that mangle code