indent - option to ignore ternary expressions #8725
Labels
archived due to age
This issue has been archived; please open a new issue for any further discussion
enhancement
This change enhances an existing feature of ESLint
evaluating
The team will evaluate this issue to decide whether it meets the criteria for inclusion
rule
Relates to ESLint's core rules
The
indent
rule supports ignoring many expression types using anoff
option, such as MemberExpression, FunctionDeclaration, CallExpression, etc.It would be helpful if it could be similarly configured to ignore ternary expressions.
For example, I prefer a style for multi-line ternaries that is currently considered invalid by the
indent
rule:I tried the
flatTernaryExpressions
setting, but the indentation was still reported as incorrect.Speaking of which, the
flatTernaryExpressions
setting seems quite out of place compared to the format of the other settings. Perhaps it could be replaced with one namedConditionalExpression
(to match the name of the AST node) with optionsoff
,flat
, etc?Info on my environment:
The text was updated successfully, but these errors were encountered: