This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 885
space-before-function-paren
doesn't detect anonymously exported function correctly
#3040
Comments
exported function declarations cannot be anonymous, the grammar doesn't allow that. You should get an error from the typescript compiler. That's why tslint treats this function as |
@ajafff but this is correct TS code with some compiler flags. I think TSLint should handle that. Correct me if I am wrong. |
What flag(s) do you mean? I haven't noticed anything like this before... |
Sorry. That's working w/o any flags. I updated my first message. https://www.typescriptlang.org/docs/handbook/modules.html
|
Yeah, the default export makes sense. This is a bug. It should be handled like other anonymous functions. |
Looks like I found fix, but can't run |
IllusionMH
added a commit
to IllusionMH/tslint
that referenced
this issue
Jul 18, 2017
4 tasks
jkillian
pushed a commit
that referenced
this issue
Jul 19, 2017
HyphnKnight
pushed a commit
to HyphnKnight/tslint
that referenced
this issue
Apr 9, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug Report
v5.5.0
v2.4.1
TypeScript code being linted
with
tslint.json
configuration:Actual behavior
Got the error
Spaces before function parens are disallowed
.Expected behavior
No error expected here.
The text was updated successfully, but these errors were encountered: