-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
The lint-staged pre-commit hook is failing with a validation error.
Error
✖ Validation Error:
Invalid value for 'linters': {
'*.{js,json,ts}': [ 'prettier --write', 'git add' ],
'*.md': [ 'markdown-toc -i', 'prettier --write', 'git add' ]
}
Function task should contain 'title' and 'task' fields, where 'title' should be a string and 'task' should be a function.
Steps to Reproduce
- Try to commit with
git commit - The pre-commit hook runs
pnpm lint-staged - Fails with validation error
Expected Behavior
lint-staged should run successfully on staged files.
Possible Causes
- Conflict with a lint-staged config somewhere in node_modules
- Version incompatibility
- Incorrect lint-staged.config.js format
Environment
- Node.js v22.22.0
- pnpm 9.15.0
- lint-staged 16.2.7
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels