Many linters are external (shell) commands you can invoke with a filename, and which exit with non-zero status-codes on failure.
The problems a given linter will report upon will obviously vary, but actually executing a linter automatically is broadly tool-agnostic, so automating is pretty simple:
- When you save a file, and it is of a type which has a linter associated with it:
- Run the external linter command passing the filename as an argument.