Snippet · Writing & changing code
Add a formatter and a linter
So style arguments stop and small mistakes get caught.
My project uses <stack> and deploys to <host>. It has no linter or formatter yet. Set up the standard ones for this stack: - Which tools, and why those. - The smallest configuration that's useful. Defaults where possible. - One command to format and one to check. - Whether anything needs to change on the host, or whether this stays on my machine only. Then tell me how to apply the formatter once, as its own commit, so it doesn't clutter every later diff.
Format everything in a single commit on its own. Mixed with real changes, formatting hides the lines that matter in every diff for weeks.