Skip to main content

Disallow unnecessary parentheses (no-extra-parens)

Rule Details

This rule extends the base eslint/no-extra-parens rule. It adds support for TypeScript 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.

Taken with โค๏ธ from ESLint core

Attributes

  • โœ… Recommended
  • ๐Ÿ”ง Fixable
  • ๐Ÿ’ญ Requires type information