[gjs: 28/43] CI: Add extra patterns to no-unused-vars



commit c6d4a3fb3596e9fce28433001b5a76b563758f38
Author: Philip Chimento <philip chimento gmail com>
Date:   Tue Aug 13 21:22:38 2019 -0700

    CI: Add extra patterns to no-unused-vars
    
    This allows using underscores as we do in gnome-shell and other code
    bases.

 .eslintrc.yml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/.eslintrc.yml b/.eslintrc.yml
index 5fe95ec0..efc7bb86 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -100,7 +100,9 @@ rules:
   no-trailing-spaces: error
   no-unused-vars:
     - error
-    - varsIgnorePattern: ^unused
+    # Vars use a suffix _ instead of a prefix because of file-scope private vars
+    - varsIgnorePattern: (^unused|_$)
+      argsIgnorePattern: ^(unused|_)
   nonblock-statement-body-position:
     - error
     - below


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