no-unneeded-ternary with arrow function results in parsing error #11579
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
bug
ESLint is working incorrectly
rule
Relates to ESLint's core rules
What version of eslint?
5.16.0
What operating system, Node.js, and npm version?
Mac OS X Mojave ⬢ 8.11.2 📦 5.6.0
What parser (default, Babel-ESLint, etc.) are you using?
babel-eslint 9.0.0
Using the
no-unneeded-ternary
rule.When formatting code that is using a ternary like below, the function is not wrapped, causing a parse error and fails.
Causes this error
EXPECTED
Please show your full configuration:
I am using standardJS 12.0.1, which sets the config as follows:
Are you willing to submit a pull request to fix this bug?
Tbh I wouldn't know where to start, sorry.
Originally opened this in standardJS repo but seems like an eslint issue so re-opening here.
standard/standard#1266
The text was updated successfully, but these errors were encountered: