Skip to content

Commit

Permalink
Un-deprecate noUnusedVariable.
Browse files Browse the repository at this point in the history
As discussed in feedback on  palantir#1481 and palantir#1617, for many users `--noUnusedParameters` and `--noUnusedLocals` do not work as a replacement for `noUnusedVariable`. This change de-deprecates the rule and documents the alternative compiler flags (and why they might not work for users) in the description.

Fixes palantir#1617.
  • Loading branch information
mprobst authored Feb 27, 2017
1 parent 12435bf commit d97fcae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rules/noUnusedVariableRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ export class Rule extends Lint.Rules.AbstractRule {
/* tslint:disable:object-literal-sort-keys */
public static metadata: Lint.IRuleMetadata = {
ruleName: "no-unused-variable",
deprecationMessage: "Use the tsc compiler options --noUnusedParameters and --noUnusedLocals instead.",
description: "Disallows unused imports, variables, functions and private class members.",
description: Lint.Utils.dedent`Disallows unused imports, variables, functions and
private class members. Similar to tsc's --noUnusedParameters and --noUnusedLocals
options, but does not interrupt code compilation.`,
hasFix: true,
optionsDescription: Lint.Utils.dedent`
Three optional arguments may be optionally provided:
Expand Down

0 comments on commit d97fcae

Please sign in to comment.