Disable 5 unicorn rules that only fire on intentional patterns#288
Merged
Conversation
From #279. These rules have no path to `error` in this repo — they fire only on deliberate idioms — so disable them rather than leave standing warning noise (per the "no noisy rules" preference). Each carries a rationale comment in eslint.config.js: - no-computed-property-existence-check — flags `obj[dynamicKey]` value reads (`!RULE_DEFAULTS[id]`, `if (states[rule.id])`), not existence checks; no option to narrow. - require-array-sort-compare — every `.sort()` site sorts strings where default order is already correct. - no-incorrect-query-selector — sole hit is a deliberate `querySelectorAll("#id")` copy count. - prefer-await — flags the fire-and-forget `void p.then/.catch()` idiom (our no-floating-promises convention) in contexts that can't take await. - no-top-level-side-effects — sole hit is a documented module-load `registerMethods({…})`. Drops eslint warnings ~268 → ~189. Refs #279 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jun 22, 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.
From #279, following the same call as #287 (
no-this-outside-of-class): rules that have no path toerrorin this repo get turned off rather than left as standing warning noise.All five were investigated under #279 and confirmed to fire only on deliberate idioms. Each
offcarries a rationale comment ineslint.config.js:no-computed-property-existence-checkobj[dynamicKey]in boolean position, but our hits are value reads (!RULE_DEFAULTS[id],if (states[rule.id]),targetMask[i]), not existence checks.Object.hasOwnwould change meaning; no option to narrow.require-array-sort-compare.sort()/.toSorted()site sorts strings (rule ids, permission names) where default lexicographic order is correct.no-incorrect-query-selectorquerySelectorAll("#id")used deliberately to count copies (toHaveLength).prefer-awaitvoid promise.then/.catch()idiom (ourno-floating-promisesconvention) in void fns, React effects, event-listener/setTimeoutcallbacks, and classic-script top-level — none can cleanly takeawait.no-top-level-side-effectsregisterMethods({…}).Change
eslint.config.js: the five rules move fromwarn→off, grouped with a shared rationale block (warn duplicates removed so they don't override).Verification
bun run checkexit 0Refs #279