When using TSLint 4.0 with a rule set that "extends": "tslint:recommended", the following deprecation message is always shown
no-unused-variable is deprecated. Use the compiler options --noUnusedParameters and --noUnusedLocals instead.
Removing the rule from node_modules/tslint/lib/configs/recommended.js (where it is set to false) fixes it
If we need to have this warning, can we at least show it ONLY, when rule is enabled. It is pretty inconvenient to copy whole config file to get rid of it.
Never mind. It won't work as everybody will get recommended config, where it is disabled.
The notice should be suppressed, once the rule is actively disabled in the config:
{
"extends": "tslint:latest",
"rules": {
"no-unused-variable": false
}
}
Right now, the notice still appears (and doesn't fair well with some JetBrains-IDEs).
@Ungolianth not for me: as long as the rule is mentioned (including as "no-unused-variable": false, in tslint/lib/configs/recommended.js, which is also used in latest), the warning appears
Edit: I've read your post as a 'I think that works' vs 'I think this is how it should work': in the latter case, I wholeheartedly agree (and it would be helpful to include a hint in the warning message itself or at least in the blog post)
@locobert yes, it was meant to be "It should work like this, but right now it does not".
Modifying node_modules/tslint/lib/configs/recommended.js cannot be the _ultimate_ solution, until "no-unused-variable" is removed officially from tslint:recommended, as your changes are overwritten with every (minor) update of tslint...
And the packages behavior will not be consistent for your team members.
:) Yes, modifying node_modules/tslint/lib/configs/recommended.js was not meant as a solution or even workaround, it was meant to indicate the source of the problem
sorry about that, v4.0.1 should have the fix
It also prevent the tslint service in webstorm from working.

Did you update your tslint package?
All JetBrains IDEs show this behaviour (I use PHPStorm and IntelliJ), as they cannot map the deprecated message to a specific file. Removing the no-unused-variable rule from your project now (v4.0.1) also fixes your IDE.
In fact, i prefer to turn on this rule because it can't be disabled for some code with common tag, which the tsc can't achieve for now.
@e-cloud what do you mean by "common tag" here? With tsc, you can opt out of noUnused... checking by prefixing variable or parameter identifiers with underscore, e.g. _unusedVar
sorry, typo. I mean use tslint comment flag to disable something.
The problem with using the flag in tsc is that it causes an error during build, while the tslint rules is more configurable and can be used to produce warnings only.
Most helpful comment
The problem with using the flag in
tscis that it causes an error during build, while thetslintrules is more configurable and can be used to produce warnings only.