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

Proposal: New line per chained call #799

Closed
tunnckoCore opened this issue Feb 21, 2017 · 2 comments

Comments

@tunnckoCore
Copy link

commented Feb 21, 2017

Digging more and more in ESLint rules, i found some good ones which enforces good style and more readable code. This issue is for newline-per-chained-call rule - not fixable.

Suggested configuration.

{
  "newline-per-chained-call": "error"
}

In the rule page is shown great example of diff and why it is more readable and clean. It reminds me to one other rule, but can't remember what it was. I also seen discussion in some issues here about that is's better.

Invalid

d3.select("body").selectAll("p").style("color", "blue")

Valid

d3
  .select("body")
  .selectAll("p")
  .style("color", "blue")

Very good for git diffs.

@feross

This comment has been minimized.

Copy link
Member

commented Feb 21, 2017

Duplicate: #720

@feross feross closed this Feb 21, 2017

@tunnckoCore

This comment has been minimized.

Copy link
Author

commented Feb 21, 2017

Doh, sorry than, it seems that was the issue which i read, haha. :) Great.

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.