mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-11 23:07:01 +08:00
fix(web): restore ESLint, Prettier, and Husky code quality tools (#648)
## Problem PR #647 accidentally removed all code quality tools when adding test dependencies: - ❌ ESLint (9 packages) - code linting - ❌ Prettier - code formatting - ❌ Husky - Git hooks - ❌ lint-staged - pre-commit checks - ❌ Related scripts (lint, format, prepare) This significantly impacts code quality and team collaboration. ## Root Cause When adding test dependencies (vitest, @testing-library/react), the package.json was incorrectly edited, removing all existing devDependencies. ## Solution Restore all code quality tools while keeping the new test dependencies: ### ✅ Restored packages: - @eslint/js - @typescript-eslint/eslint-plugin - @typescript-eslint/parser - eslint + plugins (prettier, react, react-hooks, react-refresh) - prettier - husky - lint-staged ### ✅ Kept test packages: - @testing-library/jest-dom - @testing-library/react - jsdom - vitest ### ✅ Restored scripts: ```json { "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "lint:fix": "eslint . --ext ts,tsx --fix", "format": "prettier --write \"src/**/*.{ts,tsx,css,json}\"", "format:check": "prettier --check \"src/**/*.{ts,tsx,css,json}\"", "test": "vitest run", "prepare": "husky" } ``` ### ✅ Restored lint-staged config ## Impact This fix restores: - Automated code style enforcement - Pre-commit quality checks - Consistent code formatting - Team collaboration standards ## Testing - [x] npm install succeeds - [x] npm run build succeeds - [x] All scripts are functional Related-To: PR #647 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
fa0cc5e064
commit
cad984b220
3558
web/package-lock.json
generated
3558
web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user