From bf9b2e83cfd234cffdd700b9196324a49b4e872c Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Fri, 7 Oct 2016 17:05:58 -0700 Subject: [PATCH] add test --- test/rules/no-unused-variable/type-checked/a.ts | 2 ++ test/rules/no-unused-variable/type-checked/test.ts.lint | 5 +++++ test/rules/no-unused-variable/type-checked/tsconfig.json | 5 +++++ test/rules/no-unused-variable/type-checked/tslint.json | 8 ++++++++ 4 files changed, 20 insertions(+) create mode 100644 test/rules/no-unused-variable/type-checked/a.ts create mode 100644 test/rules/no-unused-variable/type-checked/test.ts.lint create mode 100644 test/rules/no-unused-variable/type-checked/tsconfig.json create mode 100644 test/rules/no-unused-variable/type-checked/tslint.json diff --git a/test/rules/no-unused-variable/type-checked/a.ts b/test/rules/no-unused-variable/type-checked/a.ts new file mode 100644 index 00000000000..abfc7078006 --- /dev/null +++ b/test/rules/no-unused-variable/type-checked/a.ts @@ -0,0 +1,2 @@ +export class A {} +export var a: A; diff --git a/test/rules/no-unused-variable/type-checked/test.ts.lint b/test/rules/no-unused-variable/type-checked/test.ts.lint new file mode 100644 index 00000000000..de64a5953ac --- /dev/null +++ b/test/rules/no-unused-variable/type-checked/test.ts.lint @@ -0,0 +1,5 @@ +import {a, A} from './a'; + +export class B { + static thing = a; +} diff --git a/test/rules/no-unused-variable/type-checked/tsconfig.json b/test/rules/no-unused-variable/type-checked/tsconfig.json new file mode 100644 index 00000000000..db953a729b9 --- /dev/null +++ b/test/rules/no-unused-variable/type-checked/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "declaration": true + } +} \ No newline at end of file diff --git a/test/rules/no-unused-variable/type-checked/tslint.json b/test/rules/no-unused-variable/type-checked/tslint.json new file mode 100644 index 00000000000..e81cc662cf1 --- /dev/null +++ b/test/rules/no-unused-variable/type-checked/tslint.json @@ -0,0 +1,8 @@ +{ + "linterOptions": { + "typeCheck": true + }, + "rules": { + "no-unused-variable": true + } +}