-
-
Notifications
You must be signed in to change notification settings - Fork 421
Open
Description
A lot of types in the wild are either only set on Window or differ between window.* and globalThis.*. These types are wrong, but they do come up when this rule is applied.
There are a few ways that this rule can help with the migration:
- disable the rule's auto-fix in TS files
- extend the message to specify how to specify the type
- suggest solutions in the rule's readme
Examples:
prefer-global-thisshould allowwindow.setTimeout()andsetInterval()#2482- Disable
no-varonglobals.d.tsxojs/eslint-config-xo-typescript#91 prefer-global-thisshould ignoretypeof window === 'undefined'#2468
Originally posted by @fregante in #2482 (comment)
cakkypamucm