Commit 42d8f98
Add ESLint to pre-commit hooks to prevent CI failures
Previously, pre-commit hooks only ran RuboCop, Prettier, and trailing
newline checks, but did NOT run ESLint. This meant ESLint errors could
slip through and only be caught in CI.
Changes:
- Created bin/lefthook/eslint-lint hook script that auto-fixes ESLint issues
- Added ESLint hook to .lefthook.yml pre-commit configuration
- Updated CLAUDE.md to document:
- The complete list of pre-commit hooks that run
- The monorepo structure with separate Pro package linting
- Why CI lints both directories separately
The hook follows the same pattern as other hooks:
- Detects changed JS/TS files (staged + unstaged + untracked)
- Runs ESLint with --fix to auto-correct issues
- Re-stages fixed files automatically
This prevents the frustrating situation where local commits succeed but
CI fails on ESLint violations.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 7210588 commit 42d8f98
3 files changed
+42
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
| |||
90 | 96 | | |
91 | 97 | | |
92 | 98 | | |
93 | | - | |
| 99 | + | |
94 | 100 | | |
95 | | - | |
| 101 | + | |
96 | 102 | | |
| 103 | + | |
| 104 | + | |
97 | 105 | | |
98 | 106 | | |
99 | 107 | | |
| 108 | + | |
| 109 | + | |
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments