mirror of
https://github.com/cline/cline.git
synced 2026-09-17 17:45:33 +08:00
Instead of doing a prettier check in the pre-commit, just format the staged changes. Use the package lint-stage to handle only formatting staged changes.
18 lines
391 B
Plaintext
Executable File
18 lines
391 B
Plaintext
Executable File
echo "Running pre-commit checks..."
|
|
|
|
# Run ESLint
|
|
echo "Running ESLint..."
|
|
npm run lint || {
|
|
echo "❌ ESLint check failed. Please fix the errors and try committing again."
|
|
exit 1
|
|
}
|
|
|
|
# Run Prettier
|
|
echo "Running Prettier..."
|
|
npx lint-staged --verbose || {
|
|
echo "❌ Prettier failed. Please fix the errors and try committing again."
|
|
exit 1
|
|
}
|
|
|
|
echo "✅ All checks passed!"
|