Skip to content

Commit ba4547e

Browse files
fix(no-extra-parens): use typescript version of rule when in typescript (#867)
1 parent e526697 commit ba4547e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/configs/typescript.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const baseConfig: Linter.Config = {
1212
"dot-notation": "off",
1313
"indent": "off",
1414
"no-constant-condition": "off",
15+
"no-extra-parens": "off",
1516
"no-loop-func": "off",
1617
"no-loss-of-precision": "off",
1718
"no-shadow": "off",

src/plugins/typescript.ts

+7
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ export const settings: Linter.Config = {
107107
ignoreVoidOperator: true,
108108
},
109109
],
110+
"@typescript-eslint/no-extra-parens": [
111+
"error",
112+
"all",
113+
{
114+
nestedBinaryExpressions: false,
115+
},
116+
],
110117
"@typescript-eslint/no-invalid-void-type": "error",
111118
"@typescript-eslint/no-loop-func": "error",
112119
"@typescript-eslint/no-loss-of-precision": "error",

0 commit comments

Comments
 (0)