[gjs: 2/3] linter: Allow _init in modules/overrides



commit 547144172b0e2f685da98eb0854cc1a80e2e2747
Author: Philip Chimento <philip chimento gmail com>
Date:   Sun Mar 18 00:21:36 2018 -0700

    linter: Allow _init in modules/overrides
    
    This adds a linter rule specifically to the modules/overrides directory
    that treats the name _init as exported. That is, the linter will not
    complain if an _init is defined and not used.
    
    [skip eslint] because this doesn't just remove linter warnings, it
    changes the messages a bit. The linter job isn't smart enough to deal
    with that.

 modules/overrides/.eslintrc.json | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/modules/overrides/.eslintrc.json b/modules/overrides/.eslintrc.json
new file mode 100644
index 0000000..eecae92
--- /dev/null
+++ b/modules/overrides/.eslintrc.json
@@ -0,0 +1,10 @@
+{
+    "rules": {
+        "no-unused-vars": [
+            "error",
+            {
+                "varsIgnorePattern": "^_init$"
+            }
+        ]
+    }
+}


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