← Back to PRs

#11549: lint: add no-console rule and migrate 5 files to structured logger

by vaibhavtupe open 2026-02-08 00:19 View on GitHub →
channel: whatsapp-web stale
## Summary Addresses #11513 Adds an oxlint `eslint/no-console` rule and migrates 5 files from `console.*` to the structured `createSubsystemLogger` pattern. ## Changes - **`.oxlintrc.json`**: Added `eslint/no-console: warn` rule with test file exemption - **5 files migrated** to use `createSubsystemLogger`: - `src/infra/tailscale.ts` - `src/infra/retry-policy.ts` - `src/terminal/restore.ts` - `src/entry.ts` - `src/web/login.ts` ## Why `warn` instead of `error`? There are ~248 remaining `console.*` instances in the codebase. Setting the rule to `warn` allows: 1. Gradual migration without breaking CI 2. Visibility into remaining work 3. Follow-up PRs to continue the migration ## Testing - [x] `pnpm build` - passes - [x] `pnpm check` - passes (248 warnings, 0 errors) ## AI-Assisted This PR was AI-assisted using Claude Code. The changes were reviewed and tested locally. <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds an oxlint `eslint/no-console` rule (set to `warn`, with a test-file override) and migrates five modules off `console.*` onto the structured `createSubsystemLogger` API. Most changes are straightforward mechanical replacements, but a couple of the migrations also change *where* messages are emitted (structured logger vs `runtime` sink / CLI output). In particular, `src/web/login.ts` now logs end-user status/errors via a subsystem logger instead of the runtime-aware logging helpers, and `src/infra/tailscale.ts` mixes subsystem logging with `runtime.error(...)` in the same failure path, which can lead to duplicated or misplaced output depending on logger/runtime configuration. <h3>Confidence Score: 4/5</h3> - Safe to merge after addressing a couple of output-routing behavior changes. - The lint config change is low-risk and the console-to-logger migrations are mostly mechanical, but a few replacements alter how user-facing messages are emitted (runtime sink vs structured logger), which can affect CLI UX or cause duplicate/missing output in some configurations. - src/web/login.ts, src/infra/tailscale.ts <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs