Answer the question
In order to leave comments, you need to log in
How to solve a problem with Eslint?
I use ESlint config from airBnB. I am getting an error - Function 'errorHandlingSearch' expected no return value consistent-return . I read on the Internet, I did not understand anything, how to solve this problem. Here is the code - https://codepen.io/kafkae/pen/ajOWxB?editors=0010 . Thanks in advance.
Answer the question
In order to leave comments, you need to log in
Instead of return; do return "";
ESlint assumes that your function should return a string, instead you return undefined. It's highly recommended that a function always return the same data type, or throw an exception on error when you want to return null/undefined.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question