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

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

@Alecell

Description

@Alecell

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions