Same question and answer for everything that Rome does
-
-
Replying to @sebmck
I don’t really know that answer tbh. No animosity here at all, but it’s yet another uphill battle you’ll have to fight?
2 replies 0 retweets 0 likes -
Replying to @jlongster
Lint autofixes operate on the AST. So you need to generate a pretty AST. Either then require you to run a nicer autoformatter or we just improve Rome's code generator. Easy decision. Why uphill battle? Easy to tell people to just use Prettier if they don't like it.
1 reply 0 retweets 0 likes -
Replying to @sebmck
You are choosing the style of people’s code, and taking on that responsibility. Absolutely an uphill battle to convince everyone of that format. Just use prettier is too simplistic. If i use it, and your autofix reformats everything, and I have to format back, no way
2 replies 0 retweets 1 like -
Replying to @jlongster @sebmck
Go for it if you want though! Was just curious. I get that the integration is better. I thought prettier could take an AST and output a string?
2 replies 0 retweets 0 likes -
Replying to @jlongster @sebmck
Unfortunately not: https://github.com/prettier/prettier/issues/5998 …. There were some babel plugins that did this but I think they stopped working at some point.
1 reply 0 retweets 1 like -
Replying to @sebsilbermann @sebmck
Oooh shit, I’m surprised that never happened, I thought we got mostly there. That’s a big missing piece
1 reply 0 retweets 0 likes -
That issue is a bit misleading. Prettier has the Custom Parser API that can be used for this:https://prettier.io/docs/en/api.html#custom-parser-api …
2 replies 0 retweets 0 likes -
Last time I used this I’m pretty sure I ran into issues with the AST being mutated so you had to clone the whole thing or reparse every time
1 reply 0 retweets 0 likes -
Oh, right, Prettier does that. It supposes the AST is disposable.
1 reply 0 retweets 0 likes
Which is especially problematic for Rome, which uses an immutable AST and a lot of reference equality for caching.
-
-
yeah mutating sucks
0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 