solidjs-community / eslint-plugin-solid

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

Add no-react-deps rule #45

Closed joshwilsonvu closed 1 year ago

joshwilsonvu commented 1 year ago

The ecosystem team has noticed that some users who are trying out Solid coming from React still have a habit of specifying a dependency array for createEffect and createMemo. It seems we're unable to make TypeScript helpfully guide users away from that behavior, so a dedicated lint rule it is.

atk commented 1 year ago

Have you tried cases in which a previous value is used without an initial value?

joshwilsonvu commented 1 year ago

Sure, added one—good idea to just sanity-check that the rule doesn't affect that situation.

atk commented 1 year ago

Thanks!