Similar to #2252 but on unicorn/no-invalid-remove-event-listener
Rule works correctly without optional chaining:
However with optional chaining stops reporting error:
this.input?.removeEventListener(event, this.onInputEvent.bind(this), true)
Can be easily tested by adding ?
after el
: https://github.com/sindresorhus/eslint-plugin-unicorn/blob/f0ff04d/test/no-invalid-remove-event-listener.mjs#L49
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too