Open samuelhorwitz opened 8 years ago
When looking at chains it seems coffeelint is simply verifying that your indentation is a multiple of the indentation level. it isn't checking to see if the dots line up or anything.
That's fair I suppose but I saw a bunch of similar issues that seemed to be related to chaining and indentation but I thought this looked a fairly simple example case that I've encountered. I don't think it's illegitimate to do things like this in which you get your dots to line up and I haven't notice Coffeescript have a problem with it. It is a bit weird to think about how one would lint such a thing.
Chiming in with an identical issue - can we know if this is intended behaviour? I'm using a very old version (1.5.2) that didn't have the error, but it appears upon updating.
I would say the intended behavior is based off the value you assigned for indent. So lining it up based on where the .
is should fail.
I can see why this would be appealing to people, and I would be open to accepting a flag to handle this. Honestly right now though my priorities are probably to fix immediate defined bugs before I go loop back around to this.
Simplest example you can test on the homepage of Coffeelint:
This lints:
This does not lint:
The only difference is the assignee variable name changes from
foo
tofoob
and I indent each chained call by one more space to account for this.