-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix DOM Event
lint global false positive and access all window props explicitely
#1756
Conversation
Thanks for the specific fix in #1755 to alert about this general problem. |
Event
lint global false positive and access all window props explicitely
This has us have wrong positives, like "Event" not defined in effect
Seems like the check for Node require is breaking this. |
a826118
to
40bd49c
Compare
latest commit should fix node require, but needs to be used everywhere where we need |
|
@tchakabam it might also be possible to inject the window replacement with the webpack imports loader automatically https://github.com/webpack-contrib/imports-loader |
Actually if we are not supporting node why do we need to use 'self'? |
@tjenkinson For workers. As explained in the PR description. |
@tjenkinson If you see a use-case for injecting an own |
Interesting webpack plugin btw ;) |
@tchakabam had a go here #1769 |
This PR will...
Acknowledged the issue that was addressed here: #1755 ...
Fix a few false positives of linter browser-env globals for
Event
, which is supposed to be our event enum, but linter thought was the DOM Event constructor.For code safety measure, remove all preset and custom globals from our eslint config
Only access window globals explicitely everyhwere (yes), since this is the only way to write (almost) safe code in the end
Add a
lint:quiet
script to only show fatal errors in eslint outputMask the
window
global explicitely withself
for transparent use of that scope in modules that are imported by both worker and main threads.Why is this Pull Request needed?
Are there any points in the code the reviewer needs to double check?
Resolves issues:
Event
not defined indecryptor
andadts
demuxer, which was causing error events not to be triggered in effect.Checklist