-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
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
[strict] False positive for modules that don't export #58
Comments
@bradzacher i will take a look ono this, but i think issue is in |
ok i did some testing and sourceType is not properly set in https://github.com/eslint/typescript-eslint-parser/blob/master/parser.js#L74 |
@mockdeep i make a PR for this eslint/typescript-eslint-parser#583 |
@armano2 excellent, thanks! |
Should have a test case added to the plugin if this is fixed. |
It was already fixed. See typescript-eslint/typescript-eslint#58
Repro
If I have a file that has no exports and I have
sourceType: module
, it still reports a failure on thestrict
rule. I import the file for its global side effects.Expected Result
No linter error should be reported.
Actual Result
Additional Info
This works as expected if I change the file to be
js
, so seems to be something related to changing it tots
.Versions
eslint-plugin-typescript
0.13.0
typescript-eslint-parser
17.0.1
typescript
2.9.3
The text was updated successfully, but these errors were encountered: