Answer the question
In order to leave comments, you need to log in
How to make optional chaining operator and esLint friends?
I can’t make friends with the optional chaining operator, that is, calling the function after checking, like this:
props.addFun?. ()
what I did:
- after reading, I installed the plugin '@babel/plugin-proposal-optional-chaining'
now, when using such an entry, the linter swears like this:
Expected an assignment or function call and instead saw an expression
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question