refactor(frontend): optimize pre-commit lint script (#10870)

Co-authored-by: amanape <83104063+amanape@users.noreply.github.com>
This commit is contained in:
Hiep Le 2025-09-12 22:23:29 +07:00 committed by GitHub
parent 69498bebb4
commit 8dc46b7206
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -1,8 +1,6 @@
# Run frontend checks
echo "Running frontend checks..."
cd frontend
npm run lint
npm run check-translation-completeness
npx lint-staged
# Run backend pre-commit

View File

@ -77,12 +77,19 @@
"lint:fix": "eslint src --ext .ts,.tsx,.js --fix && prettier --write src/**/*.{ts,tsx}",
"prepare": "cd .. && husky frontend/.husky",
"typecheck": "react-router typegen && tsc",
"typecheck:staged": "react-router typegen && npx tsc --noEmit --skipLibCheck",
"check-translation-completeness": "node scripts/check-translation-completeness.cjs"
},
"lint-staged": {
"src/**/*.{ts,tsx,js}": [
"eslint --fix",
"prettier --write"
],
"src/**/*.{ts,tsx}": [
"bash -c 'npm run typecheck:staged'"
],
"src/**/*": [
"npm run check-translation-completeness"
]
},
"devDependencies": {