Fix Lint Errors
Steps
- •
Run lint to get current errors:
- •Monorepo:
pnpm lint - •Standard:
npm run lint - •Fallback:
npx eslint . --ext .ts,.tsx
- •Monorepo:
- •
Try auto-fix first:
- •
npm run lint -- --fixorpnpm lint --fix - •This handles most formatting and simple rule violations
- •
- •
For remaining errors, read each file and fix manually:
- •Unused imports → remove them
- •Unused variables → remove or prefix with
_if intentional - •Missing dependencies in hooks → add them or restructure
- •Console.log → replace with project logger if available
- •Any/unknown → add proper types
- •
Re-run lint to confirm zero errors
- •
Report:
codeFixed N lint errors: - file:line — rule — what was fixed
Rules
- •Never disable ESLint rules with comments unless truly necessary (explain why)
- •If a rule seems wrong for the project, flag it — don't suppress it
- •Check for project-specific lint rules (umlaut checks, etc.)