Urara-Blog/node_modules/.pnpm-store/v3/files/bd/3bb898c30290444e8f833d421fd014ae5a6e897ab690d4f5d15b56633217769b5a372cae7ff56d7c67a60258920dc0e4a75293c0fdb9fbf8aefcb8e6b61838
2022-08-14 01:14:53 +08:00

32 lines
812 B
Text

---
description: 'Disallow unnecessary parentheses.'
---
> 🛑 This file is source code, not the primary documentation location! 🛑
>
> See **https://typescript-eslint.io/rules/no-extra-parens** for documentation.
## Rule Details
This rule extends the base [`eslint/no-extra-parens`](https://eslint.org/docs/rules/no-extra-parens) rule.
It adds support for TypeScript type assertions.
## How to Use
```jsonc
{
// 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](https://eslint.org/docs/rules/no-extra-parens#options).
<sup>
Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/no-extra-parens.md)
</sup>