Unused Vars Not Detected

Hi,

I have an app setup with create-react-native-app (not ejected). When I define variables in my files and do not use them, I do not get any warnings or errors in the console. This seems like pretty fundamental functionality, how can I enable this?

Cheers,

Hey @leopold!

You bring up a good point, most of us use tools such as eslint to detect when variables are no longer being used, and even go so far as to check whether or not imports are not being used.

You can do this by adding npm modules such as eslint-config-airbnb and babel-eslint. In addition you will need to add .eslintrc to your project folder as well.

Let me know if this is helpful!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.