Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task
russelldavis opened this issue Jan 4, 2023 · 0 comments
Assignees
Labels
bug Something isn't working reactivity v2 To be addressed in the rewrite of the solid/reactivity rule

Comments

@russelldavis
Copy link

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):

  • OS: MacOS 12.6.1
  • Node version (node --version): v16.18.0
  • eslint-plugin-solid version (npm list eslint-plugin-solid/yarn why eslint-plugin-solid): [email protected]
  • eslint version (npm list eslint/yarn why eslint): [email protected]

Additional context
The issue might have been introduced by this commit: 227d02f

  • I would be willing to contribute a PR to fix this issue
@russelldavis russelldavis added the bug Something isn't working label Jan 4, 2023
@joshwilsonvu joshwilsonvu added the reactivity v2 To be addressed in the rewrite of the solid/reactivity rule label Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reactivity v2 To be addressed in the rewrite of the solid/reactivity rule
Projects
None yet
Development

No branches or pull requests

2 participants