-
-
Notifications
You must be signed in to change notification settings - Fork 5k
multiline-ternary doesn't check parentheses #13195
Copy link
Copy link
Closed
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyESLint is working incorrectlyruleRelates to ESLint's core rulesRelates to ESLint's core rules
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyESLint is working incorrectlyruleRelates to ESLint's core rulesRelates to ESLint's core rules
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using?
Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
Online Demo
What did you expect to happen?
It might be expected that parentheses should be treated as a part of the node, so in this case the rule should report that there's a missing newline between test and consequent.
Some rules work that way (e.g.,
array-element-newline), some don't (function-call-argument-newline), so I'm not sure if this is a bug.What actually happened? Please include the actual, raw output from ESLint.
no errors
Are you willing to submit a pull request to fix this bug?
yes
The example was with
"always", but the same issue exists with"always-multiline"and"never".