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

TypeError: this.styleSheets[styleSheetName].filter is not a function #321

Open
Romick2005 opened this issue Sep 20, 2022 · 1 comment
Open

Comments

@Romick2005
Copy link

I have in one of my file the following line:
const hasOwnProperty = Object.prototype.hasOwnProperty;

This cause eslint rule check to failure with error:
TypeError: this.styleSheets[styleSheetName].filter is not a function

Rule: "react-native/no-unused-styles"
    at StyleSheets.markAsUsed (/node_modules/eslint-plugin-react-native/lib/util/stylesheet.js:37:8)
    at /node_modules/eslint-plugin-react-native/lib/rules/no-unused-styles.js:57:23
    at Set.forEach (<anonymous>)
Romick2005 added a commit to Romick2005/eslint-plugin-react-native that referenced this issue Sep 20, 2022
@Matzielab
Copy link

Matzielab commented Apr 13, 2023

Not sure if it helps you or someone else, but in my case i had to lint ignore the android and ios folders.

Added this to my .eslintignore file

android
ios

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

2 participants