[gnome-shell-extensions/wip/fmuellner/lint-ci: 8/18] lint: Tweak indenting rule



commit f7cbd0d6001b51c75854ff0f194ab0059c5ceb30
Author: Florian Müllner <fmuellner gnome org>
Date:   Mon Jan 28 01:42:59 2019 +0100

    lint: Tweak indenting rule
    
    I simply cannot deal with multi-line trinary expressions where the
    two "branches" don't align, so add an exception for them.
    
    And while the strict 4-line indent for objects is growing on me for
    "regular" objects:
    
        let foo = new Foo({
            bar: 42,
            baz: 'bam'
        });
    
    I do prefer the current style of compact braces and aligned properties
    for object lists:
    
        let entries = [
            { name: 'foo',
              visible: true },
            { name: 'bar',
              halign: Gtk.Align.START }
        ];
    
    So allow the latter style as well, at least for the time being.
    
    https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/50

 lint/eslintrc-shell.json | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/lint/eslintrc-shell.json b/lint/eslintrc-shell.json
index cce7a32..063a73f 100644
--- a/lint/eslintrc-shell.json
+++ b/lint/eslintrc-shell.json
@@ -15,6 +15,17 @@
                 "allow": ["^vfunc_"]
             }
         ],
+        "indent": [
+            "error",
+            4,
+            {
+                "ignoredNodes": [
+                    "ArrayExpression > ObjectExpression",
+                    "ConditionalExpression"
+                ],
+                "MemberExpression": "off"
+            }
+        ],
         "key-spacing": [
             "error",
             {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]