Skip to content

Bump @duckduckgo/eslint-config to v0.4.0 and fix new lint errors - #3222

Open
jonathanKingston wants to merge 2 commits into
mainfrom
claude/epic-brown-7qn3n8
Open

jonathanKingston wants to merge 2 commits into
mainfrom
claude/epic-brown-7qn3n8

Conversation

@jonathanKingston

Copy link
Copy Markdown
Contributor

Asana Task/Github Issue: none. This is a follow-up to dependabot PR #3155.

Description

This supersedes #3155. That PR bumps @duckduckgo/eslint-config from v0.2.1 to v0.4.0, but npm run lint then fails with 20 errors from newly enabled rules. This PR includes dependabot's commit unchanged and adds one commit that fixes the errors without changing behaviour:

  • no-useless-assignment: removes initial values that every path overwrites before reading (config-feature.js, broker-protection click.js, duckplayer util.js, selection-tools selection.js, tracker-protection.js, utils.js, .github/scripts/diff-directories.js).
  • let mock = null in the special-page entry points (history, new-tab, release-notes, special-error): the null is still needed. The $INTEGRATION: label is stripped outside integration builds, so these lines get a scoped disable that explains why. Onboarding has no label, so it now just returns mockTransport().
  • no-unassigned-vars: removes the never-assigned timer in the history useSearchCommitForRange hook.
  • special-error mock transport: removes a never-read outer errorId. The initialSetup case shadowed it.
  • n/no-callback-literal: renames or hoists NTP data callbacks so the rule stops treating their object argument as a node-style error.
  • preserve-caught-error: adds a scoped disable in special-pages/translations.mjs, because the tsconfig lib does not type the Error cause option.

Testing Steps

  • npm run build && npm run lint passes. This runs eslint, tsc, tsc-strict-core, surrogate checks and prettier.
  • npm run test-unit passes (1682 specs and 160 tests, 0 failures).
  • Integration tests: relying on CI.

Checklist

Please tick all that apply:

  • I have tested this change locally
  • I have tested this change locally in all supported browsers
  • This change will be visible to users
  • I have added automated tests that cover this change
  • I have ensured the change is gated by config
  • This change was covered by a ship review
  • This change was covered by a tech design
  • Any dependent config has been merged

🤖 Generated with Claude Code

https://claude.ai/code/session_018Jw5UTZZEfZbGeqRoVezPT

@jonathanKingston
jonathanKingston requested review from a team and daxtheduck as code owners November 23, 2026 08:56

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@github-actions github-actions Bot added the semver-patch Bug fix / internal — no release needed label Nov 23, 2026
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Build Branch

Branch pr-releases/claude/epic-brown-7qn3n8
Commit 1e2d8e5ac1
Updated November 25, 2026 at 9:01:32 AM UTC

Static preview entry points

QR codes (mobile preview)
Entry point QR code
Docs QR for docs preview
Static pages QR for static pages preview
Integration pages QR for integration pages preview

Integration commands

npm (Android / Extension):

npm i github:duckduckgo/content-scope-scripts#pr-releases/claude/epic-brown-7qn3n8

Swift Package Manager (Apple):

.package(url: "https://github.com/duckduckgo/content-scope-scripts.git", branch: "pr-releases/claude/epic-brown-7qn3n8")

git submodule (Windows):

git -C submodules/content-scope-scripts fetch origin pr-releases/claude/epic-brown-7qn3n8
git -C submodules/content-scope-scripts checkout origin/pr-releases/claude/epic-brown-7qn3n8
Pin to exact commit

npm (Android / Extension):

npm i github:duckduckgo/content-scope-scripts#1e2d8e5ac100ed9f26c0f264c407b7d13c425b87

Swift Package Manager (Apple):

.package(url: "https://github.com/duckduckgo/content-scope-scripts.git", revision: "1e2d8e5ac100ed9f26c0f264c407b7d13c425b87")

git submodule (Windows):

git -C submodules/content-scope-scripts fetch origin pr-releases/claude/epic-brown-7qn3n8
git -C submodules/content-scope-scripts checkout 1e2d8e5ac100ed9f26c0f264c407b7d13c425b87

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

[Beta] Generated file diff

Time updated: Wed, 25 Nov 2026 09:01:23 GMT

Android
    - android/adsjsContentScope.js
  • android/autofillImport.js
  • android/brokerProtection.js
  • android/contentScope.js
  • android/duckAiChatHistory.js
  • android/duckAiDataClearing.js
  • android/pageTranslation.js
  • android/pages/duckplayer/dist/index.js

File has changed

Apple
    - apple/brokerProtection.js
  • apple/contentScope.js
  • apple/contentScopeIsolated.js
  • apple/duckAiChatHistory.js
  • apple/duckAiDataClearing.js
  • apple/pageTranslation.js
  • apple/pages/duckplayer/dist/index.js
  • apple/pages/duckplayer/index.html
  • apple/pages/history/dist/index.js
  • apple/pages/new-tab/dist/index.js
  • apple/pages/onboarding/dist/index.js

File has changed

Chrome-mv3
    - chrome-mv3/inject.js

File has changed

Firefox
    - firefox/inject.js

File has changed

Integration
    - integration/contentScope.js
  • integration/pages/duckplayer/dist/index.js
  • integration/pages/history/dist/index.js
  • integration/pages/new-tab/dist/index.js
  • integration/pages/onboarding/dist/index.js
  • integration/pages/special-error/dist/index.js

File has changed

Windows
    - windows/contentScope.js
  • windows/pages/duckplayer/dist/index.js
  • windows/pages/history/dist/index.js
  • windows/pages/new-tab/dist/index.js
  • windows/pages/onboarding/dist/index.js

File has changed

dependabot Bot and others added 2 commits November 25, 2026 03:57
Bumps [@duckduckgo/eslint-config](https://github.com/duckduckgo/eslint-config) from v0.2.1 to v0.4.0.
- [Release notes](https://github.com/duckduckgo/eslint-config/releases)
- [Changelog](https://github.com/duckduckgo/eslint-config/blob/main/CHANGELOG.md)
- [Commits](duckduckgo/eslint-config@1a2a3f0...2d9b6a5)

---
updated-dependencies:
- dependency-name: "@duckduckgo/eslint-config"
  dependency-version: 2d9b6a5a3ae32caf9d0ab9b952979cc7c2ddf74b
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
The config enables no-useless-assignment, no-unassigned-vars,
n/no-callback-literal and preserve-caught-error. Fix what they report
without changing behaviour:

- Drop initial values that every path overwrites.
- Drop the never-assigned history search timer and a shadowed,
  never-read errorId in the special-error mock.
- Keep `let mock = null` where the $INTEGRATION label is stripped from
  other builds, with a scoped disable explaining why.
- Rename or hoist data callbacks so the rule doesn't read their
  argument as a node-style error.
- Scoped disable for preserve-caught-error in translations.mjs: the
  tsconfig lib has no Error cause option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Jw5UTZZEfZbGeqRoVezPT
@daxtheduck
daxtheduck force-pushed the claude/epic-brown-7qn3n8 branch from be4d5cf to 2fa2d76 Compare November 25, 2026 08:59

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-patch Bug fix / internal — no release needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant