Skip to content

Enable default oxlint correctness rules#1748

Merged
kmcginnes merged 1 commit intoaws:mainfrom
kmcginnes:enable-oxlint-correctness-rules
May 5, 2026
Merged

Enable default oxlint correctness rules#1748
kmcginnes merged 1 commit intoaws:mainfrom
kmcginnes:enable-oxlint-correctness-rules

Conversation

@kmcginnes
Copy link
Copy Markdown
Collaborator

Description

Fixes 39 lint violations and flips the oxlint correctness category from "off" to "error". This means new correctness rules will be automatically enabled on oxlint upgrades.

  • Fix no-unused-expressions (13) — convert ternary/&& statements to if/else
  • Fix no-useless-fallback-in-spread (13) — remove unnecessary || {} from spreads
  • Fix no-misused-spread (6) — fix unsafe spreads of arrays/iterables in objects; add disable comments for intentional MouseEvent/Error property extraction
  • Fix no-meaningless-void-operator (4) — remove void from already-void calls
  • Fix no-useless-length-check (2) — remove redundant .length > 0 before .some()
  • Fix no-useless-default-assignment (1) — remove default on non-nullish property
  • Simplify .oxlintrc.json — remove ~60 individual rule entries now redundant with the category default

Validation

  • pnpm checks passes (119 rules, 0 errors)
  • pnpm test passes (153 files, 1660 tests)

Related Issues

Check List

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I have verified pnpm checks passes with no errors.
  • I have verified pnpm test passes with no failures.
  • I have covered new added functionality with unit tests if necessary.
  • I have updated documentation if necessary.

@kmcginnes kmcginnes force-pushed the enable-oxlint-correctness-rules branch 10 times, most recently from b6db086 to a93b3e5 Compare May 5, 2026 20:30
@kmcginnes kmcginnes force-pushed the enable-oxlint-correctness-rules branch from a93b3e5 to 8b01806 Compare May 5, 2026 20:51
@kmcginnes kmcginnes marked this pull request as ready for review May 5, 2026 20:54
@kmcginnes kmcginnes merged commit 602ccdf into aws:main May 5, 2026
3 checks passed
@kmcginnes kmcginnes deleted the enable-oxlint-correctness-rules branch May 5, 2026 21:01
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.

Enable default oxlint correctness rules

1 participant