From 2a041e9d8d1d8bd1f1d513c2b8095bbdb822f87b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 12 Feb 2019 11:07:55 +0100 Subject: [PATCH] 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", {