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
This commit is contained in:
Florian Müllner 2019-02-12 11:07:55 +01:00 committed by Georges Basile Stavracas Neto
parent 1117f4760c
commit 2a041e9d8d

View File

@ -7,6 +7,7 @@
"allow": ["^vfunc_", "^on_"]
}
],
"consistent-return": "error",
"key-spacing": [
"error",
{