Skip to content

chore(lint): clear all 64 oxlint warnings repo-wide - #502

Open
krasnoperov wants to merge 1 commit into
mainfrom
chore/lint-warnings
Open

chore(lint): clear all 64 oxlint warnings repo-wide#502
krasnoperov wants to merge 1 commit into
mainfrom
chore/lint-warnings

Conversation

@krasnoperov

Copy link
Copy Markdown
Owner

Summary

All five warning categories cleared; lint is now 0 warnings, 0 errors. No behavior change.

Rule Count Fix
`unicorn/no-useless-fallback-in-spread` 21 drop `?? {}` from spreads (`...x` instead of `...(x ?? {})`)
`no-unused-vars` 32 remove unused imports / vars / types; prefix unused params with `_`
`unicorn/no-useless-spread` 7 unwrap `{ ...(cond ? {...} : {}) }` patterns
`no-constant-condition` 2 replace `do {...} while (true)` with the right exit condition (existing throw-on-deadline preserved)
`no-unsafe-optional-chaining` 2 guard `(emitted[i]?.content as ...).body` with a `?? {}` between the optional chain and the cast

41 files changed, +70/-81. Repo-wide `pnpm test` (644 tests) still green; `pnpm typecheck` clean.

Why now

The merge-trees rollout (PRs #483-#501) brought lint warnings as a side effect. Clearing them as a separate PR keeps the main feature work focused on behavior changes; this is purely housekeeping.

All five warning categories addressed; zero warnings, zero errors
after this change. No behavior change.

- no-useless-fallback-in-spread (21): removed `?? {}` fallbacks from
  spreads. Spreading a falsy value is already a no-op, so the
  fallback was dead code.
- no-unused-vars (32): removed unused imports, variables, type
  aliases, and parameters across src/, packages/merge-steward/,
  and packages/review-quill/. Where a parameter is required by an
  external signature, prefixed with `_`.
- no-useless-spread (7): unwrapped a few `...({...} ? {...} : {})`
  patterns that produced new objects only to spread them.
- no-constant-condition (2): replaced `do { ... } while (true)` in
  CLI poll loops with conditions that the existing exit checks
  satisfy. The throw-on-deadline path is preserved.
- no-unsafe-optional-chaining (2): in
  test/linear-progress-reporter.test.ts, replaced
  `(emitted[i]?.content as { body? }).body` with
  `((emitted[i]?.content ?? {}) as { body? }).body` so a missing
  index doesn't TypeError before the cast resolves.

@review-quill review-quill Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: ✅ Approve — The warning cleanups preserve existing behavior, and no correctness regressions or repository-policy violations are evident in the current diff.

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