mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 10:40:41 +00:00
parent
df7f125f35
commit
228df854e0
|
@ -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": {
|
||||
|
|
|
@ -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"
|
||||
}
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue