Skip to content

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

Open
@Romick2005

Description

@Romick2005

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>)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions