Unexpected indentation with chaining, 2.0.3
Closed this issue · 4 comments
bazineta commented
Assume that Fetch
is an imported module, with a couple of useful functions, maps
and fail
.
The following will lint cleanly:
Fetch.maps()
.then (maps) -> # omitted for brevity
.done (maps) -> # omitted for brevity
.fail (error) -> # omitted for brevity
But the following will not, and results in an unexpected indentation error on the .fail
line:
Fetch.maps()
.then (maps) -> # omitted for brevity
.done (maps) -> # omitted for brevity
.fail Fetch.fail
Basically, so long as the chained function is inline, it lints, but not if the function isn't inline.
This seems to be a regression; the issue doesn't occur in 1.16.0.
swang commented
Thanks. Published 2.0.5 to fix this issue.
bazineta commented
Tested with 2.0.5; still seeing the same issue. Here's a passing test:
'click @ui.collapse': ->
@getChildView('json').hide
self: false
tree: true
return
But this one will fail on the .search
line:
'change @ui.search': ->
@getChildView('json')
.hide
self: false
tree: true
.search @ui.search.val()
return
swang commented
published 2.0.6 to address this issue
bazineta commented
Resolved. Thanks!