Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 631 Bytes

no-extra-parens.md

File metadata and controls

22 lines (15 loc) · 631 Bytes

disallow unnecessary parentheses (no-extra-parens)

This rule restricts the use of parentheses to only where they are necessary.

Rule Details

This rule extends the base eslint/no-extra-parens rule. It supports all options and features of the base rule plus TS type assertions.

How to use

{
    // note you must disable the base rule as it can report incorrect errors
    "no-extra-parens": "off",
    "@typescript-eslint/no-extra-parens": ["error"]
}

Options

See eslint/no-extra-parens options.