Skip to content

False positives with rule no-static-element-interactions and drag and drop handlers? #980

Open
@Evertvdw

Description

@Evertvdw

Hello there! I just started using this ESLint extension, and I noticed it is flagging a lot of stuff of which I doubt is valid.

I have HTML like:

<div
  @dragover="dragOver"
  @dragleave="dragLeave"
  @dragenter="preventDefault"
  @drop="onDrop"
>

Which will trigger the rule no-static-element-interactions but is that correct? I cannot put a role attribute on this element because there is no role for an element being a valid dropping target. I can of course just ignore that rule in this case but I'm raising the issue here because maybe some event listeners should be excluded from triggering this rule, like the 4 above here.

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