Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

fix(rules): remove no-unused-variable from the 'tslint:all' config #4079

Merged
merged 1 commit into from
Aug 1, 2018
Merged

fix(rules): remove no-unused-variable from the 'tslint:all' config #4079

merged 1 commit into from
Aug 1, 2018

Conversation

DJMcNab
Copy link
Contributor

@DJMcNab DJMcNab commented Jul 30, 2018

fixes #4046

PR checklist

Overview of change:

Remove the no-unused-variable rule from the tslint:all config, as it was deprecated in #3919. Without this tslint gives a warning for projects extending tslint:all, which can be seen in #4046.

An alternative is to comment out the line "no-unused-variable": true with a note about its deprecation, as for no-invalid-this:

// "no-invalid-this": Won't this be deprecated?

However, I think this is an oversight from #2417, as this comment says to remove the comment for a future deprecation.

EDIT: Additionally tslint:all doesn't include deprecated rules

CHANGELOG.md entry:

[bugfix] remove no-unused-variable from tslint:all

Copy link

@giladgray giladgray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please redo this with the minimal diff. do not apply your tslint config to this file.

@DJMcNab
Copy link
Contributor Author

DJMcNab commented Jul 31, 2018

How should I do this - your repository uses husky and pretty-quick, which automatically runs prettier --write on any staged file precommit, then git adds the resulting file. This makes the changes that you do not want. Should I disable prettier for the file (by adding it to .prettierignore)?

I can then remove it from .prettierignore if you want.

EDIT: done. But should the prettier changes added in #4012 be actually run on each file at some point?

@giladgray
Copy link

@DJMcNab yes we'll do the prettier stuff in one go at some point.

@giladgray giladgray merged commit 788f64c into palantir:master Aug 1, 2018
@DJMcNab
Copy link
Contributor Author

DJMcNab commented Aug 1, 2018

That's fine, thanks. For future reference in case anyone finds it useful - to make prettier ignore the file, I just:

  • Added * to .prettierignore
  • Staged the changes (except those to .prettierignore)
  • Committed the changes
  • Reset .prettierignore

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no-unused-variable is deprecated.
2 participants