3 ms·
The author enables auto-formatting and linting in his editor. He then runs into the problem of huge and meaningless diffs when working on code that doesn't conf
by cratermoon 5y ago
The author enables auto-formatting and linting in his editor. He then runs into the problem of huge and meaningless diffs when working on code that doesn't conform to the formatting and linting settings.
His solution is to add complexity, effort (and opportunity for errors) to the process, rather than thinking, "maybe automatically reformatting the source code is something that should be done more selectively".
- joshbetz 5y agoMost of the code I work on actually does conform to the formatting and linting settings. Once in a while I'll work on something that doesn't and if I've already written some code, I find it's easier to stage part of the changes like this. Obviously do what works for you.