Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

ter-arrow-parens don't recognize the need of parens #391

Open
Alecell opened this issue May 22, 2020 · 0 comments
Open

ter-arrow-parens don't recognize the need of parens #391

Alecell opened this issue May 22, 2020 · 0 comments

Comments

@Alecell
Copy link

Alecell commented May 22, 2020

I have this case in my code:

const texts = [
  (leadInfos?) => ({
    name: 'Test',
    text: '',
  }),
  (leadInfos) => ({
    name: 'Test',
    text: '',
  }),
  (leadInfos?) => ({
    name: 'Test,
    text: '',
  }),
];

The ter-arrow-parens throws Unexpected parentheses around single function argument having a body with no curly braces. 3 times in sequence, but the parens is required on the first and last case, it should throw this error only on the second case since the ? is used to define conditional parameters.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant