coffeelint
coffeelint copied to clipboard
Parens|bracket|curly spacing
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' )
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.
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.
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 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?
I would accept paren_spacing
as another rule, yes. Better also to have separate PRs for it.
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.