How to configure functional-parameters for React-Hooks #560
Answered
by
RebeccaStevens
0815pascal
asked this question in
Q&A
-
Hi all, I was wondering how I need to configure the rule useEffect(() => { // Warning: Functions must have at least one parameter
...
}, [myVar]); and .eslintrc is set to "functional/functional-parameters": ["warn", { "ignorePattern": ["useEffect"]}], I tried different Thanks again! |
Beta Was this translation helpful? Give feedback.
Answered by
RebeccaStevens
Feb 28, 2023
Replies: 1 comment 1 reply
-
You would want to use the "functional/functional-parameters": ["warn", { "enforceParameterCount": { "ignoreLambdaExpression": true } }], |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
0815pascal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You would want to use the
enforceParameterCount
option. You can simply just set this tofalse
, or alternatively just set the sub-optionignoreLambdaExpression
totrue
.