Chore(deps-dev): Bump eslint-plugin-unicorn from 68 to 70 in /extension and /demo-site#326
Open
twschiller wants to merge 1 commit into
Open
Chore(deps-dev): Bump eslint-plugin-unicorn from 68 to 70 in /extension and /demo-site#326twschiller wants to merge 1 commit into
twschiller wants to merge 1 commit into
Conversation
…on and /demo-site Supersedes Dependabot PRs #324 and #321. unicorn 70 turns on four new recommended rules; all were resolved cleanly in-tree, so they stay at their recommended `error` (no config overrides): - prefer-dom-node-replace-children: autofixed the `el.innerHTML = ""` DOM-reset idiom in test beforeEach teardown (~150 sites) to `el.replaceChildren()`. - prefer-simplified-conditions: autofixed two De Morgan negations (`!(a && !b)` -> `!a || b`) in rule-engine and schema-trust-sanitize. - prefer-toggle-attribute: rewrote a `checked` setAttribute/removeAttribute if/else pair as `toggleAttribute("checked", element.checked)`. - no-unnecessary-array-flat-map: rewrote a `flatMap(x => cond ? [v] : [])` filter-map fusion as `.map().filter(x => x !== undefined).map()`; the TS 6 inferred type predicate narrows without a non-null assertion. Advances the eslint-plugin-unicorn ratchet (#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 Jul 10, 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
Bumps
eslint-plugin-unicornfrom 68 to 70 in both/extensionand/demo-site, superseding the two Dependabot PRs (#324, #321) which failed CI on the new rules. unicorn 70 turns on four new recommended rules; all were resolvable cleanly in-tree, so they stay at their recommendederrorwith no config overrides — advancing the ratchet effort in #279.Changes
eslint-plugin-unicorn68 → 70 (/extension,/demo-site) + lockfiles.prefer-dom-node-replace-children— autofixed theel.innerHTML = ""DOM-reset idiom in testbeforeEachteardown (~150 sites) toel.replaceChildren(). Test-owned jsdom nodes only; no production/framework-owned nodes touched.prefer-simplified-conditions— autofixed two equivalent De Morgan negations (!(a && !b)→!a || b) inrule-engine.tsandschema-trust-sanitize.ts.prefer-toggle-attribute— rewrote acheckedsetAttribute("", "")/removeAttributeif/else pair inpage-tree.tsastoggleAttribute("checked", element.checked).no-unnecessary-array-flat-map— rewrote aflatMap(x => cond ? [v] : [])filter-map fusion inpage-world-hooks.tsas.map().filter(x => x !== undefined).map(); the TS 6 inferred type predicate narrows without a non-null assertion.eslint.config.js— documented the v70 batch in the same style as the v66/v68 notes.All production-code changes are behavior-preserving refactors.
Testing
bun run preflight(build-site-data, build-injection-patterns, check, typecheck, knip, test:coverage — 2059 tests pass) +bun run buildin/extensionbun run check+bun run buildin/demo-siteCLA