Skip to content

eslint: fix bracket notation in app environment - #334768

Open
Dmitriy Vasyura (dmitrivMS) wants to merge 6 commits into
mainfrom
agents/fix-bracket-notation-app-environment
Open

eslint: fix bracket notation in app environment#334768
Dmitriy Vasyura (dmitrivMS) wants to merge 6 commits into
mainfrom
agents/fix-bracket-notation-app-environment

Conversation

@dmitrivMS

Copy link
Copy Markdown
Collaborator

Summary

  • replace bracket notation with dot notation for identifier-like properties in the Application bootstrap, server, and environment cleanup group
  • remove all 41 cleaned paths in that group from .eslint-allowed-bracket-notation-files

This PR is intentionally stacked on #334756, which enables local/code-no-bracket-notation-for-identifiers. Its base should be changed to main after #334756 merges.

Validation

  • targeted ESLint with --max-warnings=0 across all 41 cleaned files
  • npm run typecheck-client
  • npm run transpile-client
  • focused unit tests for bootstrapESM.test.ts, environmentMainService.test.ts, and userDataPath.test.ts — 10 tests passed
  • targeted hygiene across all 42 changed files
  • git diff --check

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>
Use dot notation for identifier-like properties across application bootstrap, server, and environment code, then remove the 41 cleaned files from the baseline 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 21:35

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 mechanical notation changes preserve behavior and consistently remove the corresponding lint exemptions.

Review tier: Balanced
Findings: None

What changed in this PR

Updates application bootstrap, server, and environment code for the new bracket-notation ESLint rule.

Changes:

  • Replaces identifier-like bracket notation with dot notation.
  • Updates corresponding tests.
  • Removes 41 compliant files from the ESLint allowlist.
File Description
.eslint-allowed-bracket-notation-files Removes cleaned files from exemptions.
src/​bootstrap-cli.ts Updates environment access.
src/​bootstrap-esm.ts Updates environment and version access.
src/​bootstrap-fork.ts Updates process property access.
src/​bootstrap-meta.ts Updates metadata and environment access.
src/​bootstrap-node.ts Updates bootstrap environment access.
src/​bootstrap-server.ts Updates environment cleanup.
src/​cli.ts Updates CLI environment setup.
src/​main.ts Updates startup argument and environment access.
src/​server-cli.ts Updates server CLI environment setup.
src/​server-main.ts Updates server arguments and environment access.
src/​vs/​code/​electron-browser/​workbench/​workbench.ts Updates development-mode checks.
src/​vs/​code/​electron-main/​app.ts Updates arguments, environment, and GPU status access.
src/​vs/​code/​electron-main/​main.ts Updates startup arguments and environment access.
src/​vs/​code/​node/​cli.ts Updates CLI options and environment access.
src/​vs/​code/​node/​cliProcessMain.ts Updates parsed CLI argument access.
src/​vs/​code/​test/​node/​bootstrapESM.test.ts Updates bootstrap test property access.
src/​vs/​platform/​diagnostics/​node/​diagnosticsService.ts Updates JSON and environment access.
src/​vs/​platform/​dialogs/​electron-browser/​dialog.ts Updates runtime version access.
src/​vs/​platform/​environment/​common/​environmentService.ts Updates environment and argument access.
src/​vs/​platform/​environment/​electron-main/​environmentMainService.ts Updates portable and cache environment access.
src/​vs/​platform/​environment/​node/​argvHelper.ts Updates launch environment checks.
src/​vs/​platform/​environment/​node/​userDataPath.ts Updates user-data environment access.
src/​vs/​platform/​environment/​test/​electron-main/​environmentMainService.test.ts Updates environment test access.
src/​vs/​platform/​environment/​test/​node/​userDataPath.test.ts Updates user-data test access.
src/​vs/​platform/​launch/​electron-main/​launchMainService.ts Updates agents argument access.
src/​vs/​platform/​native/​electron-main/​auth.ts Updates proxy environment access.
src/​vs/​platform/​product/​common/​product.ts Updates development-mode access.
src/​vs/​platform/​shell/​node/​shellEnv.ts Updates shell environment access.
src/​vs/​platform/​utilityProcess/​electron-main/​utilityProcess.ts Updates child-process environment setup.
src/​vs/​platform/​windows/​electron-main/​windowImpl.ts Updates proxy and crashpad environment access.
src/​vs/​platform/​windows/​electron-main/​windowsMainService.ts Updates terminal environment access.
src/​vs/​server/​node/​remoteAgentEnvironmentImpl.ts Updates glibc override access.
src/​vs/​server/​node/​remoteExtensionHostAgentCli.ts Updates extension CLI arguments.
src/​vs/​server/​node/​remoteExtensionHostAgentServer.ts Updates HTTP header access.
src/​vs/​server/​node/​remoteExtensionsScanner.ts Updates force argument access.
src/​vs/​server/​node/​remoteTerminalChannel.ts Updates resolver property access.
src/​vs/​server/​node/​server.cli.ts Updates server CLI properties.
src/​vs/​server/​node/​server.cliAgent.ts Updates agent option access.
src/​vs/​server/​node/​server.main.ts Updates server environment access.
src/​vs/​server/​node/​serverEnvironmentService.ts Updates option descriptor access.
src/​vs/​server/​node/​webClientServer.ts Updates headers and workbench values.

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

@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

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

Robo (@deepak1556)

Matched files:

  • src/vs/code/electron-browser/workbench/workbench.ts
  • src/vs/code/electron-main/app.ts
  • src/vs/code/electron-main/main.ts
  • src/vs/code/node/cli.ts
  • src/vs/code/node/cliProcessMain.ts
  • src/vs/code/test/node/bootstrapESM.test.ts

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.

2 participants