← Back to catalog
HookQuality↓ 1,565

Lint on Save

Runs the linter automatically whenever a file is edited.

Installation
npx claude-code-templates@latest --hook development-tools/lint-on-save --yes

This hook fires on the PostToolUse event, right after an Edit or MultiEdit change. It detects the language from the file type.

For JavaScript and TypeScript it runs ESLint with auto-fix; for Python it uses Pylint; and for Ruby it applies RuboCop with auto-correct. Style issues are flagged or fixed on the spot.

When to use

  • When you want to keep the code standard without running the linter by hand.
  • When the project already has ESLint, Pylint or RuboCop configured.

How to use

After installing, it runs the linter on its own after each edit. Make sure the matching tool is installed in the project.