This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
False positive for no-restricted-globals rule #350
Closed
Description
What version of TypeScript are you using?
2.4.1
What version of typescript-eslint-parser
are you using?
4.0.0
What code were you trying to parse?
type foo = {
location: any;
};
and in my ESLint config:
{
rules: {
'no-restricted-globals': [2, 'location'],
},
}
What did you expect to happen?
No error
What happened?
Unexpected error [eslint] Unexpected use of 'location'. (no-restricted-globals)
.
My understanding of this ESLint rule is it should only complain if the global identifier is used as an expression. http://eslint.org/docs/rules/no-restricted-globals