Closed
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Playground Link
Repro Code
class EventEmitter { }
// @typescript-eslint/no-extra-parens: Unnecessary parentheses around expression
class _TypedEventEmitter extends (EventEmitter as any) { }
// error on following line:
class TypedEventEmitter2 extends EventEmitter as any { }
ESLint Config
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/strict"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": "./"
},
"root": true,
"rules": {
"@typescript-eslint/no-extra-parens": "warn"
}
}
tsconfig
Expected Result
no-extra-parens should not occur on this line because the parentheses are needed.
Actual Result
After applying rule there is an error.
Additional Info
No response
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
5.36.2 |
@typescript-eslint/parser |
5.36.2 |
TypeScript |
4.8.3 |
ESLint |
8.23.0 |
node |
18.11.0 |