Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unintentional difference in promise-style indentation #326

Open
rstacruz opened this issue Aug 25, 2014 · 3 comments
Open

Unintentional difference in promise-style indentation #326

rstacruz opened this issue Aug 25, 2014 · 3 comments

Comments

@rstacruz
Copy link

rstacruz commented Aug 25, 2014

Placing .then in a.then(b) in the same indent level of a produces different results in jashkenas/coffee-script vs redux.

$.get('/notifications')
.then ->
  $.post('/notifications/read')
.then (result) ->
  alert result

jashkenas/coffee-script:

$.get('/users').then(function(data) {
  return $.post('/users', data);
}).then(function(result) {
  return alert(result);
});

Redux:

Syntax error on line 4, column 0: unexpected '.' (\u002E)
1 : $.get('/users')
2 : .then (data) ->
3 : $.post('/users', data)
4 : .then (result) ->
^ :~^
5 : alert(result)

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/4031307-unintentional-difference-in-promise-style-indentation?utm_campaign=plugin&utm_content=tracker%2F33145&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F33145&utm_medium=issues&utm_source=github).
@eddiemonge
Copy link

I get this as well

@19h
Copy link

19h commented Oct 11, 2014

Redux doesn't allow variable indentation anymore. Check if you're using space & tabs combined by accident.

@lordnox
Copy link

lordnox commented Apr 12, 2016

I do have this problem as well (see: #22)

I did make sure to just have 2-spaces for indentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants