diff --git a/extensions/configuration-editing/src/extension.ts b/extensions/configuration-editing/src/extension.ts index 2266b8005af..01badfd0768 100644 --- a/extensions/configuration-editing/src/extension.ts +++ b/extensions/configuration-editing/src/extension.ts @@ -7,7 +7,7 @@ import * as nls from 'vscode-nls'; const localize = nls.loadMessageBundle(); import * as vscode from 'vscode'; -import { getLocation, visit, parse, ParseError, ParseErrorCode } from 'jsonc-parser'; +import { getLocation, visit, parse, ParseErrorCode } from 'jsonc-parser'; import * as path from 'path'; import { SettingsDocument } from './settingsDocumentHelper'; @@ -70,8 +70,6 @@ function autoFixSettingsJSON(willSaveEvent: vscode.TextDocumentWillSaveEvent): v onError(error: ParseErrorCode, offset: number, length: number): void { if (error === ParseErrorCode.CommaExpected && lastEndOfSomething > -1) { - const errorPosition = document.positionAt(offset); - const fixPosition = document.positionAt(lastEndOfSomething); edit.insert(document.uri, fixPosition, ','); } @@ -106,30 +104,6 @@ function registerSettingsCompletions(): vscode.Disposable { }); } -function provideContributedLocalesProposals(range: vscode.Range): vscode.ProviderResult { - const contributedLocales: string[] = []; - for (const extension of vscode.extensions.all) { - if (extension.packageJSON && extension.packageJSON['contributes'] && extension.packageJSON['contributes']['localizations'] && extension.packageJSON['contributes']['localizations'].length) { - const localizations: { languageId: string }[] = extension.packageJSON['contributes']['localizations']; - for (const localization of localizations) { - if (contributedLocales.indexOf(localization.languageId) === -1) { - contributedLocales.push(localization.languageId); - } - } - } - } - return contributedLocales.map(locale => { - const text = `"${locale}"`; - const item = new vscode.CompletionItem(text); - item.kind = vscode.CompletionItemKind.Value; - item.insertText = text; - item.range = range; - item.filterText = text; - return item; - }); -} - - interface IExtensionsContent { recommendations: string[]; } diff --git a/extensions/configuration-editing/tsconfig.json b/extensions/configuration-editing/tsconfig.json index 23392904dee..84b75434d20 100644 --- a/extensions/configuration-editing/tsconfig.json +++ b/extensions/configuration-editing/tsconfig.json @@ -6,9 +6,10 @@ "lib": [ "es2015" ], - "strict": true + "strict": true, + "noUnusedLocals": true }, "include": [ "src/**/*" ] -} +} \ No newline at end of file