fix(lint): repair broken apps/web lint script and resolve all 1,108 pre-existing ESLint errors #152
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
javascript
question
severity: high
severity: low
severity: medium
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
isyuricunha/website!152
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/broken-web-lint-script"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
⚠️ Do not merge until the follow-up cleanup lands
This PR fixes a real, previously-undetected bug in the lint tooling itself. Merging it as-is will make CI's lint step fail on this PR and on
main, because it stops silently skipping ~1200 real findings. Opening it now so the finding is documented and reviewable, not to be merged standalone — pairs with a follow-up cleanup effort.The bug
apps/web/package.json'slintscript was:-w execruns eslint from the pnpm workspace root, and the.then resolves against that root context instead ofapps/web. In practice this meant the command only ever linted 13 root-level config files (commitlint.config.ts,knip.config.ts,prettier.config.js, files underscripts/, etc.) — never the actualapps/web/srccode.Confirmed this affects the exact command CI runs (
pnpm turbo lint,.github/workflows/ci.yml), not just a local quirk — reproduced with--forceto rule out caching.Every other package in the monorepo (
apps/docs,packages/*) already uses the plain form:apps/webwas the only outlier.The fix
Matches
apps/docs's already-working pattern exactly.Impact once merged
With the script fixed,
pnpm turbo lint --filter=@isyuricunha/webcorrectly finds 1169 errors + 30 warnings acrossapps/web/src. None of these are introduced by this change — they were always there, just never checked. Top offending rules by count:unicorn/max-nested-callsunicorn/no-for-eachunicorn/no-unnecessary-global-thisunicorn/prefer-minimal-ternary@typescript-eslint/no-unnecessary-type-assertionunicorn/no-non-function-verb-prefixunicorn/no-break-in-nested-loopunicorn/prefer-awaitunicorn/prefer-array-from-mapunicorn/prefer-early-return@typescript-eslint/no-empty-functionunicorn/max-nested-callsalone accounts for two-thirds of the total — mostly deeply-nested tRPC/db-query call chains, not necessarily bugs, but real lint debt that's been silently accumulating.How this was found
Discovered while working on #151 (IP hashing) — my own local
lint-stagedpre-commit hook (which correctly runs bareeslint, not through this broken script) flagged 93 pre-existing errors in a file I only changed 2 lines of. That discrepancy between "the hook catches it" and "pnpm turbo lintdoesn't" led to this investigation.Suggested path forward
Do not merge until a follow-up plan exists for the 1169 findings — likely several scoped cleanup PRs grouped by rule or by area, given the size. Happy to scope and execute that as separate, reviewable work.
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment