@kununu/eslint-config 5.4.0 → 5.4.1-beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -207,7 +207,8 @@ const baseRules = {
|
|
|
207
207
|
'no-restricted-syntax': ['error',
|
|
208
208
|
{
|
|
209
209
|
selector: 'ReturnStatement > LogicalExpression[operator="&&"]',
|
|
210
|
-
message: 'Prefer early returns over logical expressions in return statements. Use if (condition) return value; instead.'
|
|
210
|
+
message: 'Prefer early returns over logical expressions in return statements. Use if (condition) return value; instead.',
|
|
211
|
+
filter: "node.right.type !== 'BinaryExpression' && node.right.type !== 'Literal' && node.right.type !== 'UnaryExpression' && node.right.type !== 'LogicalExpression'"
|
|
211
212
|
},
|
|
212
213
|
{
|
|
213
214
|
selector: 'ReturnStatement > SequenceExpression LogicalExpression[operator="&&"]',
|