mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
let -> const, settings
This commit is contained in:
parent
91e21b5940
commit
518523fc7f
|
@ -223,7 +223,7 @@ export class SettingsDocument {
|
|||
if (location.path.length === 1 && location.previousNode && typeof location.previousNode.value === 'string' && location.previousNode.value.startsWith('[')) {
|
||||
// Suggestion model word matching includes closed sqaure bracket and ending quote
|
||||
// Hence include them in the proposal to replace
|
||||
let range = this.document.getWordRangeAtPosition(position) || new vscode.Range(position, position);
|
||||
const range = this.document.getWordRangeAtPosition(position) || new vscode.Range(position, position);
|
||||
return this.provideLanguageCompletionItemsForLanguageOverrides(location, range, language => `"[${language}]"`);
|
||||
}
|
||||
return Promise.resolve([]);
|
||||
|
|
|
@ -1071,7 +1071,7 @@ export class SettingObjectRenderer extends AbstractSettingRenderer implements IT
|
|||
: {};
|
||||
|
||||
const newValue: Record<string, unknown> = {};
|
||||
let newItems: IObjectDataItem[] = [];
|
||||
const newItems: IObjectDataItem[] = [];
|
||||
|
||||
template.objectWidget.items.forEach((item, idx) => {
|
||||
// Item was updated
|
||||
|
|
|
@ -424,7 +424,7 @@ function wordifyKey(key: string): string {
|
|||
match;
|
||||
});
|
||||
|
||||
for (let [k, v] of knownTermMappings) {
|
||||
for (const [k, v] of knownTermMappings) {
|
||||
key = key.replace(new RegExp(`\\b${k}\\b`, 'gi'), v);
|
||||
}
|
||||
|
||||
|
@ -631,7 +631,7 @@ const tagRegex = /(^|\s)@tag:("([^"]*)"|[^"]\S*)/g;
|
|||
const extensionRegex = /(^|\s)@ext:("([^"]*)"|[^"]\S*)?/g;
|
||||
export function parseQuery(query: string): IParsedQuery {
|
||||
const tags: string[] = [];
|
||||
let extensions: string[] = [];
|
||||
const extensions: string[] = [];
|
||||
query = query.replace(tagRegex, (_, __, quotedTag, tag) => {
|
||||
tags.push(tag || quotedTag);
|
||||
return '';
|
||||
|
@ -643,7 +643,7 @@ export function parseQuery(query: string): IParsedQuery {
|
|||
});
|
||||
|
||||
query = query.replace(extensionRegex, (_, __, quotedExtensionId, extensionId) => {
|
||||
let extensionIdQuery: string = extensionId || quotedExtensionId;
|
||||
const extensionIdQuery: string = extensionId || quotedExtensionId;
|
||||
if (extensionIdQuery) {
|
||||
extensions.push(...extensionIdQuery.split(',').map(s => s.trim()).filter(s => !isFalsyOrWhitespace(s)));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue