-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinghas prthere is a PR raised to close thisthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
Repro
{
"rules": {
"no-extra-parens": 0,
"@typescript-eslint/no-extra-parens": 2
}
}
// type of requestInit is native RequestInit from lib.dom.d.ts
let cookies = (<Headers> requestInit.headers).get('Cookie')
Expected Result
No error
Actual Result
Got error Unnecessary parentheses around expression.eslint(@typescript-eslint/no-extra-parens)
and be changed to below if run eslint --fix
let cookies = <Headers> requestInit.headers.get('Cookie')
Additional Info
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
1.13.0 |
@typescript-eslint/parser |
1.13.0 |
TypeScript |
3.5.3 |
ESLint |
6.1.0 |
node |
10.16.0 |
npm |
6.9.0 |
nicolashenry
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghas prthere is a PR raised to close thisthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin