There is probably something you can do to only apply some rules to the actual changed lines in a git diff.
You may have to write your own linter for that specifically.
you'd probs want a commit hook for that
you'd probs want a commit hook for that