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.
2 Replies
The top level exclude field is for excluding files. You probably meant to set
lint.rules.exclude
instead of lint.exclude
. See an example of that here https://docs.deno.com/runtime/fundamentals/configuration/#lintingdang it, thx