Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

no-implicit-globals regression starting with v21.0.0 #587

Closed
scottohara opened this issue Dec 28, 2018 · 3 comments
Closed

no-implicit-globals regression starting with v21.0.0 #587

scottohara opened this issue Dec 28, 2018 · 3 comments
Labels

Comments

@scottohara
Copy link

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 `[email protected], code passes with no errors.

With `[email protected] onwards, the errors below occur:

1:1  error  Implicit global variable, assign as global property instead  no-implicit-globals
@scottohara
Copy link
Author

Note that this error now occurs for both

"parserOptions": { "sourceType": "module" }

and

"parserOptions": { "sourceType": "script" }

@armano2
Copy link
Contributor

armano2 commented Dec 28, 2018

@scottohara sourceType is not used by parser, there is opened PR with that #583

@JamesHenry
Copy link
Member

This issue has been migrated to the new project here: typescript-eslint/typescript-eslint#23

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants