complete-intro-to-react icon indicating copy to clipboard operation
complete-intro-to-react copied to clipboard

Warning "Unexpected unnamed function func-names" under '*new' ESLint rule

Open RespectMyAuthoritah opened this issue 7 years ago • 5 comments

my eslint version is 4.4.1, it would give a warning like this: func express

when defining functions in such a way: const funct = function () { .... }

http://eslint.org/docs/rules/func-names

RespectMyAuthoritah avatar Aug 14 '17 02:08 RespectMyAuthoritah

I don't think this is a problem with ESLint You might want to change your function to const funct = () => { .... } A bit late but hopefully it helps someone else

khamiltonuk avatar Mar 19 '18 09:03 khamiltonuk

i come across this question too

tewang1 avatar May 03 '18 03:05 tewang1

but how to bind this when you have to use functions like requiredIf of Vuelidate for example..

wa05 avatar Jul 24 '19 03:07 wa05

You can also switch off this eslint warning. You just need to write 'func-names': 'off' inside rules definition on your .eslintrc.js script.

daniloas80 avatar May 01 '20 20:05 daniloas80

@ daniloas80 Following your recommendation to use r 'func-names': 'off' in eslintrc.js solved the problem I was having in my code

felipsbreno avatar May 27 '20 04:05 felipsbreno