Skip to content Skip to sidebar Skip to footer

How To Set Eslint Rule To Identify Functions Are Either Camelcase Or Not?

If I check for ESLint docs there is a perfect plugin available for camel case properties, whereas the same thing I'm trying to identify functions if they are either camelcase or no

Solution 1:

In the above problem similarly i want this to achieve for functions too,here getfirstname is not proper camel case for this i need to get lint error

You will not be able to detect automatically things like getfirstname that is not a proper camel case. The linter can be sure that it's not camel case if it sees an underscore but here it just looks like one word and it's not that intelligent to know that it isn't.

If it did then it would have to reject things like XMLHttpRequest, setTimeout and fs.realpath.

Post a Comment for "How To Set Eslint Rule To Identify Functions Are Either Camelcase Or Not?"