do pre-commit check and refactor to add lint task