This repository has been archived by the owner. It is now read-only.

jscs --fix breaks async function declarations #1873

Closed
jaredly opened this Issue Oct 16, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@jaredly

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

This comment has been minimized.

Show comment
Hide comment
@hzoo

hzoo Oct 16, 2015

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@hzoo

hzoo Oct 16, 2015

Member

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)

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

This comment has been minimized.

Show comment
Hide comment
@hzoo

hzoo Oct 17, 2015

Member

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

I highly doubt anyone is using SpacesInNamedFunctionExpression, SpacesInAnonymousFunctionExpression

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 added a commit to hzoo/node-jscs that referenced this issue Oct 17, 2015

hzoo added a commit to hzoo/node-jscs that referenced this issue Oct 17, 2015

hzoo added a commit to hzoo/node-jscs that referenced this issue Oct 17, 2015

hzoo added a commit to hzoo/node-jscs that referenced this issue Oct 17, 2015

hzoo added a commit to hzoo/node-jscs that referenced this issue Oct 17, 2015

@hzoo hzoo closed this in #1878 Oct 17, 2015

@hzoo

This comment has been minimized.

Show comment
Hide comment
@hzoo

hzoo Oct 17, 2015

Member

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

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.