Catch lint issues the moment they appear
Instead of discovering dozens of lint errors at the end of a session, the Auto Lint Hook runs ESLint immediately after Claude edits a file. Violations surface while the context is still fresh, so Claude can fix them in the same turn. This prevents small issues from compounding into a wall of warnings that takes longer to resolve than the original task.
1
Claude edits a file
The Edit tool modifies a .ts or .tsx file in your project. The PostToolUse event fires automatically.
2
Hook filters by file type
The command checks the file extension. If it matches .ts or .tsx, ESLint runs. Other file types are skipped entirely.
3
ESLint runs with auto fix
The linter applies fixable rules automatically (formatting, import order, unused imports) and reports anything it cannot fix.
4
Results appear in context
Claude sees the linter output and can address remaining issues immediately, before moving on to the next change.