Skip to content

Commit b0240f6

Browse files
dmitrivMSCopilot
andauthored
eslint: fix bracket notation in workbench services (#334774)
* eslint: enable no bracket notation rule 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> * eslint: update bracket allowlist owners Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * eslint: group bracket notation exclusions 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> * eslint: test no bracket notation rule 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> * eslint: fix bracket notation in workbench services 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>
1 parent 3addbda commit b0240f6

21 files changed

Lines changed: 91 additions & 113 deletions

File tree

.eslint-allowed-bracket-notation-files

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -508,27 +508,5 @@ extensions/git/src/ipc/ipcClient.ts
508508
extensions/git/src/ipc/ipcServer.ts
509509
extensions/git/src/util.ts
510510

511-
# Workbench UI and remaining services (23 files)
512-
src/vs/workbench/browser/parts/editor/editor.ts
513-
src/vs/workbench/browser/parts/editor/editorGroupView.ts
514-
src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.ts
515-
src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane.ts
516-
src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.ts
517-
src/vs/workbench/contrib/issue/electron-browser/nativeGitHubUploadService.ts
518-
src/vs/workbench/contrib/localization/electron-browser/localization.contribution.ts
519-
src/vs/workbench/contrib/policyExport/electron-browser/policyExport.contribution.ts
520-
src/vs/workbench/contrib/policyExport/test/node/policyExport.integrationTest.ts
521-
src/vs/workbench/contrib/search/browser/replaceService.ts
522-
src/vs/workbench/contrib/tags/electron-browser/workspaceTags.ts
523-
src/vs/workbench/contrib/tags/electron-browser/workspaceTagsService.ts
524-
src/vs/workbench/contrib/themes/browser/themes.contribution.ts
525-
src/vs/workbench/contrib/themes/test/node/colorRegistry.releaseTest.ts
526-
src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.ts
527-
src/vs/workbench/contrib/update/common/updateInfoParser.ts
528-
src/vs/workbench/contrib/webview/browser/pre/service-worker.js
529-
src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughInput.ts
511+
# Default account service tests (1 file)
530512
src/vs/workbench/services/accounts/test/browser/defaultAccount.test.ts
531-
src/vs/workbench/services/actions/common/menusExtensionPoint.ts
532-
src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.ts
533-
src/vs/workbench/services/textfile/test/node/encoding/encoding.integrationTest.ts
534-
src/vs/workbench/services/themes/common/colorThemeData.ts

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

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -125,61 +125,61 @@ function validateEditorPartOptions(options: IEditorPartOptions): IEditorPartOpti
125125
}
126126

127127
return verifyObject<IEditorPartOptions>({
128-
'wrapTabs': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['wrapTabs']),
129-
'scrollToSwitchTabs': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['scrollToSwitchTabs']),
130-
'highlightModifiedTabs': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['highlightModifiedTabs']),
131-
'tabActionReserveSpace': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['tabActionReserveSpace']),
132-
'tabActionCloseVisibility': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['tabActionCloseVisibility']),
133-
'tabActionUnpinVisibility': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['tabActionUnpinVisibility']),
134-
'showTabIndex': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['showTabIndex']),
135-
'alwaysShowEditorActions': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['alwaysShowEditorActions']),
136-
'pinnedTabsOnSeparateRow': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['pinnedTabsOnSeparateRow']),
137-
'focusRecentEditorAfterClose': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['focusRecentEditorAfterClose']),
138-
'showIcons': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['showIcons']),
139-
'enablePreview': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['enablePreview']),
140-
'enablePreviewFromQuickOpen': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['enablePreviewFromQuickOpen']),
141-
'enablePreviewFromCodeNavigation': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['enablePreviewFromCodeNavigation']),
142-
'closeOnFileDelete': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['closeOnFileDelete']),
143-
'closeEmptyGroups': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['closeEmptyGroups']),
144-
'revealIfOpen': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['revealIfOpen']),
145-
'swipeToNavigate': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['swipeToNavigate']),
146-
'mouseBackForwardToNavigate': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['mouseBackForwardToNavigate']),
147-
'restoreViewState': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['restoreViewState']),
148-
'splitOnDragAndDrop': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['splitOnDragAndDrop']),
149-
'allowDropIntoGroup': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['allowDropIntoGroup']),
150-
'dragToOpenWindow': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['dragToOpenWindow']),
151-
'centeredLayoutFixedWidth': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['centeredLayoutFixedWidth']),
152-
'hasIcons': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['hasIcons']),
153-
154-
'tabSizingFixedMinWidth': new NumberVerifier(DEFAULT_EDITOR_PART_OPTIONS['tabSizingFixedMinWidth']),
155-
'tabSizingFixedMaxWidth': new NumberVerifier(DEFAULT_EDITOR_PART_OPTIONS['tabSizingFixedMaxWidth']),
156-
157-
'showTabs': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS['showTabs'], ['multiple', 'single', 'none']),
158-
'tabActionLocation': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS['tabActionLocation'], ['left', 'right']),
159-
'tabSizing': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS['tabSizing'], ['fit', 'shrink', 'fixed']),
160-
'pinnedTabSizing': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS['pinnedTabSizing'], ['normal', 'compact', 'shrink']),
161-
'tabHeight': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS['tabHeight'], ['default', 'compact']),
162-
'preventPinnedEditorClose': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS['preventPinnedEditorClose'], ['keyboardAndMouse', 'keyboard', 'mouse', 'never']),
163-
'titleScrollbarSizing': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS['titleScrollbarSizing'], ['default', 'large']),
164-
'titleScrollbarVisibility': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS['titleScrollbarVisibility'], ['auto', 'visible', 'hidden']),
165-
'openPositioning': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS['openPositioning'], ['left', 'right', 'first', 'last']),
166-
'openSideBySideDirection': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS['openSideBySideDirection'], ['right', 'down']),
167-
'labelFormat': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS['labelFormat'], ['default', 'short', 'medium', 'long']),
168-
'splitInGroupLayout': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS['splitInGroupLayout'], ['vertical', 'horizontal']),
169-
'splitSizing': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS['splitSizing'], ['distribute', 'split', 'auto']),
170-
'doubleClickTabToToggleEditorGroupSizes': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS['doubleClickTabToToggleEditorGroupSizes'], ['maximize', 'expand', 'off']),
171-
'editorActionsLocation': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS['editorActionsLocation'], ['default', 'titleBar', 'hidden']),
172-
'autoLockGroups': new SetVerifier<string>(DEFAULT_EDITOR_PART_OPTIONS['autoLockGroups']),
173-
174-
'limit': new ObjectVerifier<IEditorPartLimitOptions>(DEFAULT_EDITOR_PART_OPTIONS['limit'], {
175-
'enabled': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['limit']['enabled']),
176-
'value': new NumberVerifier(DEFAULT_EDITOR_PART_OPTIONS['limit']['value']),
177-
'perEditorGroup': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['limit']['perEditorGroup']),
178-
'excludeDirty': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['limit']['excludeDirty'])
128+
'wrapTabs': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.wrapTabs),
129+
'scrollToSwitchTabs': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.scrollToSwitchTabs),
130+
'highlightModifiedTabs': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.highlightModifiedTabs),
131+
'tabActionReserveSpace': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.tabActionReserveSpace),
132+
'tabActionCloseVisibility': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.tabActionCloseVisibility),
133+
'tabActionUnpinVisibility': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.tabActionUnpinVisibility),
134+
'showTabIndex': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.showTabIndex),
135+
'alwaysShowEditorActions': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.alwaysShowEditorActions),
136+
'pinnedTabsOnSeparateRow': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.pinnedTabsOnSeparateRow),
137+
'focusRecentEditorAfterClose': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.focusRecentEditorAfterClose),
138+
'showIcons': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.showIcons),
139+
'enablePreview': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.enablePreview),
140+
'enablePreviewFromQuickOpen': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.enablePreviewFromQuickOpen),
141+
'enablePreviewFromCodeNavigation': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.enablePreviewFromCodeNavigation),
142+
'closeOnFileDelete': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.closeOnFileDelete),
143+
'closeEmptyGroups': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.closeEmptyGroups),
144+
'revealIfOpen': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.revealIfOpen),
145+
'swipeToNavigate': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.swipeToNavigate),
146+
'mouseBackForwardToNavigate': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.mouseBackForwardToNavigate),
147+
'restoreViewState': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.restoreViewState),
148+
'splitOnDragAndDrop': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.splitOnDragAndDrop),
149+
'allowDropIntoGroup': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.allowDropIntoGroup),
150+
'dragToOpenWindow': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.dragToOpenWindow),
151+
'centeredLayoutFixedWidth': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.centeredLayoutFixedWidth),
152+
'hasIcons': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.hasIcons),
153+
154+
'tabSizingFixedMinWidth': new NumberVerifier(DEFAULT_EDITOR_PART_OPTIONS.tabSizingFixedMinWidth),
155+
'tabSizingFixedMaxWidth': new NumberVerifier(DEFAULT_EDITOR_PART_OPTIONS.tabSizingFixedMaxWidth),
156+
157+
'showTabs': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS.showTabs, ['multiple', 'single', 'none']),
158+
'tabActionLocation': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS.tabActionLocation, ['left', 'right']),
159+
'tabSizing': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS.tabSizing, ['fit', 'shrink', 'fixed']),
160+
'pinnedTabSizing': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS.pinnedTabSizing, ['normal', 'compact', 'shrink']),
161+
'tabHeight': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS.tabHeight, ['default', 'compact']),
162+
'preventPinnedEditorClose': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS.preventPinnedEditorClose, ['keyboardAndMouse', 'keyboard', 'mouse', 'never']),
163+
'titleScrollbarSizing': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS.titleScrollbarSizing, ['default', 'large']),
164+
'titleScrollbarVisibility': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS.titleScrollbarVisibility, ['auto', 'visible', 'hidden']),
165+
'openPositioning': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS.openPositioning, ['left', 'right', 'first', 'last']),
166+
'openSideBySideDirection': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS.openSideBySideDirection, ['right', 'down']),
167+
'labelFormat': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS.labelFormat, ['default', 'short', 'medium', 'long']),
168+
'splitInGroupLayout': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS.splitInGroupLayout, ['vertical', 'horizontal']),
169+
'splitSizing': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS.splitSizing, ['distribute', 'split', 'auto']),
170+
'doubleClickTabToToggleEditorGroupSizes': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS.doubleClickTabToToggleEditorGroupSizes, ['maximize', 'expand', 'off']),
171+
'editorActionsLocation': new EnumVerifier(DEFAULT_EDITOR_PART_OPTIONS.editorActionsLocation, ['default', 'titleBar', 'hidden']),
172+
'autoLockGroups': new SetVerifier<string>(DEFAULT_EDITOR_PART_OPTIONS.autoLockGroups),
173+
174+
'limit': new ObjectVerifier<IEditorPartLimitOptions>(DEFAULT_EDITOR_PART_OPTIONS.limit, {
175+
'enabled': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.limit.enabled),
176+
'value': new NumberVerifier(DEFAULT_EDITOR_PART_OPTIONS.limit.value),
177+
'perEditorGroup': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.limit.perEditorGroup),
178+
'excludeDirty': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.limit.excludeDirty)
179179
}),
180-
'decorations': new ObjectVerifier<IEditorPartDecorationOptions>(DEFAULT_EDITOR_PART_OPTIONS['decorations'], {
181-
'badges': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['decorations']['badges']),
182-
'colors': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS['decorations']['colors'])
180+
'decorations': new ObjectVerifier<IEditorPartDecorationOptions>(DEFAULT_EDITOR_PART_OPTIONS.decorations, {
181+
'badges': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.decorations.badges),
182+
'colors': new BooleanVerifier(DEFAULT_EDITOR_PART_OPTIONS.decorations.colors)
183183
}),
184184
}, options);
185185
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
754754

755755
const resource = EditorResourceAccessor.getOriginalUri(editor, { supportSideBySide: SideBySideEditor.BOTH });
756756
if (URI.isUri(resource)) {
757-
descriptor['resource'] = this.toResourceTelemetryDescriptor(resource);
757+
descriptor.resource = this.toResourceTelemetryDescriptor(resource);
758758

759759
/* __GDPR__FRAGMENT__
760760
"EditorTelemetryDescriptor" : {
@@ -764,10 +764,10 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
764764
return descriptor;
765765
} else if (resource) {
766766
if (resource.primary) {
767-
descriptor['resource'] = this.toResourceTelemetryDescriptor(resource.primary);
767+
descriptor.resource = this.toResourceTelemetryDescriptor(resource.primary);
768768
}
769769
if (resource.secondary) {
770-
descriptor['resourceSecondary'] = this.toResourceTelemetryDescriptor(resource.secondary);
770+
descriptor.resourceSecondary = this.toResourceTelemetryDescriptor(resource.secondary);
771771
}
772772
/* __GDPR__FRAGMENT__
773773
"EditorTelemetryDescriptor" : {

src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ Registry.as<IConfigurationMigrationRegistry>(WorkbenchExtensions.ConfigurationMi
11061106
}]);
11071107

11081108
function getDelaysFromConfig(accessor: (key: string) => any, type: 'general' | 'errorAtPosition' | 'warningAtPosition'): { announcement: number; sound: number } | undefined {
1109-
return accessor(`accessibility.signalOptions.experimental.delays.${type}`) || accessor('accessibility.signalOptions')?.['experimental.delays']?.[`${type}`] || accessor('accessibility.signalOptions')?.['delays']?.[`${type}`];
1109+
return accessor(`accessibility.signalOptions.experimental.delays.${type}`) || accessor('accessibility.signalOptions')?.['experimental.delays']?.[`${type}`] || accessor('accessibility.signalOptions')?.delays?.[`${type}`];
11101110
}
11111111

11121112
function getVolumeFromConfig(accessor: (key: string) => any): string | undefined {

src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export class BulkEditPane extends ViewPane {
181181
}
182182

183183
private _setState(state: State): void {
184-
this.element.dataset['state'] = state;
184+
this.element.dataset.state = state;
185185
}
186186

187187
async setInput(edit: ResourceEdit[], token: CancellationToken): Promise<ResourceEdit[] | undefined> {

src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,13 +346,13 @@ export class CallHierarchyTreePeekWidget extends peekView.PeekViewWidget {
346346
}
347347

348348
showLoading(): void {
349-
this._parent.dataset['state'] = State.Loading;
349+
this._parent.dataset.state = State.Loading;
350350
this.setTitle(localize('title.loading', "Loading..."));
351351
this._show();
352352
}
353353

354354
showMessage(message: string): void {
355-
this._parent.dataset['state'] = State.Message;
355+
this._parent.dataset.state = State.Message;
356356
this.setTitle('');
357357
this.setMetaTitle('');
358358
this._message.innerText = message;
@@ -377,7 +377,7 @@ export class CallHierarchyTreePeekWidget extends peekView.PeekViewWidget {
377377
: localize('empt.callsTo', "No callers of '{0}'", model.root.name));
378378

379379
} else {
380-
this._parent.dataset['state'] = State.Data;
380+
this._parent.dataset.state = State.Data;
381381
if (!viewState || this._tree.getFocus().length === 0) {
382382
this._tree.setFocus([root.children[0].element]);
383383
}

src/vs/workbench/contrib/issue/electron-browser/nativeGitHubUploadService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class NativeGitHubUploadService extends Disposable implements IGitHubUplo
2828
async resolveRepositoryId(owner: string, repo: string, token?: string): Promise<string> {
2929
const headers: Record<string, string> = { 'Accept': 'application/vnd.github+json', 'X-GitHub-Api-Version': '2022-11-28' };
3030
if (token) {
31-
headers['Authorization'] = `Bearer ${token}`;
31+
headers.Authorization = `Bearer ${token}`;
3232
}
3333
const r = await fetch(`https://api.github.com/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}`, { headers });
3434
if (!r.ok) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,15 @@ class NativeLocalizationWorkbenchContribution extends BaseLocalizationWorkbenchC
164164
};
165165

166166
const searchAction = {
167-
label: translations['searchMarketplace'],
167+
label: translations.searchMarketplace,
168168
run: async () => {
169169
logUserReaction('search');
170170
await this.extensionsWorkbenchService.openSearch(`tag:lp-${locale}`);
171171
}
172172
};
173173

174174
const installAndRestartAction = {
175-
label: translations['installAndRestart'],
175+
label: translations.installAndRestart,
176176
run: async () => {
177177
logUserReaction('installAndRestart');
178178
await this.localeService.setLocale({

src/vs/workbench/contrib/policyExport/electron-browser/policyExport.contribution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export class PolicyExportContribution extends Disposable implements IWorkbenchCo
119119
// Checks DISTRO_PRODUCT_JSON env var (for testing),
120120
// then falls back to fetching from GitHub API with GITHUB_TOKEN.
121121
const distroProduct = await this.getDistroProductJson();
122-
const extensionPolicies = distroProduct['extensionConfigurationPolicy'] as Record<string, ExtensionConfigurationPolicyEntry | ExtensionConfigurationPolicyReferenceEntry> | undefined;
122+
const extensionPolicies = distroProduct.extensionConfigurationPolicy as Record<string, ExtensionConfigurationPolicyEntry | ExtensionConfigurationPolicyReferenceEntry> | undefined;
123123
// Reference-shaped product entries (extension settings attaching to an in-code-owned
124124
// policy), collected by owning policy name so they can be linked below.
125125
const productReferencesByPolicyName = new Map<string, string[]>();

src/vs/workbench/contrib/search/browser/replaceService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const toReplaceResource = (fileResource: URI): URI => {
3939
};
4040

4141
const toFileResource = (replaceResource: URI): URI => {
42-
return replaceResource.with({ scheme: JSON.parse(replaceResource.query)['scheme'], fragment: '', query: '' });
42+
return replaceResource.with({ scheme: JSON.parse(replaceResource.query).scheme, fragment: '', query: '' });
4343
};
4444

4545
export class ReplacePreviewContentProvider implements ITextModelContentProvider, IWorkbenchContribution {

0 commit comments

Comments
 (0)