Open henrikra opened 5 years ago
Good point, I suppose it should be flagged, maybe you can make a PR to add this case? :)
Maybe if you point to some lines where the problem might lie because I am not yet familiar with the codebase :)
I can't reproduce this issue. I'm using v3.8.1. Am I missing something? 🤔
I've just found the root cause. It lies on #258.
Here is example component where
no-unused-styles
works:But if the same component is refactored to functional component the validation is not working anymore
Also the docs https://github.com/Intellicode/eslint-plugin-react-native/blob/master/docs/rules/no-unused-styles.md don't say anything that this validation should work only on classes so I think this is a bug then.
Does anybody have a clue how to fix this? I can help if needed 👍