eslint: fix bracket notation in workbench services - #334774
Open
Dmitriy Vasyura (dmitrivMS) wants to merge 8 commits into
Open
eslint: fix bracket notation in workbench services#334774Dmitriy Vasyura (dmitrivMS) wants to merge 8 commits into
Dmitriy Vasyura (dmitrivMS) wants to merge 8 commits into
Conversation
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>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Dmitriy Vasyura (dmitrivMS)
marked this pull request as ready for review
September 6, 2026 21:50
Dmitriy Vasyura (dmitrivMS)
requested a review
from Alexandru Dima (alexdima)
as a code owner
September 6, 2026 21:50
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
September 6, 2026 21:50
Copilot started reviewing on behalf of
Dmitriy Vasyura (dmitrivMS)
September 6, 2026 21:50
View session
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Benjamin Christopher Simmonds (@benibenj)Matched files:
TylerLeonhardtMatched files:
|
Contributor
There was a problem hiding this comment.
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
New issues introduced by this change (2)
| Severity | Finding |
|---|---|
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… |
|
.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.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.


Summary
.eslint-allowed-bracket-notation-filesStacked on #334756.
Validation
npm run typecheck-clientnpm run transpile-clientnode --check src\vs\workbench\contrib\webview\browser\pre\service-worker.jsKnown baseline drift
The Color Registry release test reports 1 passing and 2 failing checks because the generated known-variable list and
theme-color.mdare out of sync with currently registered colors and sizes. This PR does not include those unrelated generated/documentation updates.