lint: Tweak the whitelist of globals

gjs doesn't include any gettext wrappers, and obviously can't know
about the shell's global object, so include those in the list of
globals for all sources in the gnome-shell context.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/609
This commit is contained in:
Florian Müllner 2019-01-27 01:15:31 +01:00 committed by Georges Basile Stavracas Neto
parent 3731be9947
commit 4c0bd88a2c
2 changed files with 17 additions and 1 deletions

View File

@ -1,5 +1,6 @@
{
"extends": [
"./lint/eslintrc-gjs.json"
"./lint/eslintrc-gjs.json",
"./lint/eslintrc-shell.json"
]
}

15
lint/eslintrc-shell.json Normal file
View File

@ -0,0 +1,15 @@
{
"overrides": [
{
"files": "js/**",
"excludedFiles": ["js/extensionPrefs/*", "js/portalHelper/*"],
"globals": {
"global": false,
"_": false,
"C_": false,
"N_": false,
"ngettext": false
}
}
]
}