Linters are great for running as git pre-commit hooks. I like the “out of the box” ideas given in this article: i.e. it’s not just about code style.
It’s important to keep these fast though. I treat slow linters like integration tests: have them run on a build server, and only run them locally when reproducing/debugging a failure.