feat: enable oxlint suspicious category, fix 24 violations#22727
Merged
kitlangton merged 1 commit intodevfrom Apr 16, 2026
Merged
feat: enable oxlint suspicious category, fix 24 violations#22727kitlangton merged 1 commit intodevfrom
kitlangton merged 1 commit intodevfrom
Conversation
Enable the suspicious rule category (53 rules) with 8 noisy rules
suppressed. Fix all violations from the remaining rules:
- Fix likely bug: `info.reload ? true : true` (always true)
- Add `{ cause }` to 7 re-thrown errors that lost the original stack
- Merge 8 useless string concatenations
- Replace `instanceof Function` with `typeof === 'function'`
- Suppress 7 intentional patterns (test mocks, Durable Object ctor)
jerome-benoit
pushed a commit
to jerome-benoit/opencode
that referenced
this pull request
Apr 16, 2026
xywsxp
pushed a commit
to xywsxp/opencode
that referenced
this pull request
Apr 24, 2026
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.
Summary
Enable the oxlint
suspiciousrule category (53 rules) to catch code that is likely wrong or useless. Suppress 8 rules that are too noisy for this codebase, fix all violations from the remaining rules.Rules suppressed (too noisy)
no-shadowfunction*closures inherently shadowconsistent-function-scopingno-array-sort/no-array-reverseprefer-add-event-listenerrequire-module-specifiersrequire-post-message-target-originno-newFixes applied
no-unneeded-ternaryinfo.reload ? true : true→true(likely bug — always true regardless)preserve-caught-error(7){ cause: error }to re-thrown errors that lost the original stack traceno-useless-concat(8)no-instanceof-builtins(1)instanceof Function→typeof === "function"no-useless-constructor(4)no-extraneous-class(2)no-unmodified-loop-condition(1)stop()call