Skip to content

fix(security+lint): upgrade Next.js 16.2.10, add ESLint, fix React Compiler errors#86

Draft
caimanoliveira wants to merge 1 commit into
mainfrom
claude/kind-keller-32deb7
Draft

fix(security+lint): upgrade Next.js 16.2.10, add ESLint, fix React Compiler errors#86
caimanoliveira wants to merge 1 commit into
mainfrom
claude/kind-keller-32deb7

Conversation

@caimanoliveira

Copy link
Copy Markdown
Owner

Summary

  • Security: Upgrade next 16.2.0 → 16.2.10 (resolves 14 CVEs: DoS via Server Components, XSS via CSP nonces, middleware/proxy bypass, cache poisoning, SSRF via WebSocket)
  • Security: Fix ws memory exhaustion vulnerability via npm audit fix
  • ESLint setup: Add eslint + eslint-config-next devDependencies; create eslint.config.mjs with core-web-vitals + typescript config; update npm run lint script (Next.js 16 removed next lint)
  • React Compiler lint errors (9 fixed):
    • react-hooks/set-state-in-effect in useProducts, useSources, useStages, useLeads, leads/[id]/page.tsx — refactored async fetch to inline async IIFE inside useEffect instead of passing named function references
    • react-hooks/preserve-manual-memoization in useLeads — flattened filter object to individual primitive deps matching compiler inference
    • react/no-unescaped-entities in kanban-column.tsx — replaced bare " with “/”
    • react-hooks/purity in PlanoAcaoWidget — moved Date.now() call to a useState lazy initializer via external defaultDeadline() helper

Test plan

  • npm run build — compiles successfully (22 routes, TypeScript clean)
  • npm run lint — 0 errors, 14 warnings (unused vars, pre-existing)
  • Smoke-test CRM leads page and kanban board
  • Smoke-test trilhas plano de ação widget

Generated by Claude Code

… Compiler errors

- Upgrade next 16.2.0 → 16.2.10 (fixes DoS, XSS, cache poisoning, middleware bypass CVEs)
- Fix ws vulnerability via npm audit fix
- Add eslint + eslint-config-next devDependencies (next lint removed in Next.js 16)
- Create eslint.config.mjs with core-web-vitals + typescript config
- Update npm lint script from `next lint` to `eslint .`
- Fix react-hooks/set-state-in-effect errors in useProducts, useSources, useStages, useLeads
  by restructuring async fetch to inline IIFE inside useEffect
- Fix react-hooks/preserve-manual-memoization in useLeads by flattening filter object deps
- Fix react/no-unescaped-entities in kanban-column.tsx
- Fix react-hooks/purity in PlanoAcaoWidget: move Date.now() to lazy useState initializer

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QPbvJGipRmTDDbRnQnqFLY
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mentoria-crm Error Error Jul 16, 2026 7:20am
splinter Ready Ready Preview, Comment Jul 16, 2026 7:20am
splinter-yhcm Ready Ready Preview, Comment Jul 16, 2026 7:20am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants