[gjs: 4/5] lint: Don't require indent for GObject.registerClass()



commit d0bc28cdbff944c7f5af9cc9679eb269bf963544
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Feb 19 21:34:43 2019 +0100

    lint: Don't require indent for GObject.registerClass()
    
    The function will eventually be replaced with decorators, and we don't
    want to re-indent all GObject class when that happens, so allow class
    declarations with no indent:
    
        GObject.registerClass(
        class Foo extends GObject.Object {
        });
    
    https://gitlab.gnome.org/GNOME/gjs/merge_requests/272
    
    [skip eslint] as this will change the eslint outcome.

 .eslintrc.json | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/.eslintrc.json b/.eslintrc.json
index 85d198be..24366d6e 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -25,6 +25,9 @@
             "error",
             4,
             {
+                "ignoredNodes": [
+                    "CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > 
ClassExpression:first-child"
+                ],
                 "MemberExpression": "off"
             }
         ],


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