hooks-configs/hook-eslint-checkFeatured
Lint JavaScript/TypeScript files before committing
Pre-commit hook that runs ESLint on staged files. Catches linting errors early and prevents problematic code from being committed. Supports auto-fix for automatically resolvable issues.
Content
{
"hooks": {
"pre-commit": [
{
"name": "eslint-check",
"command": "npx eslint --fix",
"match": "**/*.{js,jsx,ts,tsx}",
"description": "Lint and fix JavaScript/TypeScript files"
}
]
}
}Details
| Category | hooks-configs |
| Tags | lintingpre-commitjavascripttypescriptbeginner |
| License | MIT |
| Author | Claude Code Directory |
| Difficulty | beginner |
Pairs with
hooks-configs/hook-prettier-format
Auto-format code with Prettier before every commit
hooks-configs/hook-typescript-check
Validate TypeScript types before committing
hooks-configs/hook-commit-message
Enforce conventional commit message format
hooks-configs/hook-test-runner
Run tests related to changed files before committing