Closed Bug 1504890 Opened 2 years ago Closed 2 years ago

eslint: Restrict usage of the event global


(Firefox Build System :: Lint and Formatting, enhancement, P1)

65 Branch


(firefox65 fixed)

Tracking Status
firefox65 --- fixed


(Reporter: mstriemer, Assigned: mstriemer)




(2 files)

In bug 1493869 the `event` global was restricted to only being available on Nightly, if you accidentally use it then your code will work until it hits Beta.

Marionette uses an event global a lot, but I believe it defines its own event object.

There are two other spots where restricting the event global will fail, one is certainly a bug and should now be fixed (bug 1504725) and another I just identified and I'm not sure if it's a bug (bug 1496782).

Test try run:
The event global is only available on Nightly so it should not be used.
The about:performance case is fixed in bug 1505031, this should be okay to land now.

Mark, does it seem okay to land this now? I'm not sure of the process for new rules like this.
Flags: needinfo?(standard8)
I think this is fine to deploy now. At this stage it is really a correctness issue to stop mistakes than a policy.

Can you just modify the version number at the top of:

- tools/lint/eslint/eslint-plugin-mozilla/package.json
- tools/lint/eslint/eslint-plugin-mozilla/package-lock.json

Just bumping from "0.16.1" to "0.16.2" will be fine, it lets me publish a new version.
Flags: needinfo?(standard8)
Summary: Restrict usage of the event global → eslint: Restrict usage of the event global
Yes please.
Pushed by
Restrict usage of event global r=Standard8,ahal
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
See Also: → 1504725, 1505031
You need to log in before you can comment on or make changes to this bug.