We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It's a common mistake to reference DOM globals declared in lib.dom.d.ts:
lib.dom.d.ts
function onEvent(e: Event) { event.target; // intended to use `e` instead }
new Event(...)
Event.AT_TARGET
e instanceof Event
document
window
navigator
alert
confirm
prompt
(set|clear)(Timeout|Interval|Immediate)
atob
btoa
console
(session|local)Storage
indexedDB
(request|cancel)AnimationFrame
URL
CSS
print
window.
ts.SymbolFlags.Variable
ts.SymbolFlags.Function
declare var
declare function
Rule name: no-restricted-dom-globals?
no-restricted-dom-globals
Ref: palantir/tslint#3824 which imposes the burden on the user to configure every possible global variable.
The text was updated successfully, but these errors were encountered:
wip: ban-dom-globals
5b71b47
Fixes: #181
ajafff
No branches or pull requests
It's a common mistake to reference DOM globals declared in
lib.dom.d.ts
:lib.dom.d.ts
new Event(...)
,Event.AT_TARGET
ande instanceof Event
document
,window
,navigator
alert
,confirm
,prompt
(should be banned by another rule)(set|clear)(Timeout|Interval|Immediate)
atob
andbtoa
console
(session|local)Storage
indexedDB
(request|cancel)AnimationFrame
URL
,CSS
print
window.
, but is this really desired? The code will work the same but the lint failure is gone afterwards ...lib.dom.d.ts
is included in the programts.SymbolFlags.Variable
orts.SymbolFlags.Function
declare var
anddeclare function
)Rule name:
no-restricted-dom-globals
?Ref: palantir/tslint#3824 which imposes the burden on the user to configure every possible global variable.
The text was updated successfully, but these errors were encountered: