metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

Turn on no-unused-expressions and react/no-unused-class-component-methods in .eslint.js

Open owencraston opened this issue 3 years ago • 1 comments

Description

Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions, 1. What is the reason for the change?

  • to add stricter lint rules that prevent unused code 2. What is the improvement/solution?
  • update the linter to check for the react/no-unused-class-component-methods rule
  • turn on no-unused-expressions
  • after these rules are enabled, went through and cleaned up all the unused props, expressions, variables and methods
  • I also had to validate a few props since that rule got further enforced.

Reviewing

  • while these are just lint rules I want to be careful before merging as I did delete a lot of code and I think we should have at least a few reviews and a test of some key flows before merging.

Checklist

  • [ ] There is a related GitHub issue
  • [ ] Tests are included if applicable
  • [ ] Any added code is fully documented

owencraston avatar Aug 02 '22 20:08 owencraston

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

github-actions[bot] avatar Aug 02 '22 20:08 github-actions[bot]

Closing this PR since it's stalled

gantunesr avatar Mar 01 '23 21:03 gantunesr