Open
Bug 1348940
Opened 8 years ago
Updated 2 years ago
mozilla/no-useless-removeEventListener should also work for addEventListener/removeEventListener globals
Categories
(Developer Infrastructure :: Lint and Formatting, enhancement, P3)
Developer Infrastructure
Lint and Formatting
Tracking
(Not tracked)
NEW
People
(Reporter: Gijs, Unassigned)
References
Details
For code that looks like this:
addEventListener("foo", function bar() {
removeEventListener("foo", bar);
});
like in https://dxr.mozilla.org/mozilla-central/rev/1b9293be51637f841275541d8991314ca56561a5/browser/components/preferences/in-content/preferences.js#53-56 , no warning is given. When I changed the code to use document.* listeners instead, eslint complained. This caught me out in bug 1348623 (happily, on try rather than when landing).
The eslint plugin should catch the global variant, too.
Updated•8 years ago
|
Priority: -- → P3
Updated•7 years ago
|
Product: Testing → Firefox Build System
Updated•3 years ago
|
Product: Firefox Build System → Developer Infrastructure
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•