yoggydY
Denoβ€’17mo agoβ€’
2 replies
yoggyd

how to disable no-window rule

adding it to "no-window" to deno.json.lint.exclude does not work.

While I can appreciate the sentiment behind this rule and using globalThis should be preferred there is apparently no way for globalThis to be extended in ambient contexts - i.e. when you're writing a library and want to attach something to globalThis without having to assert its type every time. So using window is afaik the only way to achieve this and having deno tell me "hey, window won't be available" is not helpful here... especially when I know that it will be available.
Was this page helpful?