Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

jscs --fix breaks async function declarations #1873

Closed
jaredly opened this issue Oct 16, 2015 · 4 comments · Fixed by #1878
Closed

jscs --fix breaks async function declarations #1873

jaredly opened this issue Oct 16, 2015 · 4 comments · Fixed by #1878

Comments

@jaredly
Copy link

jaredly commented Oct 16, 2015

const a = async function() {}

becomes

const a = asyncfunction() {}

which is a syntax error

@hzoo hzoo added the bug label Oct 16, 2015
@hzoo
Copy link
Member

hzoo commented Oct 16, 2015

This is on latest right? Also what rules do you have on? Probably (disallow|require)SpacesInFunctionExpression - seems similar to #1637

@hzoo
Copy link
Member

hzoo commented Oct 16, 2015

Ok but in #1745 (comment) - that PR didn't apply the fixes to the other rules - only FunctionExpression so that's probably what happened.

So we just need to apply the #1745 fixes to the other rules I mentioned (I want to merge those rules, hopefully in 3.0)

@hzoo hzoo added this to the 2.4.0 milestone Oct 16, 2015
@hzoo
Copy link
Member

hzoo commented Oct 17, 2015

Yeah there's so much duplication in those rules @mrjoelkemp. SpacesInNamedFunctionExpression, SpacesInAnonymousFunctionExpression, and SpacesInFunction, SpacesInFunctionExpression, SpacesInFunctionDeclaration

I highly doubt anyone is using SpacesInNamedFunctionExpression, SpacesInAnonymousFunctionExpression

@hzoo
Copy link
Member

hzoo commented Oct 17, 2015

Might as well fix it now - should be fixed in 2.3.3. Thanks for the report @jaredly!

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

Successfully merging a pull request may close this issue.

2 participants