From 40c0cbd7b58ed17f5cd3d7e1fe5e2220552aa9ac Mon Sep 17 00:00:00 2001 From: Paul van Brenk Date: Thu, 3 Nov 2016 13:28:08 -0700 Subject: [PATCH] Clean up --- .../codefixes/unusedIdentifierFixes.ts | 27 +++++-------------- src/services/tsconfig.json | 2 +- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/services/codefixes/unusedIdentifierFixes.ts b/src/services/codefixes/unusedIdentifierFixes.ts index e563b78583f..8e14bdcb73e 100644 --- a/src/services/codefixes/unusedIdentifierFixes.ts +++ b/src/services/codefixes/unusedIdentifierFixes.ts @@ -80,14 +80,14 @@ namespace ts.codefix { // handle case where 'import a = A;' case SyntaxKind.ImportEqualsDeclaration: - let importEquals = findImportDeclaration(token); + const importEquals = findImportDeclaration(token); return createCodeFix("", importEquals.pos, importEquals.end - importEquals.pos); case SyntaxKind.ImportSpecifier: const namedImports = token.parent.parent; if (namedImports.elements.length === 1) { // Only 1 import and it is unused. So the entire declaration should be removed. - let importSpec = findImportDeclaration(token); + const importSpec = findImportDeclaration(token); return createCodeFix("", importSpec.pos, importSpec.end - importSpec.pos); } else { @@ -108,10 +108,11 @@ namespace ts.codefix { case SyntaxKind.NamespaceImport: const namespaceImport = token.parent; - if(namespaceImport.name == token && !(namespaceImport.parent).name){ + if (namespaceImport.name == token && !(namespaceImport.parent).name) { const importDecl = findImportDeclaration(namespaceImport); return createCodeFix("", importDecl.pos, importDecl.end - importDecl.pos); - } else { + } + else { const start = (namespaceImport.parent).name.end; return createCodeFix("", start, (namespaceImport.parent).namedBindings.end - start); } @@ -163,20 +164,4 @@ namespace ts.codefix { } } }); -} - -const s = "hello"; - -class C { - - - - private ["string"]: string; - private "b iz": string; - - bar() { - this - } -} - - +} \ No newline at end of file diff --git a/src/services/tsconfig.json b/src/services/tsconfig.json index 0066ef94343..17ca5ac9739 100644 --- a/src/services/tsconfig.json +++ b/src/services/tsconfig.json @@ -1,4 +1,4 @@ -{ +{ "compilerOptions": { "noImplicitAny": true, "noImplicitThis": true,