-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Suggestion for indent rule #26
Comments
Excellent! Could you provide an example of “incorrectly” indented code that this change would permit? |
The second call expression has a "callee" which is also a call expression, therefore the indentation rule is ignored there. |
Perfect. Would you like to submit a pull request? |
I don't mind doing it, but I don't have time for it now. I will definitely get to it some day, though. :) However, seeing as we'll have to reach an agreement on the other directives: https://eslint.org/docs/rules/indent#options, and as you probably already have opinions on those, it might be faster for you to come up with the rules yourself. You can simply add the |
Sanctuary actually specifies a custom Do you still think this is worth undertaking, or is the solution too inelegant and potentially unreliable? |
We recently started using
add (21) (21)
style call expressions at work, and I came up with the followingindent
rule to facilitate it:The magic is in the
ignoreNodes
rule. It says that any CallExpression calling another CallExpression doesn't need to follow indentation rules.There are many other directives that can be added to the
indent
rule options to further customize the rules, but they are not relevant to this example.The text was updated successfully, but these errors were encountered: