Skip to content

eslint: fix bracket notation in workbench services - #334774

Merged
Dmitriy Vasyura (dmitrivMS) merged 11 commits into
mainfrom
agents/fix-bracket-notation-workbench-services
Sep 12, 2026
Merged

eslint: fix bracket notation in workbench services#334774
Dmitriy Vasyura (dmitrivMS) merged 11 commits into
mainfrom
agents/fix-bracket-notation-workbench-services

Conversation

@dmitrivMS

@dmitrivMS Dmitriy Vasyura (dmitrivMS) commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator
  • replace identifier-safe bracket notation across the 23 allowlisted Workbench UI and remaining service files
  • remove the cleaned group from .eslint-allowed-bracket-notation-files
  • replace private-member bracket access in default-account tests with a typed test subclass and protected production seams

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 access in workbench UI and service files, remove the cleaned group from the rule allowlist, and expose protected seams for strongly typed default-account tests.

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>
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Benjamin Christopher Simmonds (@benibenj)

Matched files:

  • src/vs/workbench/browser/parts/editor/editor.ts
  • src/vs/workbench/browser/parts/editor/editorGroupView.ts

TylerLeonhardt

Matched files:

  • src/vs/workbench/contrib/localization/electron-browser/localization.contribution.ts

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

🟡 Changes recommended

The color description access is incorrect, and the stated default-account allowlist cleanup remains incomplete.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 Medium severity · 1 Low severity

New issues introduced by this change (2)
Severity Finding
Medium severity src/​vs/​workbench/​contrib/​themes/​test/​node/​colorRegistry.releaseTest.ts — This reads description from colorId, which is the string from color.id, so every missing…
Low severity .eslint-allowed-bracket-notation-files — The stated default-account cleanup is not present: this file remains allowlisted, the test still…
What changed in this PR

Modernizes identifier-safe property access across Workbench UI, services, and tests for ESLint compliance.

Changes:

  • Replaces static bracket notation with dot notation.
  • Updates related configuration, parsing, telemetry, and test code.
  • Shrinks the ESLint allowlist, though the stated default-account cleanup is incomplete.
File Summary
src/​vs/​workbench/​services/​themes/​common/​colorThemeData.ts Updates theme metadata access.
src/​vs/​workbench/​services/​textfile/​test/​node/​encoding/​encoding.integrationTest.ts Updates encoding environment access.
src/​vs/​workbench/​services/​extensionRecommendations/​common/​workspaceExtensionsConfig.ts Updates parsed configuration access.
src/​vs/​workbench/​services/​actions/​common/​menusExtensionPoint.ts Updates command-palette access.
src/​vs/​workbench/​contrib/​welcomeWalkthrough/​browser/​walkThroughInput.ts Updates telemetry target access.
src/​vs/​workbench/​contrib/​webview/​browser/​pre/​service-worker.js Updates ETag header access.
src/​vs/​workbench/​contrib/​update/​common/​updateInfoParser.ts Updates named regex-group access.
src/​vs/​workbench/​contrib/​typeHierarchy/​browser/​typeHierarchyPeek.ts Updates hierarchy state access.
src/​vs/​workbench/​contrib/​themes/​test/​node/​colorRegistry.releaseTest.ts Updates color metadata access, but incorrectly reads descriptions from the color ID string.
src/​vs/​workbench/​contrib/​themes/​browser/​themes.contribution.ts Updates quick-pick type access.
src/​vs/​workbench/​contrib/​tags/​electron-browser/​workspaceTagsService.ts Updates package metadata and tag access.
src/​vs/​workbench/​contrib/​tags/​electron-browser/​workspaceTags.ts Updates workspace tag assignments.
src/​vs/​workbench/​contrib/​search/​browser/​replaceService.ts Updates parsed URI access.
src/​vs/​workbench/​contrib/​policyExport/​test/​node/​policyExport.integrationTest.ts Updates CI environment access.
src/​vs/​workbench/​contrib/​policyExport/​electron-browser/​policyExport.contribution.ts Updates product and environment access.
src/​vs/​workbench/​contrib/​localization/​electron-browser/​localization.contribution.ts Updates translation access.
src/​vs/​workbench/​contrib/​issue/​electron-browser/​nativeGitHubUploadService.ts Updates authorization header access.
src/​vs/​workbench/​contrib/​callHierarchy/​browser/​callHierarchyPeek.ts Updates hierarchy state access.
src/​vs/​workbench/​contrib/​bulkEdit/​browser/​preview/​bulkEditPane.ts Updates dataset state access.
src/​vs/​workbench/​contrib/​accessibility/​browser/​accessibilityConfiguration.ts Updates migrated delay access.
src/​vs/​workbench/​browser/​parts/​editor/​editorGroupView.ts Updates telemetry descriptor access.
src/​vs/​workbench/​browser/​parts/​editor/​editor.ts Updates editor option access.
.eslint-allowed-bracket-notation-files Removes migrated entries, but retains the claimed default-account entry.

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

Comment thread src/vs/workbench/contrib/themes/test/node/colorRegistry.releaseTest.ts Outdated
Comment thread .eslint-allowed-bracket-notation-files
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve the deferred default-account allowlist entry and restore process.env bracket access now exempted by the rule.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dmitrivMS Dmitriy Vasyura (dmitrivMS) added vscode-build VS Code build process issues engineering VS Code - Build / issue tracking / etc. labels Sep 12, 2026
@dmitrivMS Dmitriy Vasyura (dmitrivMS) added this to the 1.139.0 milestone Sep 12, 2026
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) merged commit b0240f6 into main Sep 12, 2026
33 checks passed
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) deleted the agents/fix-bracket-notation-workbench-services branch September 12, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engineering VS Code - Build / issue tracking / etc. vscode-build VS Code build process issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants