Shorten showUnused setting name

Fixes #50648
This commit is contained in:
Matt Bierner 2018-05-30 23:02:28 -07:00
parent df7f125f35
commit 228df854e0
3 changed files with 6 additions and 6 deletions

View file

@ -471,16 +471,16 @@
"description": "%typescript.preferences.importModuleSpecifier%",
"scope": "resource"
},
"javascript.showUnused.enabled": {
"javascript.showUnused": {
"type": "boolean",
"default": true,
"description": "%typescript.showUnused.enabled%",
"description": "%typescript.showUnused%",
"scope": "resource"
},
"typescript.showUnused.enabled": {
"typescript.showUnused": {
"type": "boolean",
"default": true,
"description": "%typescript.showUnused.enabled%",
"description": "%typescript.showUnused%",
"scope": "resource"
},
"typescript.updateImportsOnFileMove.enabled": {

View file

@ -55,6 +55,6 @@
"typescript.suggestionActions.enabled": "Enable/disable suggestion diagnostics for TypeScript files in the editor. Requires TypeScript >= 2.8",
"typescript.preferences.quoteStyle": "Preferred quote style to use for quick fixes: 'single' quotes, 'double' quotes, or 'auto' infer quote type from existing imports. Requires TypeScript >= 2.9",
"typescript.preferences.importModuleSpecifier": "Preferred path style for auto imports:\n- \"relative\" to the file location.\n- \"non-relative\" based on the 'baseUrl' configured in your 'jsconfig.json' / 'tsconfig.json'.\n- \"auto\" infer the shortest path type.\nRequires TypeScript >= 2.9",
"typescript.showUnused.enabled": "Enable/disable highlighting of unused variables in code. Requires TypeScript >= 2.9",
"typescript.showUnused": "Enable/disable highlighting of unused variables in code. Requires TypeScript >= 2.9",
"typescript.updateImportsOnFileMove.enabled": "Enable/disable automatic updating of import paths when you rename or move a file in VS Code. Possible values are: 'prompt' on each rename, 'always' update paths automatically, and 'never' rename paths and don't prompt me. Requires TypeScript >= 2.9"
}

View file

@ -279,7 +279,7 @@ export default class LanguageProvider {
public diagnosticsReceived(diagnosticsKind: DiagnosticKind, file: Uri, diagnostics: (Diagnostic & { reportUnnecessary: any })[]): void {
const config = workspace.getConfiguration(this.id, file);
const reportUnnecessary = config.get<boolean>('showUnused.enabled', true);
const reportUnnecessary = config.get<boolean>('showUnused', true);
this.diagnosticsManager.diagnosticsReceived(diagnosticsKind, file, diagnostics.filter(diag => {
if (!reportUnnecessary) {
diag.customTags = undefined;