Closed jdforsythe closed 8 years ago
I want to enforce no spaces after function or the name of the function.
function
function() {} function a() {}
I want to enforce spaces before and after the star for generators.
function * () {} function * a() {}
I have the rules:
{ "disallowSpacesInFunction": { "beforeOpeningRoundBrace": true }, "requireSpacesInGenerator": { "beforeStar": true, "afterStar": true } }
Everything works as expected except the anonymous generator function * () {} which errors on the disallowSpacesInFunction. I think I need something like:
function * () {}
disallowSpacesInFunction
{ "disallowSpacesInFunction": { "beforeOpeningRoundBrace": { "allExcept": [ "anonymousGenerators" ] } } }
Is there a workaround for this? Or some rule I'm missing to make this work?
Not 100% on this, but i don't think there is such workaround and at this point, we are not committed to adding new features, sorry
I want to enforce no spaces after
function
or the name of the function.I want to enforce spaces before and after the star for generators.
I have the rules:
Everything works as expected except the anonymous generator
function * () {}
which errors on thedisallowSpacesInFunction
. I think I need something like:Is there a workaround for this? Or some rule I'm missing to make this work?