Re:Ask HN: What work/office purchase transformed your life?
by charlie0 on Thursday November 16, 2023 @04:38PM
(#38295924)
100% agreed, Jetbrain IDEs are great buys, but some people refuse to make the leap. I'm currently running into formatting issues/PR conflicts because of other devs refusing to switch over and the default formatting rules between Code and Jetbrains is wide.
[ Parent
| on HN ]
Re:Ask HN: What work/office purchase transformed your life?
by skydhash on Thursday November 16, 2023 @06:17PM
(#38297042)
I think the best solution is to settle for a third party formatter.
Re:Ask HN: What work/office purchase transformed your life?
by solardev on Thursday November 16, 2023 @08:33PM
(#38298133)
Oh, yeah, we had that issue too and solved it pretty successfully with `.editorconfig` (shareable between VScode and IntelliJ, https://editorconfig.org/) combined with `prettier`.
Each IDE is configured to:
- Not reformat code on its own
- Ignore whitespace
- Run `prettier` as a pre-commit hook
Those settings are saved to `.editorconfig` where possible, or to each IDE's repo-specific folder (e.g. `.idea`).
Then in theory each developer can use whatever IDE they want, whatever whitespace settings they want (tabs vs spaces), and the end code committed to the repo is still the same. It took a commit or three to set up and work out all the kinks, but afterward it ran flawlessly.
Re:Ask HN: What work/office purchase transformed your life?
by charlie0 on Friday November 17, 2023 @09:41AM
(#38304236)
I've suggested that twice now, but it's a couple of the more senior members on the team being resistant, so the feet dragging continues.