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 find the difference is night and day. Only typescript-eslint supports this https://typescript-eslint.io/rules/key-spacing/ but it's such a pain to configure eslint to work half as good as dprint, I'd love if this were a standard feature of dprint or in the least a plugin. Does anyone know how this would be implemented and can point me in the right direction or have interest in taking this on? My use case is only TS, JSON but I don't see why it couldn't be an optional dprint feature as well.
The text was updated successfully, but these errors were encountered:
Have you found any solution? I tried setting up Eslint Stylistic just for that as well but can't get it working so I gave up lol
Sorry for the late reply. Yes it is possible with Stylistic, I don't have a configuration handy, but I ended up just changing where I put comments and so on to make it easier for me to reason about code. For example, in Go, the convention with structs it you put comments to the right of the fields if your comments are short. With TypeScript, I just interleave comments and I find it's perfectly readable. So I'm just using prettier now. I like dprint but it's slightly less readable imo than prettier because of some nuances around &&, || and &. To each their own.
I'm primarily a Go developer and I love how gofmt aligns values, making it very easy to scan lines of code.
Without this, code reads as:
With this, code reads as:
I find the difference is night and day. Only typescript-eslint supports this https://typescript-eslint.io/rules/key-spacing/ but it's such a pain to configure eslint to work half as good as dprint, I'd love if this were a standard feature of dprint or in the least a plugin. Does anyone know how this would be implemented and can point me in the right direction or have interest in taking this on? My use case is only TS, JSON but I don't see why it couldn't be an optional dprint feature as well.
The text was updated successfully, but these errors were encountered: