Use a Git hook: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
For example, Run you lint script on pre-commit. You can use `git config core.hooksPath .githooks` in your package.json/cargo.toml/composer.json/etc scripts prepare hook to maintain your scripts in a `.githooks` directory in the repo.
You could also run your code coverage command on pre-commit to help with discipline. Sky is the limit.