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
{{ message }}
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
Is your rule for a general problem or is it specific to your development style?
Consider the code
public echo(name: string): void {
return name;
}
// We won't define name (by mistake)
// echo is still called with `window.name`
// In perhaps more than 90% of the cases this is wrong
this.echo(name);
Notice that name argument is not defined. Typescript will use the global defined in lib.dom. This is detailed in microsoft/TypeScript#18433.
What does your suggested rule do?
Warns users about potentially dangerous access to a dom global or undefined variable name.
List several examples where your rule could be used
Additional context
The text was updated successfully, but these errors were encountered:
Rule Suggestion
Is your rule for a general problem or is it specific to your development style?
Consider the code
Notice that
name
argument is not defined. Typescript will use the global defined in lib.dom. This is detailed in microsoft/TypeScript#18433.What does your suggested rule do?
Warns users about potentially dangerous access to a dom global or undefined variable
name
.List several examples where your rule could be used
Additional context
The text was updated successfully, but these errors were encountered: