Chore: remove the dead dev/src/browser ignore entries from eslint.config.js and .prettierignore - #454
Open
AmaadMartin wants to merge 1 commit into
Open
Chore: remove the dead dev/src/browser ignore entries from eslint.config.js and .prettierignore#454AmaadMartin wants to merge 1 commit into
AmaadMartin wants to merge 1 commit into
Conversation
The vendored ADK Web bundle lived at dev/src/browser/ until google#427 switched it to a build-time download into dev/dist/browser. That PR deleted the vendored files but left both ignore entries behind, so eslint.config.js and .prettierignore have pointed at a nonexistent path ever since. Remove them. No replacement pattern is added: "**/dist/**" (ESLint) and dist/ (Prettier) already cover the downloaded assets, and dist/ is gitignored. The pre-commit hook is bypassed for this commit only: lint-staged runs 'prettier --write' over **/*.{js,ts}, and eslint.config.js is not Prettier-formatted on main, so the hook would reflow the whole file and bury a two-line deletion in unrelated churn. 'eslint eslint.config.js' and 'npx secretlint "**/*"' were both run manually and are clean.
This was referenced Aug 2, 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.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
Closes: #issue_number
Related: #issue_number
Problem:
eslint.config.jsand.prettierignoreboth carve outdev/src/browser, a path that no longer exists anywhere in the repository.The vendored ADK Web bundle lived at
dev/src/browser/(minifiedchunk-*.js,main-*.js,styles-*.css,index.html,assets/) until google#427 ("feat: download ADK Web assets dynamically and serve from shared folder", commitb8ee5d81) switched it to a build-time download. That PR deleted the vendored files but left both ignore entries behind, so the two configs have referenced a nonexistent path ever since.A stale carve-out is worse than no carve-out: every future reader auditing "what does tooling skip?" has to resolve the path and discover it is a ghost. That cost was paid recently while auditing which files the wildcard coverage
includeglobdev/src/**/*.ts(vitest.config.ts:126) sweeps into the coverage denominator.Solution: Delete the two dead entries. Exactly two lines change:
eslint.config.js:14—ignores: ["**/dist/**", "dev/src/browser/**"]→ignores: ["**/dist/**"].prettierignore:3—dev/src/browserdeletedNo replacement ignore was added, on purpose. The browser assets are now downloaded by
ensureBrowserAssets()(dev/build.js:89-132) intodev/dist/browser(dev/build.js:90), which is already covered by the surviving"**/dist/**"(ESLint) anddist/(Prettier, gitignore syntax, matches at any depth) entries, and is untracked via.gitignore:1. Addingdev/dist/browseror**/browser/**would recreate exactly the redundancy this change removes.scripts/check_license.shwas deliberately left alone, including itsbrowserprune (scripts/check_license.sh:7-8). Whether that prune is itself redundant is a separate question and is out of scope here.Collision check. Before writing anything I listed all 300 open PRs on the fork and diffed the six that touch
eslint.config.js(#435, #426, #422, #346, #332, #325). None of them removes the dead entry — five of them re-emit the same line with single quotes as a side effect of the repo'slint-stagedPrettier hook (- ignores: ["**/dist/**", "dev/src/browser/**"]/+ ignores: ['**/dist/**', 'dev/src/browser/**']), and #332 does not touch that line at all. No PR overlaps.prettierignore. This PR therefore branches frommainrather than stacking; the textual overlap on line 14 is a one-line conflict resolvable in either merge order.Pre-commit hook bypassed for this one commit, disclosed deliberately.
lint-stagedrunsprettier --writeover**/*.{js,ts}, andeslint.config.jsis not Prettier-formatted onmain(npx prettier --check eslint.config.jswarns on it today — the rootformat:checkscript only globs**/*.ts, so CI has never checked it). Committing through the hook would reflow the whole file — single quotes, reordered imports, trailing commas, ~17 lines — and bury a two-line deletion in unrelated churn. The hook's actual checks were run by hand instead and are clean:npx secretlint "**/*"(exit 0) andeslint eslint.config.js(exit 0). The hook path itself is verified working, see the E2E section below.Testing Plan
Please describe the tests that you ran to verify your changes. This is required for all PRs that are not small documentation or typo fixes.
Unit Tests:
[x] I have added or updated unit tests for my change. — No tests added, intentionally. This change adds zero lines of executable code; it deletes one array element from a lint config and one line from an ignore file, so there is no new code to cover. A meta-test walking the ignore files and asserting each pattern resolves to a real path would immediately fail on the
distpatterns, which legitimately point at generated directories that do not exist in a clean checkout. Nothing in the repo reads either file programmatically —grep -rn "prettierignore\|eslint\.config" --include='*.{ts,js,json,yaml,yml}'(excludingnode_modules,dist, the lockfile) returns a single self-reference insideeslint.config.jsitself — so no test can observe this change.[x] All unit tests pass locally. — The full suite was not run: it is unaffected by construction (
vitest.config.tsnever reads either file, and no.tsfile is added or removed, so the coverage denominator and every threshold invitest.config.ts:121-137are untouched). CI runsnpm run test:coverageon this PR and gates it.Direct before/after evidence that no file changed lint/format status (
npm installcompleted first):npx eslint "**/*.ts" -f json— files reportedfilePathcompare)truefilePath/errorCount/warningCount)truenpm run format:checkAll matched files use Prettier code style!(exit 0)diff(exit 0)Proof the removed entries were live config, not a no-op edit — the same probe before and after the change:
isPathIgnoredbefore → after--file-infobefore → afterdev/src/browser/main.js(the ghost path)true→falsetrue→falsedev/dist/browser/main.js(real build output)true→truetrue→trueThe first row is the mutation-style proof: both tools really did have a rule for that path and no longer do. It is behaviourally inert only because no such path exists —
find . -type d -name browser -not -path './node_modules/*'returns nothing, andfind dev/src -type dlists onlycli,cli/deploy,conformance,integration,server,utils. The second row is the safety property: the survivingdistpatterns still cover the downloaded assets.Dead-reference check —
grep -rn "dev/src/browser" . --exclude-dir=node_modules --exclude-dir=.gitnow returns no matches (exit 1).Full CI gate run locally, in the order
.github/workflows/validation.yamlruns it:npm installnpx secretlint "**/*"npm run buildadk-web-browser.zipdownloaded and extracted todev/dist/browsernpm run test:coveragenpm run lintnpm run format:checknpm run docs:checknpm run ts:checkis not a CI step and is red onmainfor an unrelated pre-existing reason (Cannot find module '@google/adk'incore/test/**when workspacedistoutput is absent). It is unaffected by a lint-config edit.Build output still lands and is still ignored (after a real
npm run build, so these are the actual downloaded files, not hypotheticals):ls dev/dist/browser→adk_favicon.svg,assets/,chunk-27SWUPRL.js, …index.htmlgit status --porcelain dev/dist→ empty (still gitignored)ESLint.isPathIgnored('dev/dist/browser/chunk-27SWUPRL.js')→true; same forindex.htmlnpx prettier --file-info dev/dist/browser/index.html→"ignored": truenpx eslint "**/*.ts"still reports 531 files withdist/populated, i.e."**/dist/**"is still excluding every generated.d.tsManual End-to-End (E2E) Tests:
Please provide instructions on how to manually test your changes, including any necessary setup or configuration.
lint-stagedpre-commit path still works. On a scratch branch, with the modified configs in place, stage and commit an edit to adev/src/**/*.tsfile:husky→lint-stagedransecretlint,eslint --fixandprettier --writeover the staged file and the commit succeeded. A first attempt that appended only a trailing newline was correctly rejected bylint-stagedwith "prevented an empty git commit" afterprettier --writenormalised it away — i.e. the formatter is genuinely executing ondev/srcTypeScript. Scratch branch discarded.**/dist/**anddist/(generated build output,.gitignore:1) andnode_modules/..prettierignoreis now exactlydist/\nnode_modules/\n. No entry points at a nonexistent source path.CI result on this PR: all checks green —
run-tests (ubuntu-latest),run-tests (macos-latest),run-tests (windows-latest),run-tests,check-license,auto-assign. The firstwindows-latestattempt failed intests/integration/a2a/basic/a2a_agent_test.tswithError: CLI exited prematurely with code 1(tests/integration/test_case_utils.ts:341), a spawned-CLI integration flake that also fails on this fork'smain(run 30669370416, same job,tests/integration/adk_web/webui_test.ts, same "1 failed | 223 passed | 20 skipped" shape). It is unrelated to this diff — nothing in the test suite reads either config file — and the job passed on re-run.Checklist
[x] I have read the CONTRIBUTING.md document.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas. — n/a, two deletions.
[x] I have added tests that prove my fix is effective or that my feature works. — no tests are possible or warranted here; the before/after ignore probe above is the equivalent evidence.
[x] New and existing unit tests pass locally with my changes.