Skip to content

Inconsistent prop access restriction #197

@elsassph

Description

@elsassph

Describe the bug

Inside an effect, the restriction to pass a callback reading a prop is inconsistent.

To Reproduce

createEffect(() => {
    doSomething(() => props.toggle); // <-- solid/reactivity
    
    const toggle = () => props.toggle; // OK
    doSomething(toggle); // OK

Expected behavior

Either both are OK or both aren't.

Screenshots

Environment (please complete the following information):

  • OS: [e.g. Mac OS 11, Windows 10]
  • Node version (node --version):
  • eslint-plugin-solid version (npm list eslint-plugin-solid/yarn why eslint-plugin-solid): 0.14.5
  • eslint version (npm list eslint/yarn why eslint): 8.57.1

Additional context

  • I would be willing to contribute a PR to fix this issue

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions