[gjs: 1/2] CI: Tweak eslint rule for unneeded parentheses



commit c56e46c23abb29d23af6a13f89a1fa80845df488
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Oct 17 13:39:50 2019 +0200

    CI: Tweak eslint rule for unneeded parentheses
    
    We disallow parentheses that don't affect precedence, but in nested expressions
    they can improve clarity:
    
     foo === 42 || (foo === 23 && bar) || baz
    
     scale = (availHeight / nElements) / elementHeight;
    
    Relax the rules a bit to allow for that bit of flexibility.

 .eslintrc.yml | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/.eslintrc.yml b/.eslintrc.yml
index 53d5fbd3..3af41050 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -87,6 +87,7 @@ rules:
     - error
     - all
     - conditionalAssign: false
+      nestedBinaryExpressions: false
       returnAssign: false
   no-implicit-coercion:
     - error


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]