coffeelint icon indicating copy to clipboard operation
coffeelint copied to clipboard

Parens|bracket|curly spacing

Open eddiemonge opened this issue 9 years ago • 6 comments

Is there something else that can warn|error about incorrect spacing around parens? Basically to enforce a style guide.

bad:
hello('there')

good:
hello( 'there' )

eddiemonge avatar Sep 05 '14 23:09 eddiemonge

Nothing exists yet, but PRs are always welcome. I think this would be a nice rule to have and #424 is another case it could over.

AsaAyers avatar May 16 '15 17:05 AsaAyers

It looks like a foundation for this was started in #376. I would personally like a bracket_spacing rule in my project, so I'd be glad to take a stab at abstracting the braces_spacing rule and making a PR for a bracket_spacing rule within the next few days.

macklinu avatar Oct 22 '15 20:10 macklinu

Hi, not sure if you're already working on the PR for bracket_spacing or not but I wouldn't mind adding this to coffeelint. Feel free to submit a PR for it. Thanks.

swang avatar Oct 27 '15 19:10 swang

@swang awesome, I'll still gladly give it a shot! I'll put up a PR for brackets_spacing by the end of this coming weekend.

Would it also make sense to have a parens_spacing rule in that PR, another PR, or not at all?

macklinu avatar Oct 27 '15 20:10 macklinu

I would accept paren_spacing as another rule, yes. Better also to have separate PRs for it.

swang avatar Oct 27 '15 20:10 swang

I originally thought these changes would just take some abstracting of the braces_spacing rule, but it's a little bit more complicated than that, at least with my understanding of Coffeescript. I've tried out a couple of solutions but don't think they are particularly nice, so I'll give it another shot this week.

macklinu avatar Nov 04 '15 20:11 macklinu