Featured
ESLint Pre-commit Hook
Lint JavaScript/TypeScript files before committing
Category:hooks-configs
Type:hook
Difficulty:beginner
linting
pre-commit
javascript
typescript
beginner
Description
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
Resource Content
{
"hooks": {
"pre-commit": [
{
"name": "eslint-check",
"command": "npx eslint --fix",
"match": "**/*.{js,jsx,ts,tsx}",
"description": "Lint and fix JavaScript/TypeScript files"
}
]
}
}Rate This Resource
0
Help others discover great resources
Statistics
0
Stars
0
Copies
404
Days ago
594
Views