Skip to content

eslint-plugin-qwik finds most everything "not serializable" #685

@kylecordes

Description

@kylecordes

Qwik Version

0.0.30

Operating System (or Browser)

OSX, doesn't matter

Node Version (if applicable)

16, doesn't matter

Which component is affected?

Starters / CLI

Expected Behaviour

eslint-plugin-qwik has correct understanding of what data is serializable

Actual Behaviour

eslint-plugin-qwik seems to think most/all interfaces are not serializable. Example output:

/Users/kcordes/projects/Qwik/repro-qwik-lint-error/src/components/footer/footer.tsx
  23:15  error  Identifier ("todos") can not be captured inside the scope (onClick$) because it is an instance of the "Todos" class, which is not serializable. Check out https://qwik.builder.io/docs/advanced/optimizer for more details  qwik/valid-lexical-scope
  49:19  error  Identifier ("todos") can not be captured inside the scope (onClick$) because it is an instance of the "Todos" class, which is not serializable. Check out https://qwik.builder.io/docs/advanced/optimizer for more details  qwik/valid-lexical-scope
  49:33  error  Identifier ("todos") can not be captured inside the scope (onClick$) because it is an instance of the "Todos" class, which is not serializable. Check out https://qwik.builder.io/docs/advanced/optimizer for more details  qwik/valid-lexical-scope

Additional Information

(I chose the starter as component because it is easy to reproduce)

To reproduce:

npm init qwik@latest

Choose the TODO app. cd in. npm i. then npm run lint

Linting fails with many messages similar to "Identifier ("todos") can not be captured inside the scope (onClick$) because it is an instance of the "Todos" class, which is not serializable. Check out https://qwik.builder.io/docs/advanced/optimizer for more details"

Metadata

Metadata

Assignees

No one assigned

    Labels

    TYPE: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions