We use both, 'no-extra-parens' and 'no-mixed-operators' rules and
those can conflict. Thus follow eslints recommendation[0] and allow
parenthesis in nestedBinaryExpressions to avoid the linter
complaining either way. Do this also fo enforceForArrowConditionals
as there I saw the issue already in practice for me.
[0]: https://eslint.org/docs/rules/no-mixed-operators#rule-details
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-label": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-label": "error",
- "no-extra-parens": "error",
+ "no-extra-parens": ["error", "all", {
+ "conditionalAssign": false, // useful for if ((match = str.match(/.../))) lines
+ "enforceForArrowConditionals": false,
+ "nestedBinaryExpressions": false,
+ }],
"no-floating-decimal": "error",
"no-implicit-coercion": ["error", { allow: ["!!"] }],
"no-implicit-globals": "error",
"no-floating-decimal": "error",
"no-implicit-coercion": ["error", { allow: ["!!"] }],
"no-implicit-globals": "error",