solidjs-community / eslint-plugin-solid

Solid-specific linting rules for ESLint.
MIT License
216 stars 26 forks source link

In components-return-once, don't treat callback functions as components. #37

Closed joshwilsonvu closed 1 year ago

joshwilsonvu commented 1 year ago

Re: this message, some people are getting trouble with false positives from solid/components-return-once thinking createMemo functions are components.

This PR prevents the rule from considering callbacks from functions like createMemo as components. Specifically, that means functions starting with a lowercase letter; the minority of functions starting with an uppercase letter in Solid code are likely to be Higher-Order Components (HOCs) and callback functions there are still considered components.