This rule enforces the use of globalThis over environment-specific global object aliases like window, self, and global.
globalThis is the standard way to access the global object across all JavaScript environments.
Using window, self, or global ties your code to specific environments (browser, web worker, or Node.js).
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
If you are targeting a specific environment and want to make that explicit in your code, you might choose to use environment-specific globals.
Additionally, some older environments may not support globalThis, though polyfills are available.