r/webdev • • 21d ago

Problem with concurrent linter fixes

https://jfmengels.net/concurrent-linter-fixes/
0 Upvotes

9 comments sorted by

View all comments

1

u/Afnan_CH_Digital 21d ago

Hit this exact class of bug once with eslint --fix and a custom codemod both wired into the same pre-commit hook. Each read the file, each wrote its own version back, and the last write won, so half the fixes silently vanished. What worked for us: serialize the fixers (one at a time, re-lint between passes) and let CI only ever check, never fix. Fixes happen locally where a human can actually eyeball the diff.