8000 Future of `no-not-function-handler` · Issue #903 · sveltejs/eslint-plugin-svelte · GitHub
[go: up one dir, main page]

Skip to content
Future of no-not-function-handler #903
Closed
@marekdedic

Description

@marekdedic

Hi, the rule no-not-function-handler is used in Svelte 4 for checking that event callbacks are functions. In Svelte 5, event callbacks are regular props. I think the rule shouldn't be ported to this new event system for several reasons:

  1. You can't really tell which prop is an event callback
  2. Passing non-functions to props which expect a callback is like passing any wrongly typed prop, sou should be caught if you are using TypeScript (and if you are not... well that's your choice, this is exactly the kind of issue that TypeScript was built for...)

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0