Repository navigation
fix: no-explicit-any en e2e/embarques-stats.spec.ts, decimoquinto batch (172 -> 161) - #102
Merged
Merged
Conversation
…ch (172 -> 161)
Distinto a los 3 batches anteriores (no usa window.__bambu): las 11
ocurrencias eran parametros/callbacks sin tipar en helpers de este
archivo.
- embarquesLogin(page: any) / gotoEmbarques(page: any) /
createStatsRepartidor(page: any) / createAndCloseEmbarque(page: any, ...)
-> page: Page, importando el tipo real de @playwright/test (convencion
ya establecida en el resto de e2e/ -- clientes.spec.ts, casos.spec.ts,
full-user-day.spec.ts, etc.). Efecto en cascada: con page tipado
correctamente, los 4 callbacks internos de page.route('...', async
(route: any) => {...}) pasan a tener contexto real de tipos (Route se
infiere solo desde la firma de Page.route), asi que sus "route: any"
se eliminan sin necesitar anotacion.
- detalles.filter((d: any) => ...) / workers.find((w: any) => ...) (x3):
la anotacion any parecia redundante (igual que en batches previos,
donde `data` venia de un `any` implicito) pero NO lo era aca -- Playwright
tipa APIResponse.json(): Promise<Serializable> con Serializable=any,
y aunque `data`/`detalles`/`workers` SON `any`, llamar .filter()/.find()
sobre un valor `any` (a diferencia de un any[] ya resuelto) no da
contexto de tipo al callback, así que TS con noImplicitAny exige una
anotacion explicita. Se opto por castear el array a un shape minimo
(Array<{ estado: string }> / Array<{ trabajadorId: string; tasaEntrega:
number; tasaNoEntrega: number }>) en vez de volver a "any" -- da tipado
real a `d`/`w`/`worker` en el resto del test.
Verificacion:
- npx eslint e2e/embarques-stats.spec.ts --max-warnings 999 -> limpio
- npx tsc --noEmit (repo completo, sobre main actualizado con PR #101) -> 0 errores
(el primer intento sin castear detalles/workers rompio con TS7006
"implicitly has an 'any' type" en 3 sitios -- corregido con los casts
Array<{...}> antes de cerrar el batch)
- npx eslint . --max-warnings 999 --format json -> total 172 -> 161 (-11,
no-explicit-any 107 -> 96, delta exacto = 11 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
…h (161 -> 151) Mismo patron mecanico window.__bambu de los batches 12-14 (tipado ya establecido en e2e/fixtures.ts): (window as any).__bambu !== undefined -> window.__bambu !== undefined; (window as any).__bambu.X(...) -> window.__bambu!.X(...). Las 10 ocurrencias eran exactamente este patron, sin variantes nuevas. Verificacion: - npx eslint e2e/offline-counter.spec.ts --max-warnings 999 -> limpio - npx tsc --noEmit (repo completo, sobre main actualizado con PR #102) -> 0 errores - npx eslint . --max-warnings 999 --format json -> total 161 -> 151 (-10, no-explicit-any 96 -> 86, delta exacto = 10 ocurrencias corregidas) - npx vitest run (repo completo) -> 233 archivos, 2461 tests, 0 fallos, 0 regresiones
casasleonj
added a commit
that referenced
this pull request
Aug 21, 2026
…h (161 -> 151) Mismo patron mecanico window.__bambu de los batches 12-14 (tipado ya establecido en e2e/fixtures.ts): (window as any).__bambu !== undefined -> window.__bambu !== undefined; (window as any).__bambu.X(...) -> window.__bambu!.X(...). Las 10 ocurrencias eran exactamente este patron, sin variantes nuevas. Verificacion: - npx eslint e2e/offline-counter.spec.ts --max-warnings 999 -> limpio - npx tsc --noEmit (repo completo, sobre main actualizado con PR #102) -> 0 errores - npx eslint . --max-warnings 999 --format json -> total 161 -> 151 (-10, no-explicit-any 96 -> 86, delta exacto = 10 ocurrencias corregidas) - npx vitest run (repo completo) -> 233 archivos, 2461 tests, 0 fallos, 0 regresiones 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
Decimoquinto batch de la limpieza de deuda de
@typescript-eslint/no-explicit-any. Reduce el total de issues de eslint del repo de 172 a 161 (-11). Todas las 11 ocurrencias estaban ene2e/embarques-stats.spec.ts.Cambios
Distinto a los 3 batches anteriores (no usa
window.__bambu): las 11 ocurrencias eran parametros/callbacks sin tipar en helpers de este archivo.embarquesLogin(page: any)/gotoEmbarques(page: any)/createStatsRepartidor(page: any)/createAndCloseEmbarque(page: any, ...)->page: Page, importando el tipo real de@playwright/test(convencion ya establecida en el resto dee2e/—clientes.spec.ts,casos.spec.ts,full-user-day.spec.ts, etc.). Efecto en cascada: conpagetipado correctamente, los 4 callbacks internos depage.route('...', async (route: any) => {...})pasan a tener contexto real de tipos (Routese infiere solo desde la firma dePage.route), asi que susroute: anyse eliminan sin necesitar anotacion.detalles.filter((d: any) => ...)/workers.find((w: any) => ...)(x3): la anotacionanyparecia redundante (igual que en batches previos, dondedatavenia de unanyimplicito) pero no lo era aca — Playwright tipaAPIResponse.json(): Promise<Serializable>conSerializable=any, y aunquedata/detalles/workersSONany, llamar.filter()/.find()sobre un valorany(a diferencia de unany[]ya resuelto) no da contexto de tipo al callback, así que TS connoImplicitAnyexige una anotacion explicita. Se opto por castear el array a un shape minimo (Array<{ estado: string }>/Array<{ trabajadorId: string; tasaEntrega: number; tasaNoEntrega: number }>) en vez de volver aany— da tipado real ad/w/workeren el resto del test.Verificacion
npx eslint e2e/embarques-stats.spec.ts --max-warnings 999-> limpionpx tsc --noEmit(repo completo, sobre main actualizado con PR fix: no-explicit-any en e2e/flujo-crear-pedido-offline-mobile.spec.ts, decimocuarto batch (184 -> 172) #101) -> 0 errores (el primer intento sin casteardetalles/workersrompio conTS7006 "implicitly has an 'any' type"en 3 sitios — corregido con los castsArray<{...}>antes de cerrar el batch)npx eslint . --max-warnings 999 --format json-> total 172 -> 161 (-11,no-explicit-any107 -> 96, delta exacto = 11 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