no-implicit-globals regression starting with v21.0.0
scottohara opened this issue · 3 comments
What version of ESLint are you using?
5.11.1
What version of TypeScript are you using?
3.1.1
What version of typescript-eslint-parser are you using?
Any version from 21.0.0 onwards
What code were you trying to parse?
{
"parser": "typescript-eslint-parser",
"rules": {
"func-style": ["error", "declaration"],
"no-implicit-globals": "error"
}
}function foo() {
return "bar";
}
module.exports = foo;What did you expect to happen?
No errors
What happened?
In `typescript-eslint-parser@20.1.1, code passes with no errors.
With `typescript-eslint-parser@21.0.0 onwards, the errors below occur:
1:1 error Implicit global variable, assign as global property instead no-implicit-globalsNote that this error now occurs for both
"parserOptions": { "sourceType": "module" }
and
"parserOptions": { "sourceType": "script" }
@scottohara sourceType is not used by parser, there is opened PR with that #583
This issue has been migrated to the new project here: typescript-eslint/typescript-eslint#23
Thanks!