From c8a1cd9c99bbb03ff43c5786c860727501bd93b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 28 Jan 2019 01:40:51 +0100 Subject: [PATCH] lint: Allow multiple spaces before key values This is useful for imitating namespaced flags/enums: ``` const FooFlags = { NONE : 0, SMEAGLY: 1 << 0, SMOGLEY: 1 << 1, MUGGLY: 1 << 2 }; ``` https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/50 --- lint/eslintrc-shell.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lint/eslintrc-shell.json b/lint/eslintrc-shell.json index a0415944..c02c6cae 100644 --- a/lint/eslintrc-shell.json +++ b/lint/eslintrc-shell.json @@ -8,6 +8,14 @@ "allow": ["^vfunc_"] } ], + "key-spacing": [ + "error", + { + "mode": "minimum", + "beforeColon": false, + "afterColon": true + } + ], "object-curly-spacing": [ "error", "always"