You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a tight code it is much less obvious, and easy to miss. This is especially problematic in React apps where event would actually correspond to something completely different than the synthetic event React is sending.
The problem is our ESLint configuration currently doesn't report event as an undefined variable because it's friendly to legacy code that may rely on it. We should figure out how to force it to treat undefined event as an undefined variable, and fail the build like we do for any other undefined variables. People who rely on it can always use window.event to be explicit.
The text was updated successfully, but these errors were encountered:
Just saw @kittens bump into this in the office the other day:
Guess what
event
is. A browser global (thanks IE).In a tight code it is much less obvious, and easy to miss. This is especially problematic in React apps where
event
would actually correspond to something completely different than the synthetic event React is sending.The problem is our ESLint configuration currently doesn't report
event
as an undefined variable because it's friendly to legacy code that may rely on it. We should figure out how to force it to treat undefinedevent
as an undefined variable, and fail the build like we do for any other undefined variables. People who rely on it can always usewindow.event
to be explicit.The text was updated successfully, but these errors were encountered: