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

solid/reactivity does not track imported signals #127

Open
1 task
CreativeTechGuy opened this issue Feb 1, 2024 · 0 comments
Open
1 task

solid/reactivity does not track imported signals #127

CreativeTechGuy opened this issue Feb 1, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@CreativeTechGuy
Copy link
Contributor

CreativeTechGuy commented Feb 1, 2024

Describe the bug

I am making SolidJS libraries for my organization. Some of the exports from this library are Signals. These signals aren't caught in the ESLint rule when using them improperly.

Note, this also applies to any other imported signal, even from within the same package.

To Reproduce

  • Create one file which calls createSignal and export the created signal.
  • Create another file which is a component that uses that imported signal improperly.

Expected behavior

In a perfect world, the ESLint rule would follow imports to find out which objects are signals. This could also possibly be accomplished via TypeScript type checking for Accessor types. But more realistically, it'd be great if the rule could be configured where we can manually list names of methods which should be treated as signals always.

Screenshots

Environment (please complete the following information):

  • OS: Windows 11
  • Node version (node --version): Node 20
  • eslint-plugin-solid version (npm list eslint-plugin-solid/yarn why eslint-plugin-solid): 0.13.1
  • eslint version (npm list eslint/yarn why eslint): 8.56.0

Additional context

N/A

  • I would be willing to contribute a PR to fix this issue
@CreativeTechGuy CreativeTechGuy added the bug Something isn't working label Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants