https://github.com/sindresorhus/eslint-plugin-unicorn/issues/163Go to Github

FundedView inThe `prefer-add-event-listener` rule should not autofix event clearing#163

sindresorhuscreated this issue 13 days ago

These should be reported, but not auto-fixed:

foo.onclick = undefined;
foo.onclick = null;

These need to be handled manually, as removeEventListener requires the listener function be able to unsubscribe.

Logs

Amount funded

$40.00

Resolve this issue and earn $36.00

Fund this issue

Fund as

Payment method

Amount(USD)

Please sign in first to fund this issue

Sign in with

Pull requests

0

    Submit

    URL of your pull request

    Submit your pull request

    Please sign in first to submit a pull request

    Sign in with