This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
react-unused-props-and-state doesn't understand usage in setState #796
Labels
Difficulty: Medium
People with non-trivial experience in TSLint should be able to send a pull request for this issue.
💀 R.I.P. 💀
Type: Bug
Bug Report
tslint-microsoft-contrib
version: 6.0.0TypeScript code being linted
https://github.com/imsolost/test-app/blob/master/src/App.tsx
with
tslint.json
configuration: https://github.com/imsolost/test-app/blob/master/tslint.jsonActual behavior
The props defined in the interface are flagged as unused by tslint with the following errors:
Unused React property defined in interface: firstProp (react-unused-props-and-state)
Unused React property defined in interface: secondProp (react-unused-props-and-state)
Unused React property defined in interface: thirdProp (react-unused-props-and-state)
Expected behavior
These properties are used in the setState function so they should not trigger this error.
The text was updated successfully, but these errors were encountered: