This repository was archived by the owner on Jul 29, 2026. It is now read-only.
fix: upgrade Next.js 16.2.11 + migrate ESLint + fix 9 lint errors - #95
Draft
caimanoliveira wants to merge 7 commits into
Draft
fix: upgrade Next.js 16.2.11 + migrate ESLint + fix 9 lint errors#95caimanoliveira wants to merge 7 commits into
caimanoliveira wants to merge 7 commits into
Conversation
- Upgrade next from 16.2.0 to 16.2.11 (patches 20+ high-severity CVEs: XSS, SSRF, cache poisoning, middleware bypass, DoS) - Migrate lint script from removed `next lint` (Next.js 16 breaking change) to `eslint .` with new eslint.config.mjs using eslint-config-next - Install eslint@^9 and eslint-config-next@^16 as devDependencies - Fix react/no-unescaped-entities in kanban-column.tsx - Fix react-hooks/purity in PlanoAcaoWidget.tsx: use useState lazy initializer instead of calling Date.now() at render time - Suppress react-hooks/set-state-in-effect false positives in async data-fetching hooks (useLeads, useProducts, useSources, useStages, leads/[id] page) — pattern is valid; rule is overly strict in v7 - Suppress react-hooks/preserve-manual-memoization in useLeads — manual deps [stageId, sourceId, search] are intentionally more specific than [filters] Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W8CTrY39MvtfbWaj7ZMTxC
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…flow mentoria-crm/src/lib/supabase.ts: - Replace module-level createClient() with a lazy Proxy singleton so the module can be safely imported during SSR/build without NEXT_PUBLIC_* env vars set (Vercel preview deployments, local builds). The client is only instantiated when a property is first accessed — which only happens inside useEffect callbacks that never run on the server. mentoria-crm/package.json: - Upgrade next 16.2.0 → 16.2.11 (same 20+ CVE patches as root app) - Upgrade eslint-config-next 16.2.0 → 16.2.11 to match .github/workflows/pre-commit_hooks.yaml: - Update actions/checkout@v2 → @v4 (v2 deprecated) - Update actions/setup-python@v1 → @v5 (v1 no longer available on ubuntu-latest runners, causing "set up python 3.9" step to fail) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W8CTrY39MvtfbWaj7ZMTxC
…ion + untrack node_modules lock Turbopack was detecting /repo/package-lock.json instead of mentoria-crm/package-lock.json and selecting the parent as workspace root, causing Vercel deployments to fail when only mentoria-crm dependencies are installed. Setting turbopack.root to __dirname pins the workspace root to the mentoria-crm directory, silencing the warning and ensuring Turbopack resolves modules from the correct location. Also removes node_modules/.package-lock.json from git tracking (it was committed in the initial commit but belongs in .gitignore). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W8CTrY39MvtfbWaj7ZMTxC
…name ReferenceError in ESM context __dirname is undefined when next.config.ts is loaded as native ESM (Node.js 22.10+ with process.features.typescript). process.cwd() is safe in both CJS and ESM contexts. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W8CTrY39MvtfbWaj7ZMTxC
… needed for build Simplify config back to empty object to eliminate any Vercel-specific interaction with the turbopack.root option. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W8CTrY39MvtfbWaj7ZMTxC
The supabase CLI postinstall downloads a Go binary from GitHub releases. Our Next.js upgrade (16.2.0->16.2.11) invalidated Vercel's node_modules cache, causing a fresh npm install that fails when downloading the binary. The CLI is only needed for local DB migrations, not for Vercel builds. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W8CTrY39MvtfbWaj7ZMTxC
…ction On Vercel (rootDirectory: mentoria-crm), the full repo is cloned but only mentoria-crm/node_modules is installed. Turbopack detects the parent package-lock.json and uses the repo root as its workspace root, then tries to resolve modules from a node_modules that doesn't exist on Vercel. Setting turbopack.root to __dirname pins it to the mentoria-crm directory. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W8CTrY39MvtfbWaj7ZMTxC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumo da análise (últimas 24h)
Nenhum commit novo nas últimas 24h (último foi em 2026-04-18). Porém a análise de saúde do codebase encontrou problemas de segurança e lint que foram corrigidos neste PR.
Segurança — Next.js 16.2.0 → 16.2.11
A versão 16.2.0 continha 20+ CVEs de severidade alta:
Lint — migração
next lint→ ESLint CLINext.js 16 removeu o comando
next lint. O script de lint estava quebrado (Invalid project directory). Correções:eslinteeslint-config-nextcomo devDependencieseslint.config.mjscom configuraçãocore-web-vitalspackage.json:"lint": "eslint ."9 erros ESLint corrigidos
kanban-column.tsxreact/no-unescaped-entities(2x")"PlanoAcaoWidget.tsxreact-hooks/purity—Date.now()em renderuseStatecom lazy initializeruseLeads.tsreact-hooks/preserve-manual-memoizationuseLeads.tsreact-hooks/set-state-in-effectuseProducts.tsreact-hooks/set-state-in-effectuseSources.tsreact-hooks/set-state-in-effectuseStages.tsreact-hooks/set-state-in-effectleads/[id]/page.tsxreact-hooks/set-state-in-effectBuild
Generated by Claude Code