-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Immediately-invoked function expressions are an error in the linter #600
Comments
I assume this is in a JS file. Do you have an linter jshint, eslint, jscs enabled? if yes you should file it against the corresponding linter. |
@thomas-jeepe ping:
|
Sorry, didn't get the notifications. I haven't configured a linter at all, used the one out of the box, It was originally in a flowtype file where I got the error, I just tried it in js file and I got the error. Looks like it is after an es6 import statement without semicolons // lints fine
var ONE = (function(a){return 1}())
// lints fine
(function(a){return 1}())
// lints fine
import blah from 'blah';
(function(a){return 1}())
// errors
import blah from 'blah'
(function(a){return 1}()) |
@thomas-jeepe Thank you for getting back to us. I can reproduce, I also get squigglies when the semicolon is missing. |
This is either an issue with the TypeScript compiler or specified as that. See TS playground for reference: http://www.typescriptlang.org/Playground#src=%2F%2F%20errors%0D%0Aimport%20blah%20from%20'blah'%0D%0A(function%20(a)%20%7B%20return%201%20%7D%20())%0D%0A |
This issue was moved to microsoft/TypeScript#5931 |
In case you don't know what that thing is.
This code
(function(){})()
is an error in the linter despite being perfectly valid, it says string literal expected.I also want to say, the intellisense on the editor is amazing and I can't wait for jsx support :)
The text was updated successfully, but these errors were encountered: