Repository navigation
fix: no-explicit-any en 8 archivos e2e, vigesimosegundo batch (117 -> 93) - #109
Merged
Merged
Conversation
… 93)
Segundo batch multi-archivo. Todas las 24 ocurrencias siguen los mismos
2-3 patrones ya establecidos en batches anteriores (find()/filter() sobre
json() de Playwright con cast a Array<{...}>; page: any -> page: Page):
- e2e/ciclo-credito.spec.ts (3x), e2e/ciclo-pedido-completo.spec.ts (3x):
facturas.find((f: any) => f.pedidoId === pedidoId) -> cast a
Array<{ id, pedidoId, estado, saldo }>. ciclo-pedido-completo tambien
tenia page: any en cerrarEmbarqueTest -> page: Page.
- e2e/deudas.spec.ts (3x): page: any en 2 helpers -> Page; body.resumen.find
-> cast a Array<{ trabajadorId, totalPendiente, cantidadDeudas }>.
- e2e/embarques-fixes.spec.ts (3x): mismo patron embarquesLogin(page: any)
+ route: any de los batches 15/20 -> Page (route ya no necesita
anotacion, contexto real de Page.route).
- e2e/productos-comprehensive.spec.ts (3x): productos?.find((p: any) =>
p.codigo === ...) x3 -> cast a Array<{ id, codigo, precios? }>. Rompio
tsc en 1 sitio (verifyPacaAgua possibly undefined tras tipar el find)
-- corregido con "!" (mismo patron ya usado en batches previos: el test
ya asume el resultado definido, ahora lo declara explicitamente).
Los siguientes 3 estan bajo e2e/qa-comprehensive/ (excluido de tsconfig,
ver nota de PR #104 -- verificados manualmente con copia temporal dentro
de e2e/, 0 errores):
- e2e/qa-comprehensive/00-fixtures.ts (3x): apiAs(data?: any) -> unknown;
expectStatus(response: any) -> APIResponse (import type de
@playwright/test); (test as any).info?.() || {} -> test.info() en un
try/catch (test.info() lanza si se llama fuera de un test en ejecucion,
a diferencia del optional-chain+fallback anterior -- se preserva el
mismo comportamiento defensivo sin any).
- e2e/qa-comprehensive/03-domain-flows/recurrentes-flow.spec.ts (3x) y
rutas-nomina-reportes-facturas-flow.spec.ts (3x): mismo patron
find()/map() sobre json() -> casts a Array<{...}> con los campos
minimos que cada test realmente usa.
Verificacion:
- npx eslint <8 archivos> --max-warnings 999 -> limpio
- npx tsc --noEmit (repo completo, sobre main actualizado con PR #108) -> 0 errores
(productos-comprehensive.spec.ts fallo primero con TS18048 "possibly
undefined", corregido con "!" antes de cerrar el batch; los 3 archivos
qa-comprehensive se verificaron aparte via copia temporal, 0 errores)
- npx eslint . --max-warnings 999 --format json -> total 117 -> 93 (-24,
no-explicit-any 52 -> 28, delta exacto = 24 ocurrencias corregidas)
- npx vitest run (repo completo) -> 233 archivos, 2461 tests, 0 fallos, 0 regresiones
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
casasleonj
pushed a commit
that referenced
this pull request
Aug 21, 2026
…65) — categoria a CERO
Vigesimotercer batch de la limpieza de deuda de @typescript-eslint/no-explicit-any.
Batch multi-archivo mas grande hasta ahora (20 archivos). Reduce el total de issues
de eslint del repo de 93 a 65 (-28), dejando @typescript-eslint/no-explicit-any en
CERO ocurrencias en todo el repositorio. Solo queda react-hooks/set-state-in-effect (65).
Cambios (mismos 2-4 patrones ya establecidos en batches anteriores):
- e2e/casos.spec.ts, e2e/compras.spec.ts, e2e/fixes/clientes-crear-lento-fix.spec.ts,
e2e/produccion/clientes-crear-lento.spec.ts, e2e/qa-comprehensive/05-security-malicious/state-race-session.spec.ts,
e2e/roles-permisos.spec.ts, e2e/produccion-offline.spec.ts,
e2e/qa-comprehensive/02-forms-validation/{admin-user-form,venta-rapida-form}.spec.ts,
e2e/qa-comprehensive/06-business-edge-cases/edge-cases.spec.ts,
e2e/qa-comprehensive/09-realistic-day/01-day-asistente-completo.spec.ts:
find()/filter()/map() sobre json() de Playwright (retorna any) -> cast a
Array<{...}> con los campos minimos que cada test realmente usa.
- e2e/auth-endpoints.spec.ts: apiPutAuth(data: any) -> unknown.
- e2e/user-flow.spec.ts: (window as any).__PLAYWRIGHT_TEST__ -> window.__PLAYWRIGHT_TEST__
(ya tipado ambient desde batch 12).
- e2e/qa/07-offline-sync/offline-venta-libre-sync.spec.ts: (window as any).__bambu ->
window.__bambu! (mismo ambient type).
- e2e/qa-comprehensive/05-security-malicious/malicious-inputs.spec.ts:
apiPost(page, url, null as any) / ([] as any) -> null / [] (el parametro ya
acepta `unknown` desde PR #109, el cast era innecesario).
- e2e/qa-comprehensive/05-security-malicious/state-race-session.spec.ts:
cookies.find((c: any) => ...) -> anotacion removida (Cookie[] real de Playwright
ya tipa .name: string).
- e2e/exploratory/walkthrough-alertas.spec.ts: data?: any -> data?: unknown.
- e2e/exploratory/walkthrough-closure.spec.ts: previewList.find((p: any) => ...) ->
cast del array fuente a Array<{recurrenteId: string}>.
- e2e/exploratory/walkthrough-offline.spec.ts: (window as any) -> cast a
Record<string, (() => Promise<void>) | undefined>.
- e2e/exploratory/walkthrough-tests-fix.spec.ts: hasHorizontalOverflow(page: any) ->
Page (import type agregado).
- e2e/productos.spec.ts: prodBody.productos?.find((p: any) => ...) -> cast a
Array<{precios?: Array<{id: string}>}> | undefined. tsc detecto ademas
producto.precios[0].id como possibly undefined tras tipar el find -> corregido
con `!` (el find ya garantiza precios.length > 0 para el item encontrado).
Descubrimiento de este batch: 8 de los 20 archivos viven bajo e2e/exploratory/ o
e2e/qa-comprehensive/, ambos excluidos del `exclude` de tsconfig.json (confirmado
via --listFiles). En vez del metodo de copia temporal usado en batches previos
(que producia falsos positivos por imports rotos), se verificaron quitando
temporalmente esos 2 excludes de tsconfig.json, corriendo tsc --noEmit completo,
y restaurando el archivo exacto despues (confirmado con git diff vacio). Los 41
errores preexistentes encontrados en ese scope ampliado son todos de archivos/lineas
que este batch no toco (walkthrough-helpers.ts, 08-destructive-walkthrough/00-fixtures.ts,
09-pedidos-desde-clientes-ui.spec.ts) — deuda tecnica separada, no introducida aqui.
Verificacion:
- npx eslint <20 archivos> --max-warnings 999 -> limpio
- npx tsc --noEmit (repo completo, scope normal) -> 0 errores
- npx tsc --noEmit (scope ampliado sin los 2 excludes, temporal) -> 0 errores
atribuibles a este batch
- npx eslint . --max-warnings 999 --format json -> total 93 -> 65 (-28,
no-explicit-any 28 -> 0, react-hooks/set-state-in-effect sin cambios en 65)
- npx vitest run (repo completo) -> 233 archivos, 2461 tests, 0 fallos, 0 regresiones
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YUrNA2cKnFKdNJgHEYow42
casasleonj
added a commit
that referenced
this pull request
Aug 21, 2026
…65) — categoria a CERO (#110) Vigesimotercer batch de la limpieza de deuda de @typescript-eslint/no-explicit-any. Batch multi-archivo mas grande hasta ahora (20 archivos). Reduce el total de issues de eslint del repo de 93 a 65 (-28), dejando @typescript-eslint/no-explicit-any en CERO ocurrencias en todo el repositorio. Solo queda react-hooks/set-state-in-effect (65). Cambios (mismos 2-4 patrones ya establecidos en batches anteriores): - e2e/casos.spec.ts, e2e/compras.spec.ts, e2e/fixes/clientes-crear-lento-fix.spec.ts, e2e/produccion/clientes-crear-lento.spec.ts, e2e/qa-comprehensive/05-security-malicious/state-race-session.spec.ts, e2e/roles-permisos.spec.ts, e2e/produccion-offline.spec.ts, e2e/qa-comprehensive/02-forms-validation/{admin-user-form,venta-rapida-form}.spec.ts, e2e/qa-comprehensive/06-business-edge-cases/edge-cases.spec.ts, e2e/qa-comprehensive/09-realistic-day/01-day-asistente-completo.spec.ts: find()/filter()/map() sobre json() de Playwright (retorna any) -> cast a Array<{...}> con los campos minimos que cada test realmente usa. - e2e/auth-endpoints.spec.ts: apiPutAuth(data: any) -> unknown. - e2e/user-flow.spec.ts: (window as any).__PLAYWRIGHT_TEST__ -> window.__PLAYWRIGHT_TEST__ (ya tipado ambient desde batch 12). - e2e/qa/07-offline-sync/offline-venta-libre-sync.spec.ts: (window as any).__bambu -> window.__bambu! (mismo ambient type). - e2e/qa-comprehensive/05-security-malicious/malicious-inputs.spec.ts: apiPost(page, url, null as any) / ([] as any) -> null / [] (el parametro ya acepta `unknown` desde PR #109, el cast era innecesario). - e2e/qa-comprehensive/05-security-malicious/state-race-session.spec.ts: cookies.find((c: any) => ...) -> anotacion removida (Cookie[] real de Playwright ya tipa .name: string). - e2e/exploratory/walkthrough-alertas.spec.ts: data?: any -> data?: unknown. - e2e/exploratory/walkthrough-closure.spec.ts: previewList.find((p: any) => ...) -> cast del array fuente a Array<{recurrenteId: string}>. - e2e/exploratory/walkthrough-offline.spec.ts: (window as any) -> cast a Record<string, (() => Promise<void>) | undefined>. - e2e/exploratory/walkthrough-tests-fix.spec.ts: hasHorizontalOverflow(page: any) -> Page (import type agregado). - e2e/productos.spec.ts: prodBody.productos?.find((p: any) => ...) -> cast a Array<{precios?: Array<{id: string}>}> | undefined. tsc detecto ademas producto.precios[0].id como possibly undefined tras tipar el find -> corregido con `!` (el find ya garantiza precios.length > 0 para el item encontrado). Descubrimiento de este batch: 8 de los 20 archivos viven bajo e2e/exploratory/ o e2e/qa-comprehensive/, ambos excluidos del `exclude` de tsconfig.json (confirmado via --listFiles). En vez del metodo de copia temporal usado en batches previos (que producia falsos positivos por imports rotos), se verificaron quitando temporalmente esos 2 excludes de tsconfig.json, corriendo tsc --noEmit completo, y restaurando el archivo exacto despues (confirmado con git diff vacio). Los 41 errores preexistentes encontrados en ese scope ampliado son todos de archivos/lineas que este batch no toco (walkthrough-helpers.ts, 08-destructive-walkthrough/00-fixtures.ts, 09-pedidos-desde-clientes-ui.spec.ts) — deuda tecnica separada, no introducida aqui. Verificacion: - npx eslint <20 archivos> --max-warnings 999 -> limpio - npx tsc --noEmit (repo completo, scope normal) -> 0 errores - npx tsc --noEmit (scope ampliado sin los 2 excludes, temporal) -> 0 errores atribuibles a este batch - npx eslint . --max-warnings 999 --format json -> total 93 -> 65 (-28, no-explicit-any 28 -> 0, react-hooks/set-state-in-effect sin cambios en 65) - npx vitest run (repo completo) -> 233 archivos, 2461 tests, 0 fallos, 0 regresiones Claude-Session: https://claude.ai/code/session_01YUrNA2cKnFKdNJgHEYow42 Co-authored-by: Claude <[email protected]>
This branch was successfully deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resumen
Vigesimosegundo batch de la limpieza de deuda de
@typescript-eslint/no-explicit-any. Segundo batch multi-archivo. Reduce el total de issues de eslint del repo de 117 a 93 (-24).Cambios
Todas las 24 ocurrencias siguen los mismos 2-3 patrones ya establecidos en batches anteriores (
find()/filter()sobrejson()de Playwright con cast aArray<{...}>;page: any->page: Page):e2e/ciclo-credito.spec.ts(3x),e2e/ciclo-pedido-completo.spec.ts(3x):facturas.find((f: any) => f.pedidoId === pedidoId)-> cast aArray<{ id, pedidoId, estado, saldo }>.ciclo-pedido-completotambien teniapage: anyencerrarEmbarqueTest->page: Page.e2e/deudas.spec.ts(3x):page: anyen 2 helpers ->Page;body.resumen.find-> cast aArray<{ trabajadorId, totalPendiente, cantidadDeudas }>.e2e/embarques-fixes.spec.ts(3x): mismo patronembarquesLogin(page: any)+route: anyde los batches 15/20 ->Page(routeya no necesita anotacion, contexto real dePage.route).e2e/productos-comprehensive.spec.ts(3x):productos?.find((p: any) => p.codigo === ...)x3 -> cast aArray<{ id, codigo, precios? }>. Rompiotscen 1 sitio (verifyPacaAguapossibly undefined tras tipar elfind) — corregido con!(mismo patron ya usado en batches previos).Los siguientes 3 estan bajo
e2e/qa-comprehensive/(excluido detsconfig, ver nota de PR #104 — verificados manualmente con copia temporal dentro dee2e/, 0 errores):e2e/qa-comprehensive/00-fixtures.ts(3x):apiAs(data?: any)->unknown;expectStatus(response: any)->APIResponse(import type de@playwright/test);(test as any).info?.() || {}->test.info()en un try/catch (test.info()lanza si se llama fuera de un test en ejecucion, a diferencia del optional-chain+fallback anterior — se preserva el mismo comportamiento defensivo sinany).e2e/qa-comprehensive/03-domain-flows/recurrentes-flow.spec.ts(3x) yrutas-nomina-reportes-facturas-flow.spec.ts(3x): mismo patronfind()/map()sobrejson()-> casts aArray<{...}>con los campos minimos que cada test realmente usa.Verificacion
npx eslint <8 archivos> --max-warnings 999-> limpionpx tsc --noEmit(repo completo, sobre main actualizado con PR fix: no-explicit-any en 3 archivos e2e, vigesimoprimer batch (129 -> 117) #108) -> 0 errores (productos-comprehensive.spec.tsfallo primero conTS18048 "possibly undefined", corregido con!antes de cerrar el batch; los 3 archivosqa-comprehensivese verificaron aparte via copia temporal, 0 errores)npx eslint . --max-warnings 999 --format json-> total 117 -> 93 (-24,no-explicit-any52 -> 28, delta exacto = 24 ocurrencias corregidas)npx vitest run(repo completo) -> 233 archivos, 2461 tests, 0 fallos, 0 regresionesNota sobre CI
El job
e2eesta desactivado temporalmente (if: falseen.github/workflows/ci.yml) mientras dure esta limpieza de lint, por instruccion explicita del usuario — se revertira una vez resueltos todos los issues restantes.Type check + TestsyLint (non-blocking)corren normalmente.Generated by Claude Code