chore: enable unused-vars and import lint rules#4083
Conversation
|
|
Important Review skippedToo many files! This PR contains 928 files, which is 778 over the limit of 150. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (928)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…fixture ({}) syntax
…ges; fix no-unsafe-optional-chaining with !
@trigger.dev/build
trigger.dev
@trigger.dev/core
@trigger.dev/python
@trigger.dev/react-hooks
@trigger.dev/redis-worker
@trigger.dev/rsc
@trigger.dev/schema-to-json
@trigger.dev/sdk
commit: |
74a3840 to
683a6c5
Compare
| let _isTimeout = false; | ||
| if (waitpoint.outputIsError && waitpoint.output) { | ||
| isTimeout = true; | ||
| _isTimeout = true; | ||
| } |
There was a problem hiding this comment.
🚩 Dead isTimeout code in two presenters prefixed but not removed
In both ApiWaitpointPresenter.server.ts:59-62 and WaitpointPresenter.server.ts:71-75, the variable isTimeout was renamed to _isTimeout. It is set but never read — this is dead code that computes a value and discards it. The PR correctly silences the lint warning, but the underlying dead code should ideally be cleaned up or the timeout status should be used (e.g., returned in the response). This is pre-existing dead code, not introduced by the PR.
Was this helpful? React with 👍 or 👎 to provide feedback.
| export function SelectHeading({ render, ..._props }: SelectHeadingProps) { | ||
| return ( | ||
| <div className="flex h-[1.375rem] flex-none cursor-default items-center gap-2 border-b border-charcoal-700 bg-charcoal-750 px-2.5 text-xxs uppercase text-text-bright"> | ||
| <Ariakit.SelectHeading render={render} /> |
There was a problem hiding this comment.
🚩 SelectHeading silently drops rest props — pre-existing, not introduced here
The SelectHeading component destructures render and collects remaining props into ..._props (previously ...props), but the rest is never spread onto either the <div> or <Ariakit.SelectHeading>. This means standard HTML/Ariakit props like id, className, style, and accessibility attributes are silently dropped. The interface SelectHeadingProps extends Ariakit.SelectHeadingProps suggests callers expect these to be forwarded. This is a pre-existing issue — the old code also dropped them.
(Refers to lines 630-635)
Was this helpful? React with 👍 or 👎 to provide feedback.
Enable oxlint rules:
no-unused-vars,consistent-type-imports,import/no-duplicatesEnables three previously-disabled oxlint rules and fixes all violations:
no-unused-vars— unused imports removed, unused params/vars prefixed_;caughtErrorsIgnorePattern/destructuredArrayIgnorePatternadded to config so_-prefixed catch params are properly ignoredtypescript/consistent-type-imports— enforced by oxlint--fix; inlineimport()annotations suppressed with targetedeslint-disablecommentsimport/no-duplicates— duplicate imports merged per moduleAll changes are no-ops: no behaviour changes, typecheck passes.