Skip to content

build(deps-dev): bump @duckduckgo/eslint-config to v0.4.0 and fix new lint errors - #3263

Open
jonathanKingston wants to merge 1 commit into
mainfrom
claude/bold-thompson-167uk9-eslint-config
Open

jonathanKingston wants to merge 1 commit into
mainfrom
claude/bold-thompson-167uk9-eslint-config

Conversation

@jonathanKingston

Copy link
Copy Markdown
Contributor

Asana Task/Github Issue: Supersedes #3155

Description

Dependabot's bump of @duckduckgo/eslint-config from v0.2.1 to v0.4.0 fails unit (ubuntu-latest) with 20 lint errors. v0.3.0 moves the shared config to ESLint 10 and drops eslint-plugin-import, which enables no-useless-assignment, no-unassigned-vars, preserve-caught-error and n/no-callback-literal. This PR applies the same bump on current main and fixes what the new rules flag. No behaviour changes intended.

  • Drop initial values that every code path overwrites (config-feature.js, click.js, duckplayer/util.js, selection.js, tracker-protection.js, utils.js, diff-directories.js).
  • Keep let mock = null in the special-page entry points: the $INTEGRATION: statement after it is removed from non-integration builds by esbuild dropLabels (special-pages/opts.mjs), so the initial value is what those builds return. Each gets an inline disable saying so. Onboarding has no label, so it now returns mockTransport() directly.
  • Remove an unused timer in useSearchCommitForRange and a dead errorId lookup in the special-error mock transport (the initialSetup case already reads it).
  • Turn off n/no-callback-literal: our cb arguments are subscription listeners that take data objects, not Node-style error-first callbacks.
  • Disable preserve-caught-error on one throw in translations.mjs: the tsconfig lib has no ErrorOptions, and the message already includes the original error.

The lockfile change is mostly removals (eslint-plugin-import and its es-abstract dependency chain).

Points for the reviewer: whether turning off n/no-callback-literal repo-wide is acceptable, and whether to go straight to v0.4.1 (adds an npm cooldown to the config repo itself).

Testing Steps

  • npm run build && npm run lint && npm run test-unit (all pass locally)
  • CI integration tests cover the special-page entry points that changed.

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_018Jw5UTfNU9VJhBhrJXHaKN

… lint errors

v0.3.0 moves the shared config to ESLint 10 and drops eslint-plugin-import,
which turns on no-useless-assignment, no-unassigned-vars,
preserve-caught-error and n/no-callback-literal. Fix what they flag:

- Drop initial values that every path overwrites.
- Keep `let mock = null` where the following `$INTEGRATION:` statement is
  removed from non-integration builds by esbuild dropLabels, with an inline
  disable explaining why; onboarding has no label, so return directly.
- Remove an unused timer in useSearchCommitForRange and a dead errorId
  lookup in the special-error mock transport.
- Turn off n/no-callback-literal: our `cb` arguments are subscription
  listeners, not Node-style error-first callbacks.
- Disable preserve-caught-error on one throw, as the tsconfig lib has no
  ErrorOptions and the message already includes the cause.

Supersedes #3155.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Jw5UTfNU9VJhBhrJXHaKN
@jonathanKingston
jonathanKingston requested review from a team and daxtheduck as code owners November 28, 2026 08:55

@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

Copy link
Copy Markdown
Contributor

[Beta] Generated file diff

Time updated: Sat, 28 Nov 2026 08:56:38 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/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/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/onboarding/dist/index.js

File has changed

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

Copy link
Copy Markdown
Contributor

Build Branch

Branch pr-releases/claude/bold-thompson-167uk9-eslint-config
Commit cfad6736ff
Updated November 28, 2026 at 8:57:10 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/bold-thompson-167uk9-eslint-config

Swift Package Manager (Apple):

.package(url: "https://github.com/duckduckgo/content-scope-scripts.git", branch: "pr-releases/claude/bold-thompson-167uk9-eslint-config")

git submodule (Windows):

git -C submodules/content-scope-scripts fetch origin pr-releases/claude/bold-thompson-167uk9-eslint-config
git -C submodules/content-scope-scripts checkout origin/pr-releases/claude/bold-thompson-167uk9-eslint-config
Pin to exact commit

npm (Android / Extension):

npm i github:duckduckgo/content-scope-scripts#cfad6736ff92ad1f895d5c0eb6f78a647fd3daff

Swift Package Manager (Apple):

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

git submodule (Windows):

git -C submodules/content-scope-scripts fetch origin pr-releases/claude/bold-thompson-167uk9-eslint-config
git -C submodules/content-scope-scripts checkout cfad6736ff92ad1f895d5c0eb6f78a647fd3daff

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