[gnome-shell] lint: Enforce consistent return



commit 2a041e9d8d1d8bd1f1d513c2b8095bbdb822f87b
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Feb 12 11:07:55 2019 +0100

    lint: Enforce consistent return
    
    While all javascript functions have a return value - either an explicit
    one from a return statement, or an implicit "undefined" - mixing both in
    the same function is almost certainly an oversight, and more often than
    not a bug.
    
    Enable the corresponding eslint rule to catch those errors.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/635

 lint/eslintrc-shell.json | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/lint/eslintrc-shell.json b/lint/eslintrc-shell.json
index 9c4c96bba..d8a940bbb 100644
--- a/lint/eslintrc-shell.json
+++ b/lint/eslintrc-shell.json
@@ -7,6 +7,7 @@
                 "allow": ["^vfunc_", "^on_"]
             }
         ],
+        "consistent-return": "error",
         "key-spacing": [
             "error",
             {


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