Replies: 1 comment 1 reply
-
|
I think this makes sense in the abstract but I think this sentence is doing a lot:
That's exactly what prettier said. But 'what you need' and what I need are not necessarily the same thing. In theory what you need is consistency but in reality what people want trumps what they need. Which is why prettier adopted a config. And, to date, I'm not aware of a formatter than doesn't have some kind of config. Even the zero config ones usually cheat and pull in editor config for example. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I went out of my way to develop an original fixture set for tsv instead of using Prettier as an oracle. I suspected this would lead to cleaner architecture, and I documented the process in docs/conformance_prettier.md as I went.
Indeed I found numerous bugs (including a handful of fixes I upstreamed to acorn-typescript), along with quirks that were sometimes heavily downvoted in Prettier's issues. I think the internals would be a lot more tortured had I treated Prettier as an oracle.
But do users care? The costs are sunk -- I probably spent an extra 2-3 months of the initial release's 7 to get this original fixture set and principled divergences -- but if it's not what people expect, then I could backtrack on that decision and go all-in on tracking Prettier and prettier-plugin-svelte.
There's also potential design targets that straddle the line -- keep some principled divergences, and conform where it makes sense given some agreed-upon framing. The conformance doc above can be sliced a few different ways.
A related question is what options of Prettier's to adopt, both data options and config locations, and whether tsv should even have its own configuration scheme.
Learning from Deno's and Bun's relationship to Node could be instructive. Bun got a lot of mindshare because of its Node compatibility (and performance marketing, but that's a different story). But I don't want to conflate user adoption with optimal tool design, and I'm not convinced the dynamics of JS runtimes apply to code formatters and linters, either. I personally can't wait to never install Prettier again, and tsv is basically there now. ESLint is next. Not to be Bun-like, but the benchmarks tell the story better than I could.
I don't want to chase user adoption, but I also don't want to contribute to ecosystem fragmentation within the already not-React-sized Svelte world. I like the idea of a zero-config tool that just does what you need, so you don't need to navigate numerous configuration strategies and worry about whether some directory is set up correctly, you just run the tool. This is an attractively simple choice, but my sense is this only works if Svelte has an official tool, if you also want to avoid causing fragmentation.
I built tsv because I wanted faster, slimmer tools where Svelte is first class. I could see it staying in my little niche, and not even try to court users, and I could also see handing off the project to the Svelte team, were they confident that the code is maintainable and not slop, like I am. I have too many projects already and I just want a fast, simple, and unbloated formatter. (and then linter!) The technical maintenance burden here doesn't worry me at all, the project can be near-automated at this point; it's the social burden and costs that concern me.
update: after sleeping on it, the value of being zero-config (configless?) so you always get consistent results, no matter what config is hidden where in the context where you run the tool, is what I'm going with. Look at Prettier's config resolution:
None of that needs to exist, so with tsv it won't. I'm also dropping the premium domain -- it'll just be tsv.fuz.dev, under the same domain as my other repos in this org.
Beta Was this translation helpful? Give feedback.
All reactions