The best-practice would be to handle the lint and formatting using a pre-commit hook in git.
Check out: https://pre-commit.com