metamask-mobile
metamask-mobile copied to clipboard
Turn on no-unused-expressions and react/no-unused-class-component-methods in .eslint.js
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
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.
Closing this PR since it's stalled