Skip to content

eslint: fix bracket notation in test infrastructure - #334773

Merged
Dmitriy Vasyura (dmitrivMS) merged 8 commits into
mainfrom
agents/fix-bracket-notation-test-infrastructure
Sep 7, 2026
Merged

eslint: fix bracket notation in test infrastructure#334773
Dmitriy Vasyura (dmitrivMS) merged 8 commits into
mainfrom
agents/fix-bracket-notation-test-infrastructure

Conversation

@dmitrivMS

Copy link
Copy Markdown
Collaborator

Summary

  • replace identifier-safe bracket notation with dot notation across the 18 files in the Test infrastructure exclusion group
  • remove the completed group from .eslint-allowed-bracket-notation-files

This is a mechanical cleanup for local/code-no-bracket-notation-for-identifiers with no intended behavior changes.

Validation

  • targeted ESLint across all 18 affected files
  • targeted hygiene across all 18 affected files
  • npm run typecheck-client
  • npm run transpile-client
  • compiled smoke tests and automation infrastructure
  • compiled sanity tests with their locked TypeScript version
  • typechecked the component-fixture Playwright project with its locked TypeScript version
  • syntax-checked the affected JavaScript runners with node --check
  • component-fixture Playwright: 4 passing resize-observer scenarios
  • focused core unit tests: 11 passing accessibility service tests, exercising the shared instantiation mock and Electron unit-test bootstrap

Stacking

Stacked on #334756 and intended to merge after that PR.

Enable code-no-bracket-notation-for-identifiers for JavaScript and TypeScript files while grandfathering the 509 files with existing violations in a CODEOWNERS-gated allowlist.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Organize the existing baseline by feature area so cleanup can be tracked and assigned without changing the excluded file set.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add RuleTester coverage for valid accesses, diagnostics, and autofix edge cases. Preserve escaped string-literal property names by checking their raw source before reporting.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace identifier-safe bracket notation across test infrastructure and remove the completed group from the temporary allowlist.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Base automatically changed from agents/enable-bracket-notation-rule to main September 6, 2026 15:02
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 6, 2026 20:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The changes are exhaustive, mechanical property-access substitutions with no identified semantic differences.

Review tier: Balanced
Findings: None

What changed in this PR

Replaces identifier-safe bracket notation with equivalent dot notation throughout test infrastructure and removes the completed ESLint allowlist group.

Changes:

  • Updates property access across 18 test files without behavioral changes.
  • Removes those files from the bracket-notation allowlist.
File Description
.eslint-allowed-bracket-notation-files Removes the completed test infrastructure group.
test/​unit/​electron/​renderer.js Updates util.inspect property access.
test/​unit/​electron/​preload.js Updates environment-variable access.
test/​unit/​electron/​index.js Updates development-mode access.
test/​smoke/​test/​index.js Updates CLI option access.
test/​smoke/​src/​areas/​preferences/​preferences.test.ts Updates element style attribute access.
test/​smoke/​src/​areas/​agentsWindow/​agentsWindow.test.ts Updates environment-variable access.
test/​sanity/​src/​main.ts Updates detection option access.
test/​sanity/​src/​context.ts Updates environment-variable access.
test/​monaco/​esm-check/​esm-check.js Updates Playwright browser access.
test/​componentFixtures/​playwright/​tests/​utils.ts Updates component explorer port access.
test/​componentFixtures/​playwright/​tests/​chatResizeObserver.spec.ts Updates fixture dataset access.
test/​automation/​src/​search.ts Updates title attribute access.
test/​automation/​src/​scm.ts Updates action title access.
test/​automation/​src/​electron.ts Updates test environment assignments.
src/​vs/​workbench/​test/​browser/​componentFixtures/​resizeObserver.fixture.ts Updates fixture dataset access.
src/​vs/​workbench/​test/​browser/​componentFixtures/​multiDiffEditorScroll.fixture.ts Updates serialized-state property access.
src/​vs/​workbench/​test/​browser/​componentFixtures/​chat/​chatWidget.fixture.ts Updates fixture dataset access.
src/​vs/​platform/​instantiation/​test/​common/​instantiationServiceMock.ts Updates mock metadata access.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@dmitrivMS
Dmitriy Vasyura (dmitrivMS) merged commit d4a4a26 into main Sep 7, 2026
53 of 54 checks passed
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) deleted the agents/fix-bracket-notation-test-infrastructure branch September 7, 2026 14:10
@vs-code-engineering vs-code-engineering Bot added this to the 1.138.0 milestone Sep 7, 2026
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.

3 participants