From 5dfa45ffa468cabbad47fdfc04a3e0f36f1efbc9 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Wed, 12 Dec 2018 19:21:31 +0100 Subject: [PATCH] build: replace deprecated tslint rule with compiler option (#13186) Removes the `no-unused-variable` tslint rule which has been logging out a deprecation warning, with the equivalent compiler option. --- src/bazel-tsconfig-build.json | 1 + src/cdk-experimental/tsconfig-build.json | 1 + src/dev-app/tsconfig-aot.json | 1 + src/dev-app/tsconfig-build.json | 1 + src/lib/button/button.ts | 3 +-- src/lib/schematics/tsconfig.json | 2 ++ src/material-examples/tsconfig-build.json | 1 + src/material-experimental/tsconfig-build.json | 1 + src/material-moment-adapter/tsconfig-build.json | 1 + src/universal-app/tsconfig-build.json | 1 + src/universal-app/tsconfig-prerender.json | 1 + tools/dgeni/tsconfig.json | 1 + tools/gulp/tsconfig.json | 1 + tsconfig.json | 1 + tslint.json | 1 - 15 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/bazel-tsconfig-build.json b/src/bazel-tsconfig-build.json index efddac0061a..688cbea0dca 100644 --- a/src/bazel-tsconfig-build.json +++ b/src/bazel-tsconfig-build.json @@ -10,6 +10,7 @@ "stripInternal": false, "experimentalDecorators": true, "noUnusedParameters": true, + "noUnusedLocals": true, "strictNullChecks": true, "strictFunctionTypes": true, "noImplicitAny": true, diff --git a/src/cdk-experimental/tsconfig-build.json b/src/cdk-experimental/tsconfig-build.json index ff560dedc53..45eebfc0449 100644 --- a/src/cdk-experimental/tsconfig-build.json +++ b/src/cdk-experimental/tsconfig-build.json @@ -6,6 +6,7 @@ "stripInternal": false, "experimentalDecorators": true, "noUnusedParameters": true, + "noUnusedLocals": true, "strictNullChecks": true, "strictFunctionTypes": true, "noImplicitAny": true, diff --git a/src/dev-app/tsconfig-aot.json b/src/dev-app/tsconfig-aot.json index 6faa3db693e..e991ddf71dc 100644 --- a/src/dev-app/tsconfig-aot.json +++ b/src/dev-app/tsconfig-aot.json @@ -7,6 +7,7 @@ "allowSyntheticDefaultImports": true, "experimentalDecorators": true, "noUnusedParameters": true, + "noUnusedLocals": true, "strictNullChecks": true, "strictFunctionTypes": true, "noImplicitAny": true, diff --git a/src/dev-app/tsconfig-build.json b/src/dev-app/tsconfig-build.json index eafed58a186..bbd2fb21604 100644 --- a/src/dev-app/tsconfig-build.json +++ b/src/dev-app/tsconfig-build.json @@ -8,6 +8,7 @@ "emitDecoratorMetadata": true, "experimentalDecorators": true, "noUnusedParameters": true, + "noUnusedLocals": true, "strictNullChecks": true, "strictFunctionTypes": true, "noImplicitThis": true, diff --git a/src/lib/button/button.ts b/src/lib/button/button.ts index 00052711799..8b4fcb260b4 100644 --- a/src/lib/button/button.ts +++ b/src/lib/button/button.ts @@ -96,8 +96,7 @@ export class MatButton extends _MatButtonMixinBase * @deprecated Platform checks for SSR are no longer needed * @breaking-change 8.0.0 */ - // tslint:disable-next-line:no-unused-variable - private _platform: Platform, + _platform: Platform, private _focusMonitor: FocusMonitor, // @breaking-change 8.0.0 `_animationMode` parameter to be made required. @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string) { diff --git a/src/lib/schematics/tsconfig.json b/src/lib/schematics/tsconfig.json index b6488d76556..ad488c1b7f7 100644 --- a/src/lib/schematics/tsconfig.json +++ b/src/lib/schematics/tsconfig.json @@ -7,6 +7,8 @@ "noEmitOnError": false, "strictNullChecks": true, "skipDefaultLibCheck": true, + "noUnusedLocals": true, + "noUnusedParameters": true, "skipLibCheck": true, "sourceMap": true, "declaration": true, diff --git a/src/material-examples/tsconfig-build.json b/src/material-examples/tsconfig-build.json index 44114d67f5e..76d15b8e4e0 100644 --- a/src/material-examples/tsconfig-build.json +++ b/src/material-examples/tsconfig-build.json @@ -8,6 +8,7 @@ "stripInternal": false, "experimentalDecorators": true, "noUnusedParameters": true, + "noUnusedLocals": true, "strictNullChecks": true, "strictFunctionTypes": true, "noImplicitAny": true, diff --git a/src/material-experimental/tsconfig-build.json b/src/material-experimental/tsconfig-build.json index b009c8f7e45..9b0d56ceebc 100644 --- a/src/material-experimental/tsconfig-build.json +++ b/src/material-experimental/tsconfig-build.json @@ -6,6 +6,7 @@ "stripInternal": false, "experimentalDecorators": true, "noUnusedParameters": true, + "noUnusedLocals": true, "strictNullChecks": true, "strictFunctionTypes": true, "noImplicitAny": true, diff --git a/src/material-moment-adapter/tsconfig-build.json b/src/material-moment-adapter/tsconfig-build.json index bbfdb190602..00b897f40aa 100644 --- a/src/material-moment-adapter/tsconfig-build.json +++ b/src/material-moment-adapter/tsconfig-build.json @@ -8,6 +8,7 @@ "stripInternal": false, "experimentalDecorators": true, "noUnusedParameters": true, + "noUnusedLocals": true, "strictNullChecks": true, "strictFunctionTypes": true, "noImplicitAny": true, diff --git a/src/universal-app/tsconfig-build.json b/src/universal-app/tsconfig-build.json index 4b59f1b671b..7234e84a5f0 100644 --- a/src/universal-app/tsconfig-build.json +++ b/src/universal-app/tsconfig-build.json @@ -6,6 +6,7 @@ "stripInternal": false, "experimentalDecorators": true, "noUnusedParameters": true, + "noUnusedLocals": true, "strictNullChecks": true, "strictFunctionTypes": true, "noImplicitAny": true, diff --git a/src/universal-app/tsconfig-prerender.json b/src/universal-app/tsconfig-prerender.json index bccab972099..b70a9d62577 100644 --- a/src/universal-app/tsconfig-prerender.json +++ b/src/universal-app/tsconfig-prerender.json @@ -5,6 +5,7 @@ "stripInternal": false, "experimentalDecorators": true, "noUnusedParameters": true, + "noUnusedLocals": true, "strictNullChecks": true, "strictFunctionTypes": true, "noImplicitAny": true, diff --git a/tools/dgeni/tsconfig.json b/tools/dgeni/tsconfig.json index b939d761376..8670f62807f 100644 --- a/tools/dgeni/tsconfig.json +++ b/tools/dgeni/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "experimentalDecorators": true, "noUnusedParameters": true, + "noUnusedLocals": true, "lib": ["es2015", "dom", "es2016.array.include"], "module": "commonjs", "moduleResolution": "node", diff --git a/tools/gulp/tsconfig.json b/tools/gulp/tsconfig.json index 2db82ffaece..740bb612790 100644 --- a/tools/gulp/tsconfig.json +++ b/tools/gulp/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "experimentalDecorators": true, "noUnusedParameters": true, + "noUnusedLocals": true, "lib": ["es2015", "dom", "es2016.array.include"], "module": "commonjs", "moduleResolution": "node", diff --git a/tsconfig.json b/tsconfig.json index 9db1f4a58b1..6c6570c721f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,6 +7,7 @@ "module": "es2015", "moduleResolution": "node", "noUnusedParameters": true, + "noUnusedLocals": true, "strictNullChecks": true, "strictFunctionTypes": true, "noImplicitAny": true, diff --git a/tslint.json b/tslint.json index 350ca87bd8d..1bd198990d5 100644 --- a/tslint.json +++ b/tslint.json @@ -30,7 +30,6 @@ "no-var-keyword": true, "member-access": [true, "no-public"], "no-debugger": true, - "no-unused-variable": true, "one-line": [ true, "check-catch",