gnome-shell/lint/eslintrc-shell.json
Florian Müllner 2a041e9d8d 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
2019-07-22 13:18:55 +00:00

40 lines
895 B
JSON

{
"rules": {
"camelcase": [
"error",
{
"properties": "never",
"allow": ["^vfunc_", "^on_"]
}
],
"consistent-return": "error",
"key-spacing": [
"error",
{
"mode": "minimum",
"beforeColon": false,
"afterColon": true
}
],
"object-curly-spacing": [
"error",
"always"
],
"prefer-arrow-callback": "error"
},
"overrides": [
{
"files": "js/**",
"excludedFiles": ["js/extensionPrefs/*", "js/portalHelper/*"],
"globals": {
"global": false,
"_": false,
"C_": false,
"N_": false,
"ngettext": false
}
}
]
}