solidjs-community / eslint-plugin-solid

Solid-specific linting rules for ESLint.
MIT License
209 stars 24 forks source link

False negative when passing a reactive value to a create* or use* function via an object property #57

Open russelldavis opened 1 year ago

russelldavis commented 1 year ago

Describe the bug The untrackedReactive error should be generated the same way for an object property as it is for a direct argument, but it isn't.

To Reproduce

function createFoo(bar) {}
function createFoo2({bar}) {}

const [bar, setBar] = createSignal();
createFoo(bar()); // error is properly generated
createFoo2({bar: bar()}); // same error should be generated but isn't

Expected behavior The same error should be generated in both cases

Environment (please complete the following information):

Additional context The issue might have been introduced by this commit: https://github.com/solidjs-community/eslint-plugin-solid/commit/227d02fc8f8f9ca7d62b2d587d5704b03032ad6f