Repository navigation
feat(oxlint-config): widen the library rule set and fix test override globs - #265
Merged
Merged
Conversation
jan-kubica
enabled auto-merge
November 7, 2026 20:35
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
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.
Audit of the
library()rule set against the oxlint 1.89 catalog.Missing rules, now on. oxlint enables only the correctness category by default, so several bug-shaped rules were never active:
eqeqeq(== nullallowed),no-var,prefer-const,ban-ts-comment,preserve-caught-error,no-deprecated,no-implied-eval/no-new-func,import/no-duplicates, the type-awareno-unnecessary-*trio,prefer-promise-reject-errors(to matchonly-throw-error), and others listed in the changeset. React files selected withreact.filesnow also get the React correctness rules.exhaustive-depsandjsx-no-undefstay off because the compiler rules and TypeScript already cover them.Override bug. The test override used
__tests__/**and__test__/**. Override globs are anchored at the config directory, so test folders inside packages never matched, and neither did.mts/.cts/.mjs/.cjstest files. The newlibrary-overrides.test.tscovers this.Dead config. The repo's own override turned off five
no-unsafe-*rules that the preset never enables. Theoffentries inlibraryRulesare inactive insidelibrary(), but consumers spreadlibraryRulesover broader presets, so they stay, now with a comment saying why.Considered, left out:
no-fallthrough: already covered bynoFallthroughCasesInSwitchin the shared tsconfig, and oxlint misreads commented empty cases.unicorn/throw-new-error: flagsclass X extends TaggedError(...).no-template-curly-in-string: noisy on workflow${{ }}strings.no-await-in-loop,unicorn/no-array-sort,no-param-reassign,strict-void-return: too noisy.no-unsafe-*family: about 630 hits in this repo alone, so it needs a separate ratchet.prefer-optional-chain: still in the nursery category.The new rules' findings in this repo are fixed. The two intentional ones carry a disable comment with a reason. This is a major bump because consumer lint can fail on upgrade.