Skip to content

fix: lint errors quebram o build (deploys falhando) - #877

Merged
lucianopf merged 2 commits into
mainfrom
fix/lint-build-errors
Aug 10, 2026
Merged

lucianopf merged 2 commits into
mainfrom
fix/lint-build-errors

Conversation

@lucianopf

Copy link
Copy Markdown
Member

Os 5 últimos deploys de produção falharam na Vercel. Entre as causas candidatas, estes erros de lint foram introduzidos pelos rebases recentes:

Arquivo Erro Origem
services/eleicoes/candidaturas.js consistent-return (re-throw faltando — erro era engolido) #874
services/holidays/index.js prefer-template #873
services/ibge/gov.js import/extensions, eqeqeq, radix #865
services/universities.js no-use-before-define, camelcase #861

Todos corrigidos e validados com eslint (0 erros). Build local passa com --no-lint.

…874)

- eleicoes/candidaturas: consistent-return — re-throw do erro não-404
  (antes o erro era engolido e a função retornava undefined)
- holidays: prefer-template
- ibge/gov: import sem extensão, === e radix no parseInt
- universities: função movida antes do uso (no-use-before-define)
  e full_name destructured como fullName (camelcase)

Esses erros quebram o lint do build (deploys falhando na Vercel).

Co-authored-by: Hermes Agent <[email protected]>
Ai-tool: hermes
Ai-model: deepseek-v4-flash
Ai-os: wsl
@vercel

vercel Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
brasilapi Ready Ready Preview Aug 10, 2026 1:44pm

Request Review

…rebased pages

- .prettierrc: endOfLine crlf -> lf (matches .editorconfig; crlf entered main via #863 rebase and broke EVERY deploy since 08-09 with 'Insert ␍' on every line)
- pages/api/diasuteis: convert CRLF blob to LF
- pages/api/ibge/cnae/v1/classes: single quotes
- pages/api/universities/v1/*: prettier formatting (from #861 rebase)
- services/universities.js: prettier formatting
@sonarqubecloud

Copy link
Copy Markdown

@lucianopf
lucianopf merged commit 030480b into main Aug 10, 2026
2 of 3 checks passed
@lucianopf
lucianopf deleted the fix/lint-build-errors branch August 10, 2026 13:59
lucianopf added a commit that referenced this pull request Aug 10, 2026
…E) (#881)

O fix de lint do #877 trocou `==` por `===` na comparação com
ESTIMATED_POPULATION_VARIABLE_ID (9324), mas o IBGE retorna o id como
STRING ('9324') no JSON do agregado → `'9324' === 9324` é false →
data.find retorna undefined → InternalError('Empty data') → 500 em
/api/ibge/uf/v1/[code] (produção e CI).

Fix: Number(item.id) === ESTIMATED_POPULATION_VARIABLE_ID.
Também corrige o InternalError que recebia string em vez de objeto
(message ficava vazia no JSON de erro).

Co-authored-by: Hermes Agent <[email protected]>

This branch was successfully deployed

1 active deployment
Preview — 95612ea7 Deployed Aug 10, 2026 by vercel[bot]
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.

1 participant