Skip to content

How to configure functional-parameters for React-Hooks #559

@0815pascal

Description

@0815pascal

Hi all,

I was wondering how I need to configure the rule functional/functional-parameters so that it wouldn't be triggered in React-Hooks such as useEffect ? In my case I'm having

useEffect(() => {  // Warning: Functions must have at least one parameter
...
}, [myVar]);

and .eslintrc is set to

"functional/functional-parameters":  ["warn", { "ignorePattern": ["useEffect"]}],

I tried different ignorePattern but it seems like I'm doing something wrong. Or would I have to apply the ignorePrefixSelector ?

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions