Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no-unused-styles: False positive when using dot access on style. #293

Open
joshuapinter opened this issue Jul 28, 2021 · 0 comments
Open

Comments

@joshuapinter
Copy link

For example:

width={ styles.thumbnail.width }

This will raise an error with the following style:

thumbnail: {
  width: "30%"
},
eslint: error
react-native/no-unused-styles - Unused style detected: styles.thumbnail

Using dot notation is ignored when determining which defined styles are used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant