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

indent: Control ternary expressions indentation #293

Open
3 of 4 tasks
djibarian opened this issue Mar 11, 2024 · 0 comments
Open
3 of 4 tasks

indent: Control ternary expressions indentation #293

djibarian opened this issue Mar 11, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@djibarian
Copy link

Clear and concise description of the problem

So far I can't find a way of defining the indent of a ternary expression like this:

foo ?
bar :
paz

Whether it can be disabled completely with ignoredNodes: ['ConditionalExpression'] or written as

foo ?
    bar :
    paz

Suggested solution

Add a new option "ConditionalExpression" (default: 1) to be able to control the indentation of the ternary expression. For the case above it could be set to 0. This would align with other options like "SwitchCase" or "MemberExpression".

Alternative

No response

Additional context

No response

Validations

Contributes

  • If this feature request is accepted, I am willing to submit a PR to fix this issue
@djibarian djibarian added the enhancement New feature or request label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant