feat: Switch project tooling from npm to bun and add enhanced pre-commit
checks - Replace npm commands with bun/bunx in scripts, docs, and CI - Add enhanced pre-commit checks with parallel execution - Document pre-commit hook behavior in PRE_COMMIT_HOOKS.md - Update .gitignore/.dockerignore for bun-debug.log - Refine ESLint config for bun and Prettier integration - Add scripts/type-check-staged.sh for fast staged type checks - Improve developer workflow and code quality automation
This commit is contained in:
@@ -66,7 +66,7 @@ echo -e "${YELLOW}Running initial code formatting...${NC}"
|
||||
if command -v bun &> /dev/null; then
|
||||
bun run format
|
||||
elif command -v npm &> /dev/null; then
|
||||
npm run format
|
||||
bun run format
|
||||
fi
|
||||
|
||||
# Run initial linting
|
||||
@@ -74,7 +74,7 @@ echo -e "${YELLOW}Running initial linting...${NC}"
|
||||
if command -v bun &> /dev/null; then
|
||||
bun run lint:fix
|
||||
elif command -v npm &> /dev/null; then
|
||||
npm run lint:fix
|
||||
bun run lint:fix
|
||||
fi
|
||||
|
||||
# Run initial markdown linting
|
||||
@@ -82,7 +82,7 @@ echo -e "${YELLOW}Running initial markdown linting...${NC}"
|
||||
if command -v bun &> /dev/null; then
|
||||
bun run lint:markdown:fix || echo "Markdown linting completed with warnings"
|
||||
elif command -v npm &> /dev/null; then
|
||||
npm run lint:markdown:fix || echo "Markdown linting completed with warnings"
|
||||
bun run lint:markdown:fix || echo "Markdown linting completed with warnings"
|
||||
fi
|
||||
|
||||
# Fix EditorConfig issues
|
||||
@@ -90,7 +90,7 @@ echo -e "${YELLOW}Fixing EditorConfig issues...${NC}"
|
||||
if command -v bun &> /dev/null; then
|
||||
bun run fix:editorconfig || echo "EditorConfig fixes completed"
|
||||
elif command -v npm &> /dev/null; then
|
||||
npm run fix:editorconfig || echo "EditorConfig fixes completed"
|
||||
bun run fix:editorconfig || echo "EditorConfig fixes completed"
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}✅ NodeJS-native pre-commit hooks and code formatters have been set up successfully!${NC}"
|
||||
|
||||
Reference in New Issue
Block a user