[gjs: 10/43] CI: Add comma-dangle to eslint rules



commit 688b7b6f064d63e4bebef94b676d6e0df1e98557
Author: Philip Chimento <philip chimento gmail com>
Date:   Sat Aug 3 17:37:19 2019 -0700

    CI: Add comma-dangle to eslint rules
    
    This is useful for making diffs smaller and easier to read.

 .eslintrc.yml                                    |  3 +
 examples/calc.js                                 | 12 ++--
 examples/gtk-application.js                      |  8 +--
 examples/gtk.js                                  |  4 +-
 installed-tests/js/modules/subA/subB/__init__.js |  2 +-
 installed-tests/js/testEverythingEncapsulated.js |  4 +-
 installed-tests/js/testExceptions.js             |  4 +-
 installed-tests/js/testGLib.js                   |  2 +-
 installed-tests/js/testGObjectClass.js           |  4 +-
 installed-tests/js/testGObjectInterface.js       | 22 ++++----
 installed-tests/js/testGio.js                    |  2 +-
 installed-tests/js/testLang.js                   |  4 +-
 installed-tests/js/testLegacyClass.js            | 54 +++++++++---------
 installed-tests/js/testLegacyGObject.js          | 72 ++++++++++++------------
 installed-tests/js/testLegacyGtk.js              |  4 +-
 installed-tests/js/testTweener.js                | 46 +++++++--------
 modules/_bootstrap/debugger.js                   |  6 +-
 modules/_legacy.js                               |  2 +-
 modules/cairo.js                                 | 26 ++++-----
 modules/gettext.js                               |  2 +-
 modules/overrides/GObject.js                     |  2 +-
 modules/overrides/Gio.js                         |  4 +-
 modules/tweener/tweenList.js                     |  2 +-
 modules/tweener/tweener.js                       | 20 +++----
 24 files changed, 157 insertions(+), 154 deletions(-)
---
diff --git a/.eslintrc.yml b/.eslintrc.yml
index d1e5d6a8..d3a57932 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -20,6 +20,9 @@ rules:
   #   - error
   #   - properties: never
   #     allow: [^vfunc_, ^on_, _instance_init]
+  comma-dangle:
+    - error
+    - always-multiline
   comma-spacing:
     - error
     - before: false
diff --git a/examples/calc.js b/examples/calc.js
index 54f88836..58f0be20 100644
--- a/examples/calc.js
+++ b/examples/calc.js
@@ -85,7 +85,7 @@ function createButtons() {
         createButton('←', backspace),
         createButton('↻', randomNum),
         createButton('Clr', clear),
-        createButton('±', swapSign)
+        createButton('±', swapSign),
     ], vbox);
 
     packButtons([
@@ -93,7 +93,7 @@ function createButtons() {
         createButton('7', pressedNumber),
         createButton('8', pressedNumber),
         createButton('9', pressedNumber),
-        createButton('/', pressedOperator)
+        createButton('/', pressedOperator),
     ], vbox);
 
     packButtons([
@@ -101,7 +101,7 @@ function createButtons() {
         createButton('4', pressedNumber),
         createButton('5', pressedNumber),
         createButton('6', pressedNumber),
-        createButton('*', pressedOperator)
+        createButton('*', pressedOperator),
     ], vbox);
 
     packButtons([
@@ -109,7 +109,7 @@ function createButtons() {
         createButton('1', pressedNumber),
         createButton('2', pressedNumber),
         createButton('3', pressedNumber),
-        createButton('-', pressedOperator)
+        createButton('-', pressedOperator),
     ], vbox);
 
     packButtons([
@@ -117,7 +117,7 @@ function createButtons() {
         createButton('0', pressedNumber),
         createButton('.', pressedNumber),
         createButton('=', pressedEquals),
-        createButton('+', pressedOperator)
+        createButton('+', pressedOperator),
     ], vbox);
 
     return vbox;
@@ -143,4 +143,4 @@ mainvbox.pack_start(createButtons(), true, true, 2);
 
 win.add(mainvbox);
 win.show_all();
-Gtk.main();
\ No newline at end of file
+Gtk.main();
diff --git a/examples/gtk-application.js b/examples/gtk-application.js
index a9b3251c..fe3c6f11 100644
--- a/examples/gtk-application.js
+++ b/examples/gtk-application.js
@@ -21,14 +21,14 @@ var ExampleApplication = GObject.registerClass({
             'An example read write property',   // description
             GObject.ParamFlags.READWRITE,       // read/write/construct...
             ''                                  // implement defaults manually
-        )
+        ),
     },
     Signals: {'examplesig': {param_types: [GObject.TYPE_INT]}},
 }, class ExampleApplication extends Gtk.Application {
     _init() {
         super._init({
             application_id: 'org.gnome.gjs.ExampleApplication',
-            flags: Gio.ApplicationFlags.FLAGS_NONE
+            flags: Gio.ApplicationFlags.FLAGS_NONE,
         });
     }
     
@@ -59,7 +59,7 @@ var ExampleApplication = GObject.registerClass({
         // An example GAction, see: https://wiki.gnome.org/HowDoI/GAction
         let exampleAction = new Gio.SimpleAction({
             name: 'exampleAction',
-            parameter_type: new GLib.VariantType('s')
+            parameter_type: new GLib.VariantType('s'),
         });
         
         exampleAction.connect('activate', (action, param) => {
@@ -83,7 +83,7 @@ var ExampleApplication = GObject.registerClass({
             application: this,
             title: 'Example Application Window',
             default_width: 300,
-            default_height: 200
+            default_height: 200,
         });
         
         let label = new Gtk.Label({label: this.exampleprop});
diff --git a/examples/gtk.js b/examples/gtk.js
index 36c4b5c7..d9c23902 100644
--- a/examples/gtk.js
+++ b/examples/gtk.js
@@ -15,7 +15,7 @@ let win = new Gtk.Window ({
     // A decent example of how constants are mapped:
     //     'Gtk' and 'WindowPosition' from the enum name GtkWindowPosition,
     //     'CENTER' from the enum's constant GTK_WIN_POS_CENTER
-    window_position: Gtk.WindowPosition.CENTER
+    window_position: Gtk.WindowPosition.CENTER,
 });
 
 // Object properties can also be set or changed after construction, unless they
@@ -56,7 +56,7 @@ let button = new Gtk.Button({
     //     'Gtk' and 'Align' are taken from the GtkAlign enum,
     //     'CENTER' from the constant GTK_ALIGN_CENTER
     valign: Gtk.Align.CENTER,
-    halign: Gtk.Align.CENTER
+    halign: Gtk.Align.CENTER,
 });
 
 // Connect to the 'clicked' signal, using another way to call an arrow function
diff --git a/installed-tests/js/modules/subA/subB/__init__.js 
b/installed-tests/js/modules/subA/subB/__init__.js
index 7bf2132f..d7424021 100644
--- a/installed-tests/js/modules/subA/subB/__init__.js
+++ b/installed-tests/js/modules/subA/subB/__init__.js
@@ -15,5 +15,5 @@ ImporterClass.prototype = {
 
     testMethod: function() {
         return this._a;
-    }
+    },
 };
diff --git a/installed-tests/js/testEverythingEncapsulated.js 
b/installed-tests/js/testEverythingEncapsulated.js
index 8b977833..a5a71139 100644
--- a/installed-tests/js/testEverythingEncapsulated.js
+++ b/installed-tests/js/testEverythingEncapsulated.js
@@ -165,8 +165,8 @@ describe('Introspected boxed types', function () {
             nested_a: {
                 some_int: 43,
                 some_int8: 44,
-                some_double: 43.5
-            }
+                some_double: 43.5,
+            },
         });
         expect(simple2.some_int8).toEqual(42);
         expect(simple2.nested_a.some_int).toEqual(43);
diff --git a/installed-tests/js/testExceptions.js b/installed-tests/js/testExceptions.js
index 50622d4e..eed96c5a 100644
--- a/installed-tests/js/testExceptions.js
+++ b/installed-tests/js/testExceptions.js
@@ -2,7 +2,7 @@ const {GIMarshallingTests, Gio, GLib, GObject} = imports.gi;
 
 const Foo = GObject.registerClass({
     Properties: {
-        'prop': GObject.ParamSpec.string('prop', '', '', GObject.ParamFlags.READWRITE, '')
+        'prop': GObject.ParamSpec.string('prop', '', '', GObject.ParamFlags.READWRITE, ''),
     },
 }, class Foo extends GObject.Object {
     set prop(v) {
@@ -18,7 +18,7 @@ const Bar = GObject.registerClass({
     Properties: {
         'prop': GObject.ParamSpec.string('prop', '', '',
             GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT, ''),
-    }
+    },
 }, class Bar extends GObject.Object {});
 
 describe('Exceptions', function () {
diff --git a/installed-tests/js/testGLib.js b/installed-tests/js/testGLib.js
index 3fd57fcc..a47be1fd 100644
--- a/installed-tests/js/testGLib.js
+++ b/installed-tests/js/testGLib.js
@@ -20,7 +20,7 @@ describe('GVariant constructor', function () {
             '/a/object/path',
             'asig', //nature
             new GLib.Variant('s', 'variant'),
-            [7, 3]
+            [7, 3],
         ]);
         expect(structVariant.n_children()).toEqual(5);
 
diff --git a/installed-tests/js/testGObjectClass.js b/installed-tests/js/testGObjectClass.js
index b017b4f8..4b4087f9 100644
--- a/installed-tests/js/testGObjectClass.js
+++ b/installed-tests/js/testGObjectClass.js
@@ -115,7 +115,7 @@ const MyObject = GObject.registerClass({
 });
 
 const MyAbstractObject = GObject.registerClass({
-    GTypeFlags: GObject.TypeFlags.ABSTRACT
+    GTypeFlags: GObject.TypeFlags.ABSTRACT,
 }, class MyAbstractObject extends GObject.Object {
 });
 
@@ -324,7 +324,7 @@ describe('GObject class with decorator', function () {
             Properties: {
                 'file': GObject.ParamSpec.object('file', 'File', 'File',
                     GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
-                    Gio.File.$gtype)
+                    Gio.File.$gtype),
             },
         }, class InterfacePropObject extends GObject.Object {});
         let file = Gio.File.new_for_path('dummy');
diff --git a/installed-tests/js/testGObjectInterface.js b/installed-tests/js/testGObjectInterface.js
index b4cee294..c88b02cc 100644
--- a/installed-tests/js/testGObjectInterface.js
+++ b/installed-tests/js/testGObjectInterface.js
@@ -10,10 +10,10 @@ const AGObjectInterface = GObject.registerClass({
         'interface-prop': GObject.ParamSpec.string('interface-prop',
             'Interface property', 'Must be overridden in implementation',
             GObject.ParamFlags.READABLE,
-            'foobar')
+            'foobar'),
     },
     Signals: {
-        'interface-signal': {}
+        'interface-signal': {},
     },
 }, class AGObjectInterface extends GObject.Interface {
     requiredG() {
@@ -41,7 +41,7 @@ const GObjectImplementingGObjectInterface = GObject.registerClass({
             AGObjectInterface),
         'class-prop': GObject.ParamSpec.string('class-prop', 'Class property',
             'A property that is not on the interface',
-            GObject.ParamFlags.READABLE, 'meh')
+            GObject.ParamFlags.READABLE, 'meh'),
     },
     Signals: {
         'class-signal': {},
@@ -65,7 +65,7 @@ const MinimalImplementationOfAGObjectInterface = GObject.registerClass({
     Implements: [AGObjectInterface],
     Properties: {
         'interface-prop': GObject.ParamSpec.override('interface-prop',
-            AGObjectInterface)
+            AGObjectInterface),
     },
 }, class MinimalImplementationOfAGObjectInterface extends GObject.Object {
     requiredG() {}
@@ -75,7 +75,7 @@ const ImplementationOfTwoInterfaces = GObject.registerClass({
     Implements: [AGObjectInterface, InterfaceRequiringGObjectInterface],
     Properties: {
         'interface-prop': GObject.ParamSpec.override('interface-prop',
-            AGObjectInterface)
+            AGObjectInterface),
     },
 }, class ImplementationOfTwoInterfaces extends GObject.Object {
     requiredG() {}
@@ -92,8 +92,8 @@ const ImplementationOfIntrospectedInterface = GObject.registerClass({
         'state': GObject.ParamSpec.override('state', Gio.Action),
         'state-type': GObject.ParamSpec.override('state-type', Gio.Action),
         'parameter-type': GObject.ParamSpec.override('parameter-type',
-            Gio.Action)
-    }
+            Gio.Action),
+    },
 }, class ImplementationOfIntrospectedInterface extends GObject.Object {
     get name() {
         return 'inaction';
@@ -140,8 +140,8 @@ describe('GObject interface', function () {
             Implements: [AGObjectInterface],
             Properties: {
                 'interface-prop': GObject.ParamSpec.override('interface-prop',
-                    AGObjectInterface)
-            }
+                    AGObjectInterface),
+            },
         }, class BadObject extends GObject.Object {});
         expect(() => new BadObject().requiredG())
            .toThrowError(GObject.NotImplementedError);
@@ -185,7 +185,7 @@ describe('GObject interface', function () {
             Implements: [AGObjectInterface, InterfaceRequiringGObjectInterface],
             Properties: {
                 'interface-prop': GObject.ParamSpec.override('interface-prop',
-                    AGObjectInterface)
+                    AGObjectInterface),
             },
         }, class MinimalImplementationOfTwoInterfaces extends GObject.Object {
             requiredG() {}
@@ -213,7 +213,7 @@ describe('GObject interface', function () {
 
     it('can require an interface from C', function () {
         const InitableInterface = GObject.registerClass({
-            Requires: [GObject.Object, Gio.Initable]
+            Requires: [GObject.Object, Gio.Initable],
         }, class InitableInterface extends GObject.Interface {});
         expect(() => GObject.registerClass({
             Implements: [InitableInterface],
diff --git a/installed-tests/js/testGio.js b/installed-tests/js/testGio.js
index d19bc1d9..53d02752 100644
--- a/installed-tests/js/testGio.js
+++ b/installed-tests/js/testGio.js
@@ -4,7 +4,7 @@ const Foo = GObject.registerClass({
     Properties: {
         boolval: GObject.ParamSpec.boolean('boolval', '', '',
             GObject.ParamFlags.READWRITE, false),
-    }
+    },
 }, class Foo extends GObject.Object {
     _init(value) {
         super._init();
diff --git a/installed-tests/js/testLang.js b/installed-tests/js/testLang.js
index 4e2697a0..180e1463 100644
--- a/installed-tests/js/testLang.js
+++ b/installed-tests/js/testLang.js
@@ -35,7 +35,7 @@ describe('Lang module', function () {
             },
             set c(n) {
                 this.a = n;
-            }
+            },
         };
         var bar = {};
 
@@ -60,7 +60,7 @@ describe('Lang module', function () {
             o = {
                 callback() {
                     return true;
-                }
+                },
             };
             spyOn(o, 'callback').and.callThrough();
         });
diff --git a/installed-tests/js/testLegacyClass.js b/installed-tests/js/testLegacyClass.js
index ae59099c..89a86f3b 100644
--- a/installed-tests/js/testLegacyClass.js
+++ b/installed-tests/js/testLegacyClass.js
@@ -8,7 +8,7 @@ const NormalClass = new Lang.Class({
 
     _init: function() {
         this.one = 1;
-    }
+    },
 });
 
 let Subclassed = [];
@@ -27,7 +27,7 @@ const MetaClass = new Lang.Class({
 
             this.DYNAMIC_CONSTANT = 2;
         }
-    }
+    },
 });
 
 const CustomMetaOne = new MetaClass({
@@ -39,7 +39,7 @@ const CustomMetaOne = new MetaClass({
         this.parent();
 
         this.two = 2;
-    }
+    },
 });
 
 const CustomMetaTwo = new MetaClass({
@@ -51,7 +51,7 @@ const CustomMetaTwo = new MetaClass({
         this.parent();
 
         this.two = 2;
-    }
+    },
 });
 
 // This should inherit CustomMeta, even though
@@ -65,7 +65,7 @@ const CustomMetaSubclass = new Lang.Class({
         this.parent();
 
         this.three = 3;
-    }
+    },
 });
 
 describe('A metaclass', function () {
@@ -139,7 +139,7 @@ const MagicBase = new Lang.Class({
 
     bar: function(a) {
         return a * 5;
-    }
+    },
 });
 
 const Magic = new Lang.Class({
@@ -163,7 +163,7 @@ const Magic = new Lang.Class({
     bar: function(a, buffer) {
         this.foo(a, 2 * a, buffer);
         return this.parent(a);
-    }
+    },
 });
 
 const Accessor = new Lang.Class({
@@ -181,7 +181,7 @@ const Accessor = new Lang.Class({
         if (val != 42)
             throw TypeError('Value is not a magic number');
         this._val = val;
-    }
+    },
 });
 
 const AbstractBase = new Lang.Class({
@@ -190,7 +190,7 @@ const AbstractBase = new Lang.Class({
 
     _init: function() {
         this.foo = 42;
-    }
+    },
 });
 
 describe('Class framework', function () {
@@ -241,7 +241,7 @@ describe('Class framework', function () {
             toString: function() {
                 let oldToString = this.parent();
                 return `${oldToString}; hello`;
-            }
+            },
         });
 
         let override = new ToStringOverride();
@@ -277,7 +277,7 @@ describe('Class framework', function () {
             _init: function() {
                 this.parent();
                 this.bar = 42;
-            }
+            },
         });
 
         let newAbstract = new AbstractImpl();
@@ -317,7 +317,7 @@ describe('Class framework', function () {
 
             _construct: function(one, two) {
                 return [one, two];
-            }
+            },
         });
 
         let instance = new CustomConstruct(1, 2);
@@ -370,7 +370,7 @@ const AnInterface = new Lang.Interface({
 
     set some_prop(value) {
         this.some_prop_setter_called = true;
-    }
+    },
 });
 
 const InterfaceRequiringOtherInterface = new Lang.Interface({
@@ -385,7 +385,7 @@ const InterfaceRequiringOtherInterface = new Lang.Interface({
     optionalGeneric: function () {
         return `InterfaceRequiringOtherInterface.optionalGeneric()\n${
             AnInterface.optionalGeneric(this)}`;
-    }
+    },
 });
 
 const ObjectImplementingAnInterface = new Lang.Class({
@@ -408,7 +408,7 @@ const ObjectImplementingAnInterface = new Lang.Class({
 
     argumentGeneric: function (arg) {
         return AnInterface.argumentGeneric(this, `${arg} (hello from class)`);
-    }
+    },
 });
 
 const InterfaceRequiringClassAndInterface = new Lang.Interface({
@@ -420,7 +420,7 @@ const MinimalImplementationOfAnInterface = new Lang.Class({
     Name: 'MinimalImplementationOfAnInterface',
     Implements: [AnInterface],
 
-    required: function () {}
+    required: function () {},
 });
 
 const ImplementationOfTwoInterfaces = new Lang.Class({
@@ -435,7 +435,7 @@ const ImplementationOfTwoInterfaces = new Lang.Class({
 
     optionalGeneric: function () {
         return InterfaceRequiringOtherInterface.optionalGeneric(this);
-    }
+    },
 });
 
 describe('An interface', function () {
@@ -463,7 +463,7 @@ describe('An interface', function () {
     it("can be implemented by a class's superclass", function () {
         const ChildWhoseParentImplementsAnInterface = new Lang.Class({
             Name: 'ChildWhoseParentImplementsAnInterface',
-            Extends: ObjectImplementingAnInterface
+            Extends: ObjectImplementingAnInterface,
         });
         let obj = new ChildWhoseParentImplementsAnInterface();
         expect(obj.constructor.implements(AnInterface)).toBeTruthy();
@@ -532,7 +532,7 @@ describe('An interface', function () {
             required: function () {},
             get some_prop() {
                 return 'ObjectWithGetter.some_prop getter';
-            }
+            },
         });
         let obj = new ObjectWithGetter();
         expect(obj.some_prop).toEqual('ObjectWithGetter.some_prop getter');
@@ -545,7 +545,7 @@ describe('An interface', function () {
             required: function () {},
             set some_prop(value) {  /* setter without getter */// jshint ignore:line
                 this.overridden_some_prop_setter_called = true;
-            }
+            },
         });
         let obj = new ObjectWithSetter();
         obj.some_prop = 'foobar';
@@ -565,7 +565,7 @@ describe('An interface', function () {
     it('can have empty requires', function () {
         expect(() => new Lang.Interface({
             Name: 'InterfaceWithEmptyRequires',
-            Requires: []
+            Requires: [],
         })).not.toThrow();
     });
 
@@ -591,7 +591,7 @@ describe('An interface', function () {
             Name: 'MinimalImplementationOfTwoInterfaces',
             Implements: [AnInterface, InterfaceRequiringOtherInterface],
 
-            required: function () {}
+            required: function () {},
         });
         let obj = new MinimalImplementationOfTwoInterfaces();
         expect(obj.optionalGeneric())
@@ -602,7 +602,7 @@ describe('An interface', function () {
         expect(() => new Lang.Class({
             Name: 'ObjectWithNotEnoughInterfaces',
             Implements: [InterfaceRequiringOtherInterface],
-            required: function () {}
+            required: function () {},
         })).toThrow();
     });
 
@@ -610,7 +610,7 @@ describe('An interface', function () {
         expect(() => new Lang.Class({
             Name: 'ObjectWithInterfacesInWrongOrder',
             Implements: [InterfaceRequiringOtherInterface, AnInterface],
-            required: function () {}
+            required: function () {},
         })).toThrow();
     });
 
@@ -634,7 +634,7 @@ describe('An interface', function () {
             const ObjectImplementingInterfaceRequiringParentObject = new Lang.Class({
                 Name: 'ObjectImplementingInterfaceRequiringParentObject',
                 Extends: ObjectImplementingAnInterface,
-                Implements: [InterfaceRequiringOtherInterface, InterfaceRequiringClassAndInterface]
+                Implements: [InterfaceRequiringOtherInterface, InterfaceRequiringClassAndInterface],
             });
             obj = new ObjectImplementingInterfaceRequiringParentObject();
         }).not.toThrow();
@@ -659,7 +659,7 @@ describe('An interface', function () {
     it('is implemented by a subclass of a class that implements it', function () {
         const SubObject = new Lang.Class({
             Name: 'SubObject',
-            Extends: ObjectImplementingAnInterface
+            Extends: ObjectImplementingAnInterface,
         });
         let obj = new SubObject();
         expect(obj.constructor.implements(AnInterface)).toBeTruthy();
@@ -669,7 +669,7 @@ describe('An interface', function () {
         const SubImplementer = new Lang.Class({
             Name: 'SubImplementer',
             Extends: ObjectImplementingAnInterface,
-            Implements: [AnInterface]
+            Implements: [AnInterface],
         });
         let obj = new SubImplementer();
         expect(obj.constructor.implements(AnInterface)).toBeTruthy();
diff --git a/installed-tests/js/testLegacyGObject.js b/installed-tests/js/testLegacyGObject.js
index c5e5dbb1..b2a360bc 100644
--- a/installed-tests/js/testLegacyGObject.js
+++ b/installed-tests/js/testLegacyGObject.js
@@ -121,7 +121,7 @@ const MyObject = new GObject.Class({
     on_full: function() {
         this.full_default_handler_called = true;
         return 79;
-    }
+    },
 });
 
 const MyApplication = new Lang.Class({
@@ -135,7 +135,7 @@ const MyApplication = new Lang.Class({
 
     emit_custom: function(n) {
         this.emit('custom', n);
-    }
+    },
 });
 
 const MyInitable = new Lang.Class({
@@ -154,7 +154,7 @@ const MyInitable = new Lang.Class({
             throw 'Bad argument';
 
         this.inited = true;
-    }
+    },
 });
 
 const Derived = new Lang.Class({
@@ -163,12 +163,12 @@ const Derived = new Lang.Class({
 
     _init: function() {
         this.parent({readwrite: 'yes'});
-    }
+    },
 });
 
 const OddlyNamed = new Lang.Class({
     Name: 'Legacy.OddlyNamed',
-    Extends: MyObject
+    Extends: MyObject,
 });
 
 const MyCustomInit = new Lang.Class({
@@ -183,7 +183,7 @@ const MyCustomInit = new Lang.Class({
 
     _instance_init: function() {
         this.foo = true;
-    }
+    },
 });
 
 describe('GObject class', function () {
@@ -346,7 +346,7 @@ describe('GObject class', function () {
             Properties: {
                 'file': GObject.ParamSpec.object('file', 'File', 'File',
                     GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
-                    Gio.File.$gtype)
+                    Gio.File.$gtype),
             },
         });
         let file = Gio.File.new_for_path('dummy');
@@ -394,7 +394,7 @@ const GObjectImplementingLangInterface = new Lang.Class({
 
     _init: function (props = {}) {
         this.parent(props);
-    }
+    },
 });
 
 const AGObjectInterface = new Lang.Interface({
@@ -405,16 +405,16 @@ const AGObjectInterface = new Lang.Interface({
         'interface-prop': GObject.ParamSpec.string('interface-prop',
             'Interface property', 'Must be overridden in implementation',
             GObject.ParamFlags.READABLE,
-            'foobar')
+            'foobar'),
     },
     Signals: {
-        'interface-signal': {}
+        'interface-signal': {},
     },
 
     requiredG: Lang.Interface.UNIMPLEMENTED,
     optionalG: function () {
         return 'AGObjectInterface.optionalG()';
-    }
+    },
 });
 
 const InterfaceRequiringGObjectInterface = new Lang.Interface({
@@ -424,7 +424,7 @@ const InterfaceRequiringGObjectInterface = new Lang.Interface({
     optionalG: function () {
         return `InterfaceRequiringGObjectInterface.optionalG()\n${
             AGObjectInterface.optionalG(this)}`;
-    }
+    },
 });
 
 const GObjectImplementingGObjectInterface = new Lang.Class({
@@ -436,7 +436,7 @@ const GObjectImplementingGObjectInterface = new Lang.Class({
             AGObjectInterface),
         'class-prop': GObject.ParamSpec.string('class-prop', 'Class property',
             'A property that is not on the interface',
-            GObject.ParamFlags.READABLE, 'meh')
+            GObject.ParamFlags.READABLE, 'meh'),
     },
     Signals: {
         'class-signal': {},
@@ -456,7 +456,7 @@ const GObjectImplementingGObjectInterface = new Lang.Class({
     requiredG: function () {},
     optionalG: function () {
         return AGObjectInterface.optionalG(this);
-    }
+    },
 });
 
 const MinimalImplementationOfAGObjectInterface = new Lang.Class({
@@ -465,13 +465,13 @@ const MinimalImplementationOfAGObjectInterface = new Lang.Class({
     Implements: [AGObjectInterface],
     Properties: {
         'interface-prop': GObject.ParamSpec.override('interface-prop',
-            AGObjectInterface)
+            AGObjectInterface),
     },
 
     _init: function (props = {}) {
         this.parent(props);
     },
-    requiredG: function () {}
+    requiredG: function () {},
 });
 
 const ImplementationOfTwoInterfaces = new Lang.Class({
@@ -480,7 +480,7 @@ const ImplementationOfTwoInterfaces = new Lang.Class({
     Implements: [AGObjectInterface, InterfaceRequiringGObjectInterface],
     Properties: {
         'interface-prop': GObject.ParamSpec.override('interface-prop',
-            AGObjectInterface)
+            AGObjectInterface),
     },
 
     _init: function (props = {}) {
@@ -489,7 +489,7 @@ const ImplementationOfTwoInterfaces = new Lang.Class({
     requiredG: function () {},
     optionalG: function () {
         return InterfaceRequiringGObjectInterface.optionalG(this);
-    }
+    },
 });
 
 describe('GObject interface', function () {
@@ -505,7 +505,7 @@ describe('GObject interface', function () {
         expect(() => new Lang.Interface({
             Name: 'GObjectInterfaceNotRequiringGObject',
             GTypeName: 'GTypeNameNotRequiringGObject',
-            Requires: [Gio.Initable]
+            Requires: [Gio.Initable],
         })).toThrow();
     });
 
@@ -517,7 +517,7 @@ describe('GObject interface', function () {
 
             _init: function (props = {}) {
                 this.parent(props);
-            }
+            },
         });
         let obj;
         expect(() => {
@@ -566,14 +566,14 @@ describe('GObject interface', function () {
             Implements: [AnInterface, AGObjectInterface],
             Properties: {
                 'interface-prop': GObject.ParamSpec.override('interface-prop',
-                    AGObjectInterface)
+                    AGObjectInterface),
             },
 
             _init: function (props = {}) {
                 this.parent(props);
             },
             required: function () {},
-            requiredG: function () {}
+            requiredG: function () {},
         });
         let obj;
         expect(() => {
@@ -597,8 +597,8 @@ describe('GObject interface', function () {
             Implements: [AGObjectInterface],
             Properties: {
                 'interface-prop': GObject.ParamSpec.override('interface-prop',
-                    AGObjectInterface)
-            }
+                    AGObjectInterface),
+            },
         })).toThrow();
     });
 
@@ -643,13 +643,13 @@ describe('GObject interface', function () {
             Implements: [AGObjectInterface, InterfaceRequiringGObjectInterface],
             Properties: {
                 'interface-prop': GObject.ParamSpec.override('interface-prop',
-                    AGObjectInterface)
+                    AGObjectInterface),
             },
 
             _init: function (props = {}) {
                 this.parent(props);
             },
-            requiredG: function () {}
+            requiredG: function () {},
         });
         let obj = new MinimalImplementationOfTwoInterfaces();
         expect(obj.optionalG())
@@ -660,7 +660,7 @@ describe('GObject interface', function () {
         expect(() => new Lang.Class({
             Name: 'BadObject',
             Implements: [InterfaceRequiringGObjectInterface],
-            required: function () {}
+            required: function () {},
         })).toThrow();
     });
 
@@ -668,18 +668,18 @@ describe('GObject interface', function () {
         expect(() => new Lang.Class({
             Name: 'BadObject',
             Implements: [InterfaceRequiringGObjectInterface, AGObjectInterface],
-            required: function () {}
+            required: function () {},
         })).toThrow();
     });
 
     it('can require an interface from C', function () {
         const InitableInterface = new Lang.Interface({
             Name: 'InitableInterface',
-            Requires: [GObject.Object, Gio.Initable]
+            Requires: [GObject.Object, Gio.Initable],
         });
         expect(() => new Lang.Class({
             Name: 'BadObject',
-            Implements: [InitableInterface]
+            Implements: [InitableInterface],
         })).toThrow();
     });
 
@@ -727,7 +727,7 @@ describe('GObject interface', function () {
             _init: function (props = {}) {
                 this.parent(props);
             },
-            requiredG: function () {}
+            requiredG: function () {},
         });
         // g_test_assert_expected_messages() is a macro, not introspectable
         GLib.test_assert_expected_messages_internal('Gjs', 'testGObjectInterface.js',
@@ -740,14 +740,14 @@ describe('GObject interface', function () {
     it('gets the correct type for its metaclass', function () {
         const MyMeta = new Lang.Class({
             Name: 'MyMeta',
-            Extends: GObject.Class
+            Extends: GObject.Class,
         });
         const MyMetaObject = new MyMeta({
-            Name: 'MyMetaObject'
+            Name: 'MyMetaObject',
         });
         const MyMetaInterface = new Lang.Interface({
             Name: 'MyMetaInterface',
-            Requires: [MyMetaObject]
+            Requires: [MyMetaObject],
         });
         expect(MyMetaInterface instanceof GObject.Interface).toBeTruthy();
     });
@@ -755,7 +755,7 @@ describe('GObject interface', function () {
     it('can be implemented by a class as well as its parent class', function () {
         const SubObject = new Lang.Class({
             Name: 'SubObject',
-            Extends: GObjectImplementingGObjectInterface
+            Extends: GObjectImplementingGObjectInterface,
         });
         let obj = new SubObject();
         expect(obj.constructor.implements(AGObjectInterface)).toBeTruthy();
@@ -766,7 +766,7 @@ describe('GObject interface', function () {
         const SubImplementer = new Lang.Class({
             Name: 'SubImplementer',
             Extends: GObjectImplementingGObjectInterface,
-            Implements: [AGObjectInterface]
+            Implements: [AGObjectInterface],
         });
         let obj = new SubImplementer();
         expect(obj.constructor.implements(AGObjectInterface)).toBeTruthy();
diff --git a/installed-tests/js/testLegacyGtk.js b/installed-tests/js/testLegacyGtk.js
index ee78e576..a91e59eb 100644
--- a/installed-tests/js/testLegacyGtk.js
+++ b/installed-tests/js/testLegacyGtk.js
@@ -50,7 +50,7 @@ const MyComplexGtkSubclass = new Lang.Class({
 
         expect(this.label_child2).toEqual(jasmine.anything());
         expect(this._internal_label_child).toEqual(jasmine.anything());
-    }
+    },
 });
 
 const MyComplexGtkSubclassFromResource = new Lang.Class({
@@ -64,7 +64,7 @@ const MyComplexGtkSubclassFromResource = new Lang.Class({
         expect(this.label_child).toEqual(jasmine.anything());
         expect(this.label_child2).toEqual(jasmine.anything());
         expect(this._internal_label_child).toEqual(jasmine.anything());
-    }
+    },
 });
 
 function validateTemplate(description, ClassName) {
diff --git a/installed-tests/js/testTweener.js b/installed-tests/js/testTweener.js
index 62bd7093..afbb06e4 100644
--- a/installed-tests/js/testTweener.js
+++ b/installed-tests/js/testTweener.js
@@ -29,7 +29,7 @@ function installFrameTicker() {
 
         getTime: function() {
             return this._currentTime;
-        }
+        },
     };
     imports.signals.addSignalMethods(ticker);
 
@@ -57,12 +57,12 @@ describe('Tweener', function () {
     it('runs a simple tween', function () {
         var objectA = {
             x: 0,
-            y: 0
+            y: 0,
         };
 
         var objectB = {
             x: 0,
-            y: 0
+            y: 0,
         };
 
         Tweener.addTween(objectA, {x: 10, y: 10, time: 1, transition: 'linear'});
@@ -92,15 +92,15 @@ describe('Tweener', function () {
 
     it('can pause tweens', function () {
         var objectA = {
-            foo: 0
+            foo: 0,
         };
 
         var objectB = {
-            bar: 0
+            bar: 0,
         };
 
         var objectC = {
-            baaz: 0
+            baaz: 0,
         };
 
         Tweener.addTween(objectA, {foo: 100, time: 0.1});
@@ -125,7 +125,7 @@ describe('Tweener', function () {
         var object = {
             foo: 0,
             bar: 0,
-            baaz: 0
+            baaz: 0,
         };
 
         Tweener.addTween(object, {foo: 50, time: 0.1});
@@ -144,7 +144,7 @@ describe('Tweener', function () {
 
     it('overrides a tween with another one acting on the same object and property at the same time', 
function () {
         var objectA = {
-            foo: 0
+            foo: 0,
         };
 
         Tweener.addTween(objectA, {foo: 100, time: 0.1});
@@ -157,7 +157,7 @@ describe('Tweener', function () {
 
     it('does not override a tween with another one acting not at the same time', function () {
         var objectB = {
-            bar: 0
+            bar: 0,
         };
 
         /* In this case both tweens should be executed, as they don't
@@ -173,10 +173,10 @@ describe('Tweener', function () {
 
     it('can pause and resume all tweens', function () {
         var objectA = {
-            foo: 0
+            foo: 0,
         };
         var objectB = {
-            bar: 0
+            bar: 0,
         };
 
         Tweener.addTween(objectA, {foo: 100, time: 0.1});
@@ -196,10 +196,10 @@ describe('Tweener', function () {
 
     it('can remove all tweens', function () {
         var objectA = {
-            foo: 0
+            foo: 0,
         };
         var objectB = {
-            bar: 0
+            bar: 0,
         };
 
         Tweener.addTween(objectA, {foo: 100, time: 0.1});
@@ -215,7 +215,7 @@ describe('Tweener', function () {
 
     it('runs a tween with a time of 0 immediately', function () {
         var object = {
-            foo: 100
+            foo: 100,
         };
 
         Tweener.addTween(object, {foo: 50, time: 0, delay: 0});
@@ -235,7 +235,7 @@ describe('Tweener', function () {
 
     it('can call a callback a certain number of times', function () {
         var object = {
-            foo: 0
+            foo: 0,
         };
 
         Tweener.addCaller(object, {
@@ -256,7 +256,7 @@ describe('Tweener', function () {
             foo: 0,
             bar: 0,
             baaz: 0,
-            quux: 0
+            quux: 0,
         };
 
         expect(Tweener.getTweenCount(object)).toEqual(0);
@@ -287,7 +287,7 @@ describe('Tweener', function () {
 
         var objectA = {
             x: 0,
-            y: 0
+            y: 0,
         };
 
         Tweener.addTween(objectA, {negative_x: 10, y: 10, time: 1, transition: 'linear'});
@@ -314,7 +314,7 @@ describe('Tweener', function () {
             x: 0,
             y: 0,
             xFraction: false,
-            yFraction: false
+            yFraction: false,
         };
 
         Tweener.addTween(objectA, {
@@ -348,7 +348,7 @@ describe('Tweener', function () {
 
         var objectA = {
             x: 0,
-            y: 0
+            y: 0,
         };
 
         Tweener.addTween(objectA, {xnegy: 10, time: 1, transition: 'linear'});
@@ -364,7 +364,7 @@ describe('Tweener', function () {
             a: 0,
             b: 0,
             c: 0,
-            d: 0
+            d: 0,
         };
 
         var tweenA = {
@@ -395,7 +395,7 @@ describe('Tweener', function () {
             a: 0,
             b: 0,
             c: 0,
-            d: 0
+            d: 0,
         };
 
         var tweenA = {
@@ -426,12 +426,12 @@ describe('Tweener', function () {
     it('stays within min and max values', function () {
         var objectA = {
             x: 0,
-            y: 0
+            y: 0,
         };
 
         var objectB = {
             x: 0,
-            y: 0
+            y: 0,
         };
 
         Tweener.addTween(objectA, {x: 300, y: 300, time: 1, max: 255, transition: 'linear'});
diff --git a/modules/_bootstrap/debugger.js b/modules/_bootstrap/debugger.js
index fa1cf6c1..eddc115c 100644
--- a/modules/_bootstrap/debugger.js
+++ b/modules/_bootstrap/debugger.js
@@ -96,7 +96,7 @@ Object.defineProperty(Debugger.Frame.prototype, 'num', {
         for (f = topFrame; f && f !== this; f = f.older)
             i++;
         return f === null ? undefined : i;
-    }
+    },
 });
 
 Debugger.Frame.prototype.describeFrame = function() {
@@ -131,7 +131,7 @@ Object.defineProperty(Debugger.Frame.prototype, 'line', {
             return this.script.getOffsetLocation(this.offset).lineNumber;
         else
             return null;
-    }
+    },
 });
 
 Debugger.Script.prototype.describeOffset = function describeOffset(offset) {
@@ -704,7 +704,7 @@ function _groupCommands() {
             groups.push({
                 summary: cmd.summary,
                 helpText: cmd.helpText,
-                aliases: [cmd.name.replace(/Command$/, '')]
+                aliases: [cmd.name.replace(/Command$/, '')],
             });
         }
     }
diff --git a/modules/_legacy.js b/modules/_legacy.js
index 2b09342b..6646b6f1 100644
--- a/modules/_legacy.js
+++ b/modules/_legacy.js
@@ -579,7 +579,7 @@ function defineGObjectLegacyObjects(GObject) {
             } else {
                 return this.parent(iface);
             }
-        }
+        },
     });
 
     function GObjectInterface() {
diff --git a/modules/cairo.js b/modules/cairo.js
index c07d1ada..7b0b184c 100644
--- a/modules/cairo.js
+++ b/modules/cairo.js
@@ -25,25 +25,25 @@ var Antialias = {
     DEFAULT: 0,
     NONE: 1,
     GRAY: 2,
-    SUBPIXEL: 3
+    SUBPIXEL: 3,
 };
 
 var Content = {
     COLOR: 0x1000,
     ALPHA: 0x2000,
-    COLOR_ALPHA: 0x3000
+    COLOR_ALPHA: 0x3000,
 };
 
 var Extend = {
     NONE: 0,
     REPEAT: 1,
     REFLECT: 2,
-    PAD: 3
+    PAD: 3,
 };
 
 var FillRule = {
     WINDING: 0,
-    EVEN_ODD: 1
+    EVEN_ODD: 1,
 };
 
 var Filter = {
@@ -52,18 +52,18 @@ var Filter = {
     BEST: 2,
     NEAREST: 3,
     BILINEAR: 4,
-    GAUSSIAN: 5
+    GAUSSIAN: 5,
 };
 
 var FontSlant = {
     NORMAL: 0,
     ITALIC: 1,
-    OBLIQUE: 2
+    OBLIQUE: 2,
 };
 
 var FontWeight = {
     NORMAL: 0,
-    BOLD: 1
+    BOLD: 1,
 };
 
 var Format = {
@@ -72,19 +72,19 @@ var Format = {
     A8: 2,
     A1: 3,
     // The value of 4 is reserved by a deprecated enum value
-    RGB16_565: 5
+    RGB16_565: 5,
 };
 
 var LineCap = {
     BUTT: 0,
     ROUND: 1,
-    SQUASH: 2
+    SQUASH: 2,
 };
 
 var LineJoin = {
     MITER: 0,
     ROUND: 1,
-    BEVEL: 2
+    BEVEL: 2,
 };
 
 var Operator = {
@@ -116,14 +116,14 @@ var Operator = {
     HSL_HUE: 25,
     HSL_SATURATION: 26,
     HSL_COLOR: 27,
-    HSL_LUMINOSITY: 28
+    HSL_LUMINOSITY: 28,
 };
 
 var PatternType = {
     SOLID: 0,
     SURFACE: 1,
     LINEAR: 2,
-    RADIAL: 3
+    RADIAL: 3,
 };
 
 var SurfaceType = {
@@ -140,7 +140,7 @@ var SurfaceType = {
     SVG: 10,
     OS2: 11,
     WIN32_PRINTING: 12,
-    QUARTZ_IMAGE: 13
+    QUARTZ_IMAGE: 13,
 };
 
 // Merge stuff defined in native code
diff --git a/modules/gettext.js b/modules/gettext.js
index 92a101d2..fd87d9a1 100644
--- a/modules/gettext.js
+++ b/modules/gettext.js
@@ -96,7 +96,7 @@ var domain = function(domainName) {
 
         pgettext: function(context, msgid) {
             return GLib.dpgettext2(domainName, context, msgid);
-        }
+        },
     };
 };
 
diff --git a/modules/overrides/GObject.js b/modules/overrides/GObject.js
index f5458692..0bb7450e 100644
--- a/modules/overrides/GObject.js
+++ b/modules/overrides/GObject.js
@@ -507,7 +507,7 @@ function _init() {
     GObject.AccumulatorType = {
         NONE: 0,
         FIRST_WINS: 1,
-        TRUE_HANDLED: 2
+        TRUE_HANDLED: 2,
     };
 
     GObject.Object.prototype.disconnect = function(id) {
diff --git a/modules/overrides/Gio.js b/modules/overrides/Gio.js
index d26d692b..262b3bf4 100644
--- a/modules/overrides/Gio.js
+++ b/modules/overrides/Gio.js
@@ -227,7 +227,7 @@ function _addDBusConvenience() {
             get: getter,
             set: setter,
             configurable: false,
-            enumerable: true
+            enumerable: true,
         });
     }
 }
@@ -468,7 +468,7 @@ function _init() {
 
         watch_name: Gio.bus_watch_name,
         watch_name_on_connection: Gio.bus_watch_name_on_connection,
-        unwatch_name: Gio.bus_unwatch_name
+        unwatch_name: Gio.bus_unwatch_name,
     };
 
     Gio.DBusConnection.prototype.watch_name = function(name, flags, appeared, vanished) {
diff --git a/modules/tweener/tweenList.js b/modules/tweener/tweenList.js
index fa5876cb..3d0b3898 100644
--- a/modules/tweener/tweenList.js
+++ b/modules/tweener/tweenList.js
@@ -99,7 +99,7 @@ TweenList.prototype = {
         tween.hasStarted = this.hasStarted;
 
         return tween;
-    }
+    },
 };
 
 function makePropertiesChain(obj) {
diff --git a/modules/tweener/tweener.js b/modules/tweener/tweener.js
index ea9014ac..35eb5281 100644
--- a/modules/tweener/tweener.js
+++ b/modules/tweener/tweener.js
@@ -106,7 +106,7 @@ FrameTicker.prototype = {
 
     getTime: function() {
         return this._currentTime;
-    }
+    },
 };
 Signals.addSignalMethods(FrameTicker.prototype);
 
@@ -397,7 +397,7 @@ var restrictedWords = {
     onUpdateScope: true,
     onCompleteScope: true,
     onOverwriteScope: true,
-    onErrorScope: true
+    onErrorScope: true,
 };
 
 function _constructPropertyList(obj) {
@@ -419,7 +419,7 @@ function _constructPropertyList(obj) {
                             valueStart: undefined,
                             valueComplete: splitProperties2[j].value,
                             arrayIndex: splitProperties2[j].arrayIndex,
-                            isSpecialProperty: false
+                            isSpecialProperty: false,
                         };
                     }
                 } else {
@@ -427,7 +427,7 @@ function _constructPropertyList(obj) {
                         valueStart: undefined,
                         valueComplete: splitProperties[i].value,
                         arrayIndex: splitProperties[i].arrayIndex,
-                        isSpecialProperty: false
+                        isSpecialProperty: false,
                     };
                 }
             }
@@ -437,13 +437,13 @@ function _constructPropertyList(obj) {
             for (let i = 0; i < tempModifiedProperties.length; i++) {
                 modifiedProperties[tempModifiedProperties[i].name] = {
                     modifierParameters: tempModifiedProperties[i].parameters,
-                    modifierFunction: _specialPropertyModifierList[istr].getValue
+                    modifierFunction: _specialPropertyModifierList[istr].getValue,
                 };
             }
         } else {
             properties[istr] = {
                 valueStart: undefined,
-                valueComplete: obj[istr]
+                valueComplete: obj[istr],
             };
         }
     }
@@ -480,7 +480,7 @@ PropertyInfo.prototype = {
         this.hasModifier            =       Boolean(modifierFunction);
         this.modifierFunction       =       modifierFunction;
         this.modifierParameters     =       modifierParameters;
-    }
+    },
 };
 
 function _addTweenOrCaller(target, tweeningParameters, isCaller) {
@@ -861,21 +861,21 @@ function registerSpecialProperty(name, getFunction, setFunction,
         getValue: getFunction,
         setValue: setFunction,
         parameters: parameters,
-        preProcess: preProcessFunction
+        preProcess: preProcessFunction,
     };
 }
 
 function registerSpecialPropertyModifier(name, modifyFunction, getFunction) {
     _specialPropertyModifierList[name] = {
         modifyValues: modifyFunction,
-        getValue: getFunction
+        getValue: getFunction,
     };
 }
 
 function registerSpecialPropertySplitter(name, splitFunction, parameters) {
     _specialPropertySplitterList[name] = {
         splitValues: splitFunction,
-        parameters: parameters
+        parameters: parameters,
     };
 }
 



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