Skip to content

fix: resolve oxlint warnings — suppress false positives, remove unused imports - #22687

Merged
kitlangton merged 1 commit into
devfrom
kit/oxlint-cleanup
Apr 16, 2026
Merged

kitlangton merged 1 commit into
devfrom
kit/oxlint-cleanup

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Summary

  • Suppress 3 rules producing false positives for framework patterns (SolidJS, SST)
  • Remove 76 unused imports and 22 unused catch bindings across 82 files
  • Fix misc lint violations: useless length checks, non-null after optional chain, useless catch/spread
  • Add inline suppressions for intentional patterns (reactivity triggers, while(true), async promise executors)

Reduces oxlint warnings from 249 to 100. All remaining are no-unused-vars (unused params, variables, functions) that need manual review per-case.

Rules suppressed in config

Rule Reason
no-unused-expressions SolidJS reads reactive values in createEffect for tracking
no-control-regex Intentional ANSI escape / null byte regex matching
triple-slash-reference Required by SST config and plugin tool definitions

Fixes applied

  • 76 unused imports removed
  • 22 catch (e) -> catch where error was unused
  • 2 useless .length > 0 && before .some()
  • 2 ?.foo! non-null after optional chain
  • 1 useless try/catch that just rethrows
  • 1 [...map.keys()] -> map.keys() in for-of
  • 2 new Array(n) -> Array.from() (serialize.ts)
  • 6 inline oxlint-disable comments for intentional patterns

…d imports and dead code

Suppress 3 rules that produce false positives for this codebase:
- no-unused-expressions (SolidJS reactivity tracking pattern)
- no-control-regex (intentional ANSI/null byte matching)
- triple-slash-reference (required by SST and plugin tools)

Remove 76 unused imports, 22 unused catch bindings, fix useless
length checks, non-null after optional chain, useless catch/spread,
and add inline suppressions for intentional patterns (self-assign
reactivity triggers, while(true) loops, async promise executors).

Reduces oxlint warnings from 249 to 100 (all remaining are
no-unused-vars needing manual judgment).
@kitlangton
kitlangton enabled auto-merge (squash) April 16, 2026 01:29
@kitlangton
kitlangton disabled auto-merge April 16, 2026 01:33
@kitlangton
kitlangton merged commit f7d4665 into dev Apr 16, 2026
10 checks passed
@kitlangton
kitlangton deleted the kit/oxlint-cleanup branch April 16, 2026 01:33
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
isaacfinnegan pushed a commit to isaacfinnegan/whispercode that referenced this pull request Jun 15, 2026
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant