Today I see this warning in a project being refreshed after 3 months.
no-unused-variable is deprecated. Since TypeScript 2.9. Please use the built-in compiler checks instead.
But my tsconfig.json
does not seem to use this.
{ "compilerOptions": { "lib": ["es6"], "module": "commonjs", "noImplicitReturns": true, "outDir": "lib", "sourceMap": true, "target": "es6", "allowJs" : true }, "compileOnSave": true, "include": [ "src" ] }
Probably it's a config implicit in any of the previous configs.
Could you point me to what to do to fix it?
If usefull
$ node -v v10.3.0 $ npm -v 6.1.0
And these are devDependencies
relates to type script in my package.json
"devDependencies": { ... "tslint": "^5.11.0", "typescript": "^2.9.1" ... },
no-unused-variable is deprecated. Since TypeScript 2.9. Please use the built-in compiler checks instead.
Remove deprecated no-unused-variable
from your or dependency tslint.json file.
Specify the following compiler options in your tsconfig.json file.
"compilerOptions": { "noUnusedLocals": true, /* Report errors on unused locals. */ "noUnusedParameters": true /* Report errors on unused parameters. */ }
As it says, tslint deprecated that rule (more info here https://github.com/palantir/tslint/pull/3919)
Check your tslint.json
, and remove the rule and the warning should disappear.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With