Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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
mainfrom
deps/unicorn-70
Open

Chore(deps-dev): Bump eslint-plugin-unicorn from 68 to 70 in /extension and /demo-site#326
twschiller wants to merge 1 commit into
mainfrom
deps/unicorn-70

Conversation

@twschiller

Copy link
Copy Markdown
Contributor

Summary

Bumps eslint-plugin-unicorn from 68 to 70 in both /extension and /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 recommended error with no config overrides — advancing the ratchet effort in #279.

Changes

  • Bump eslint-plugin-unicorn 68 → 70 (/extension, /demo-site) + lockfiles.
  • prefer-dom-node-replace-children — autofixed the el.innerHTML = "" DOM-reset idiom in test beforeEach teardown (~150 sites) to el.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) in rule-engine.ts and schema-trust-sanitize.ts.
  • prefer-toggle-attribute — rewrote a checked setAttribute("", "")/removeAttribute if/else pair in page-tree.ts as toggleAttribute("checked", element.checked).
  • no-unnecessary-array-flat-map — rewrote a flatMap(x => cond ? [v] : []) filter-map fusion in page-world-hooks.ts as .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 build in /extension
  • bun run check + bun run build in /demo-site
  • Manually loaded the extension and exercised the affected rule(s) — not needed; dev-dependency bump with no runtime behavior change

CLA

  • I have signed the PixieBrix Contributor License Agreement (carries over to future PRs).

…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]>
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-browser-shield-demo-site Ready Ready Preview, Comment Jul 10, 2026 2:01am

Request Review

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.

1 participant