treecounter-app
treecounter-app copied to clipboard
[React] Raise eslint error levels and fix errors in code (Round 2)
In .eslintrc.json
increase these from warning (1) to error (2):
"react/no-deprecated": 1, "react/no-did-mount-set-state": 1, "react/no-did-update-set-state": 1, "react/no-find-dom-node": 1, "react/no-string-refs": 1, "react/prop-types": 1,
These ones require a bit more refactoring and React knowledge.
Defining prop-types is tedious but does eliminate errors.
Some of these components may get refactored into functional components which makes handling refs and set-state lifecycle much simpler.
Run npm run lint:errors
and fix all errors.