Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Indent before each chain function call. #4186

Closed
RedTailBullet opened this issue Sep 25, 2018 · 2 comments
Closed

Indent before each chain function call. #4186

RedTailBullet opened this issue Sep 25, 2018 · 2 comments
Labels
Formatting rule Relates to a rule which enforces code formatting and likely overlaps with prettier Resolution: Declined Type: Rule Enhancement Type: Rule Suggestion

Comments

@RedTailBullet
Copy link

Rule Suggestion

Is your rule for a general problem or is it specific to your development style?

It's a development style. However, I would reckon indent before a chain function call will contribute to the readability.

What does your suggested rule do?

Add indent in front of each chain function call.

List several examples where your rule could be used

database.query("user")
  .select(["name", "id"])
  .execute()

The current behavior is:

database.query("user")
.select(["name", "id"])
.execute()

Additional context

@JoshuaKGoldberg
Copy link
Contributor

Unclear if this would be an addition to the align rule, part of whitespace, or its own rule. Also unclear whether TSLint itself should continue to invest in these: #3548 and friends.

@JoshuaKGoldberg
Copy link
Contributor

Per #4534, closing this formatting rule request. If you really need the rule, custom rules are always an option and can be maintained outside this repo!

@JoshuaKGoldberg JoshuaKGoldberg added Formatting rule Relates to a rule which enforces code formatting and likely overlaps with prettier Resolution: Declined and removed Status: In Discussion labels Jul 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Formatting rule Relates to a rule which enforces code formatting and likely overlaps with prettier Resolution: Declined Type: Rule Enhancement Type: Rule Suggestion
Projects
None yet
Development

No branches or pull requests

2 participants