| name | lint-project |
| description | Run ESLint on the EduHub frontend. Use when the user asks to lint code, check code style, fix lint errors, or run eslint. |
Lint Project
Quick Commands
cd frontend-nx
yarn lint
yarn lint --fix
Alignment with GitHub Action
The GitHub Action (.github/workflows/frontend-code-checks.yml) uses:
yarn lint
- Node.js 20.x
- Fresh
yarn install --immutable before linting
To match CI results locally:
- Use
yarn lint (as shown in commands above)
- Ensure Node.js 20.x (matches CI)
- Reinstall dependencies with
yarn install --immutable if results differ
Common Issues
Many errors? Run with --fix first
Most formatting issues can be auto-fixed:
yarn lint --fix
Specific file lint
eslint apps/edu-hub/components/MyComponent.tsx
After Linting
- Review remaining errors that couldn't be auto-fixed
- Common manual fixes:
- Unused imports → Remove them
- Missing dependencies in useEffect → Add to dependency array or disable rule with comment
- Type errors → Add proper TypeScript types