You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that XO can be compatible with prettier without using it directly:
xo --prettier
Would become
xo --prettier && prettier
The flag would enable compatibility with prettier rather than run prettier.
In reality repos already have to run two commands since they have to run prettier on the remaining files anyway, but they risk running different prettier versions.
@spence-s also mentioned difficulty migrating the current config to flat due to prettier, if I understood that correctly
The text was updated successfully, but these errors were encountered:
I typically use prettier, and I have jumped through a lot of hoops to get prettier working in the flat config. It is mostly working now.
I think I would support this design decision though for a couple of reasons.
prettier now has its own concept of overrides which will be extremely difficult to support in xo, we don't support this in the current or flat version
As you said, the code is difficult to support in general, but we have it migrated at this time.
prettier now supports much more than js and ts so I commonly run prettier on just css and json without xo anyway so this wouldn't be a big deal.
finally, the flat config still feels really slow sometimes (I am using it on most of my repos now), I am not sure what is at the root cause of that. I don't think prettier is helping and could be a culprit.
1 concern I have over dropping prettier formatting directly is that I am not sure that the vscode editor extension supports the work flow of using both prettier and xo without some changes. It might though, and I don't think the changes would be too hard if needed.
Using prettier kinda makes sense here but most repos I've worked on use prettier everywhere, not just on JS files. See the latest issue:
I think that XO can be compatible with prettier without using it directly:
xo --prettier
Would become
xo --prettier && prettier
The flag would enable compatibility with prettier rather than run prettier.
In reality repos already have to run two commands since they have to run prettier on the remaining files anyway, but they risk running different prettier versions.
@spence-s also mentioned difficulty migrating the current config to flat due to prettier, if I understood that correctly
The text was updated successfully, but these errors were encountered: