[gjs: 34/43] CI: Add space-before-function-paren to eslint rules



commit 86f5d9dbc5510ecf97621c39721db31089618432
Author: Philip Chimento <philip chimento gmail com>
Date:   Sun Aug 4 11:24:01 2019 -0700

    CI: Add space-before-function-paren to eslint rules
    
    This is done quite inconsistently across the codebase, so we pick the
    most common style and enforce it. That is, no space before function
    parentheses, except in the case of anonymous functions and async arrow
    functions, where we add a space so as not to conflict with the rule of
    spaces around keywords.

 .eslintrc.yml                              |  6 +++
 examples/gio-cat.js                        |  2 +-
 installed-tests/js/testByteArray.js        |  2 +-
 installed-tests/js/testEverythingBasic.js  |  6 +--
 installed-tests/js/testFundamental.js      |  2 +-
 installed-tests/js/testGDBus.js            | 14 ++---
 installed-tests/js/testGIMarshalling.js    |  6 +--
 installed-tests/js/testGObjectClass.js     |  6 +--
 installed-tests/js/testGObjectInterface.js |  2 +-
 installed-tests/js/testGtk.js              |  2 +-
 installed-tests/js/testLegacyByteArray.js  | 42 +++++++--------
 installed-tests/js/testLegacyClass.js      |  4 +-
 installed-tests/js/testTweener.js          |  6 +--
 modules/_bootstrap/coverage.js             |  2 +-
 modules/_bootstrap/debugger.js             | 14 ++---
 modules/_bootstrap/default.js              |  2 +-
 modules/_legacy.js                         | 26 +++++-----
 modules/lang.js                            |  2 +-
 modules/overrides/GLib.js                  | 18 +++----
 modules/overrides/GObject.js               | 58 ++++++++++-----------
 modules/overrides/Gio.js                   | 32 ++++++------
 modules/overrides/Gtk.js                   |  8 +--
 modules/package.js                         |  2 +-
 modules/tweener/equations.js               | 82 +++++++++++++++---------------
 modules/tweener/tweener.js                 |  2 +-
 25 files changed, 177 insertions(+), 171 deletions(-)
---
diff --git a/.eslintrc.yml b/.eslintrc.yml
index 3a55280c..8a248248 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -129,6 +129,12 @@ rules:
     - before: false
       after: true
   space-before-blocks: error
+  space-before-function-paren:
+    - error
+    - named: never
+      # for `function ()` and `async () =>`, preserve space around keywords
+      anonymous: always
+      asyncArrow: always
   space-infix-ops:
     - error
     - int32Hint: false
diff --git a/examples/gio-cat.js b/examples/gio-cat.js
index b6178947..b80af3bc 100644
--- a/examples/gio-cat.js
+++ b/examples/gio-cat.js
@@ -7,7 +7,7 @@ let loop = GLib.MainLoop.new(null, false);
 
 function cat(filename) {
     let f = Gio.file_new_for_path(filename);
-    f.load_contents_async(null, function(obj, res) {
+    f.load_contents_async(null, (obj, res) => {
         let contents;
         try {
             contents = obj.load_contents_finish(res)[1];
diff --git a/installed-tests/js/testByteArray.js b/installed-tests/js/testByteArray.js
index 6432da85..018a0589 100644
--- a/installed-tests/js/testByteArray.js
+++ b/installed-tests/js/testByteArray.js
@@ -26,7 +26,7 @@ describe('Byte array', function () {
         [0xe2, 0x85, 0x9c].forEach((val, ix) => expect(a[ix]).toEqual(val));
     });
 
-    it('can be converted to a string of ASCII characters', function() {
+    it('can be converted to a string of ASCII characters', function () {
         let a = new Uint8Array(4);
         a[0] = 97;
         a[1] = 98;
diff --git a/installed-tests/js/testEverythingBasic.js b/installed-tests/js/testEverythingBasic.js
index 2b158c3d..0ea50d9a 100644
--- a/installed-tests/js/testEverythingBasic.js
+++ b/installed-tests/js/testEverythingBasic.js
@@ -421,7 +421,7 @@ describe('Life, the Universe and Everything', function () {
         expect(Regress.TestEnum.param(Regress.TestEnum.VALUE4)).toEqual('value4');
     });
 
-    xit('can be answered with GObject.set()', function() {
+    xit('can be answered with GObject.set()', function () {
         let o = new Regress.TestObj();
         o.set({string: 'Answer', int: 42});
         expect(o.string).toBe('Answer');
@@ -570,7 +570,7 @@ describe('Life, the Universe and Everything', function () {
             expect(handler).toHaveBeenCalledWith([jasmine.any(Object), null]);
         }).pend('Not yet implemented');
 
-        xit('signal with int in-out parameter', function() {
+        xit('signal with int in-out parameter', function () {
             let handler = jasmine.createSpy('handler').and.callFake(() => 43);
             o.connect('sig-with-inout-int', handler);
             o.emit_sig_with_inout_int();
@@ -759,7 +759,7 @@ describe('Life, the Universe and Everything', function () {
         }
     });
 
-    it('correctly converts a NULL strv in a GValue to an empty array', function() {
+    it('correctly converts a NULL strv in a GValue to an empty array', function () {
         let v = Regress.test_null_strv_in_gvalue();
         expect(v.length).toEqual(0);
     });
diff --git a/installed-tests/js/testFundamental.js b/installed-tests/js/testFundamental.js
index a947f836..dcd2d4a8 100644
--- a/installed-tests/js/testFundamental.js
+++ b/installed-tests/js/testFundamental.js
@@ -5,7 +5,7 @@ describe('Fundamental type support', function () {
         expect(() => new Regress.TestFundamentalSubObject('plop')).not.toThrow();
     });
 
-    it('constructs a subtype of a hidden (no introspection data) fundamental type', function() {
+    it('constructs a subtype of a hidden (no introspection data) fundamental type', function () {
         expect(() => Regress.test_create_fundamental_hidden_class_instance()).not.toThrow();
     });
 
diff --git a/installed-tests/js/testGDBus.js b/installed-tests/js/testGDBus.js
index e94a9908..4ab512aa 100644
--- a/installed-tests/js/testGDBus.js
+++ b/installed-tests/js/testGDBus.js
@@ -190,7 +190,7 @@ class Test {
      * the input arguments */
     echoAsync(parameters, invocation) {
         var [someString, someInt] = parameters;
-        GLib.idle_add(GLib.PRIORITY_DEFAULT, function() {
+        GLib.idle_add(GLib.PRIORITY_DEFAULT, function () {
             invocation.return_value(new GLib.Variant('(si)', [someString, someInt]));
             return false;
         });
@@ -243,7 +243,7 @@ class Test {
     }
 
     fdOut2Async([bytes], invocation) {
-        GLib.idle_add(GLib.PRIORITY_DEFAULT, function() {
+        GLib.idle_add(GLib.PRIORITY_DEFAULT, function () {
             const fd = GjsPrivate.open_bytes(bytes);
             const fdList = Gio.UnixFDList.new_from_array([fd]);
             invocation.return_value_with_unix_fd_list(new GLib.Variant('(h)', [0]),
@@ -354,7 +354,7 @@ describe('Exported DBus object', function () {
         GLib.test_expect_message('Gjs', GLib.LogLevelFlags.LEVEL_WARNING,
             'JS ERROR: Exception in method call: alwaysThrowException: *');
 
-        proxy.alwaysThrowExceptionRemote({}, function(result, excp) {
+        proxy.alwaysThrowExceptionRemote({}, function (result, excp) {
             expect(excp).not.toBeNull();
             loop.quit();
         });
@@ -370,7 +370,7 @@ describe('Exported DBus object', function () {
         // argument destructuring will not propagate across the FFI boundary
         // and the main loop will never quit.
         // https://bugzilla.gnome.org/show_bug.cgi?id=729015
-        proxy.alwaysThrowExceptionRemote({}, function([a, b, c], excp) {
+        proxy.alwaysThrowExceptionRemote({}, function ([a, b, c], excp) {
             expect(a).not.toBeDefined();
             expect(b).not.toBeDefined();
             expect(c).not.toBeDefined();
@@ -444,7 +444,7 @@ describe('Exported DBus object', function () {
     });
 
     it('can call a remote method with multiple return values', function () {
-        proxy.multipleOutValuesRemote(function(result, excp) {
+        proxy.multipleOutValuesRemote(function (result, excp) {
             expect(result).toEqual(['Hello', 'World', '!']);
             expect(excp).toBeNull();
             loop.quit();
@@ -482,7 +482,7 @@ describe('Exported DBus object', function () {
     });
 
     it('handles a bad signature by throwing an exception', function () {
-        proxy.arrayOutBadSigRemote(function(result, excp) {
+        proxy.arrayOutBadSigRemote(function (result, excp) {
             expect(excp).not.toBeNull();
             loop.quit();
         });
@@ -494,7 +494,7 @@ describe('Exported DBus object', function () {
         let someInt = 42;
 
         proxy.echoRemote(someString, someInt,
-            function(result, excp) {
+            function (result, excp) {
                 expect(excp).toBeNull();
                 expect(result).toEqual([someString, someInt]);
                 loop.quit();
diff --git a/installed-tests/js/testGIMarshalling.js b/installed-tests/js/testGIMarshalling.js
index 96fbf94e..07224ef8 100644
--- a/installed-tests/js/testGIMarshalling.js
+++ b/installed-tests/js/testGIMarshalling.js
@@ -221,7 +221,7 @@ describe('GArray', function () {
     });
 });
 
-describe('GByteArray', function() {
+describe('GByteArray', function () {
     const refByteArray = Uint8Array.from([0, 49, 0xFF, 51]);
 
     it('can be passed in with transfer none', function () {
@@ -239,7 +239,7 @@ describe('GByteArray', function() {
     });
 });
 
-describe('GBytes', function() {
+describe('GBytes', function () {
     const refByteArray = Uint8Array.from([0, 49, 0xFF, 51]);
 
     it('can be created from an array and passed in', function () {
@@ -284,7 +284,7 @@ describe('GBytes', function() {
 });
 
 describe('GPtrArray', function () {
-    describe('of strings', function() {
+    describe('of strings', function () {
         const refArray = ['0', '1', '2'];
 
         it('can be passed to a function with transfer none', function () {
diff --git a/installed-tests/js/testGObjectClass.js b/installed-tests/js/testGObjectClass.js
index a23768d6..dafdec1a 100644
--- a/installed-tests/js/testGObjectClass.js
+++ b/installed-tests/js/testGObjectClass.js
@@ -163,7 +163,7 @@ describe('GObject class with decorator', function () {
         expect(() => GObject.registerClass(class Bar extends Foo {})).toThrow();
     });
 
-    it('throws an error when used with an abstract class', function() {
+    it('throws an error when used with an abstract class', function () {
         expect(() => new MyAbstractObject()).toThrow();
     });
 
@@ -376,14 +376,14 @@ describe('GObject class with decorator', function () {
         expect(() => new MyCustomCharset() && new MySecondCustomCharset()).not.toThrow();
     });
 
-    it('resolves properties from interfaces', function() {
+    it('resolves properties from interfaces', function () {
         const mon = Gio.NetworkMonitor.get_default();
         expect(mon.network_available).toBeDefined();
         expect(mon.networkAvailable).toBeDefined();
         expect(mon['network-available']).toBeDefined();
     });
 
-    it('has a toString() defintion', function() {
+    it('has a toString() defintion', function () {
         expect(myInstance.toString()).toMatch(
             /\[object instance wrapper GType:Gjs_MyObject jsobj@0x[a-f0-9]+ native@0x[a-f0-9]+\]/);
         expect(new Derived().toString()).toMatch(
diff --git a/installed-tests/js/testGObjectInterface.js b/installed-tests/js/testGObjectInterface.js
index 2098f9fe..a6e0ffa2 100644
--- a/installed-tests/js/testGObjectInterface.js
+++ b/installed-tests/js/testGObjectInterface.js
@@ -273,7 +273,7 @@ describe('GObject interface', function () {
             253, 'testGObjectMustOverrideInterfaceProperties');
     });
 
-    it('can have introspected properties overriden', function() {
+    it('can have introspected properties overriden', function () {
         let obj = new ImplementationOfIntrospectedInterface();
         expect(obj.name).toEqual('inaction');
     });
diff --git a/installed-tests/js/testGtk.js b/installed-tests/js/testGtk.js
index deede7c6..06e22291 100755
--- a/installed-tests/js/testGtk.js
+++ b/installed-tests/js/testGtk.js
@@ -51,7 +51,7 @@ const MyComplexGtkSubclass = GObject.registerClass({
 // Sadly, putting this in the body of the class will prevent calling
 // get_template_child, since MyComplexGtkSubclass will be bound to the ES6
 // class name without the GObject goodies in it
-MyComplexGtkSubclass.prototype.testChildrenExist = function() {
+MyComplexGtkSubclass.prototype.testChildrenExist = function () {
     this._internalLabel = this.get_template_child(MyComplexGtkSubclass, 'label-child');
     expect(this._internalLabel).toEqual(jasmine.anything());
 
diff --git a/installed-tests/js/testLegacyByteArray.js b/installed-tests/js/testLegacyByteArray.js
index 6c64375b..39102737 100644
--- a/installed-tests/js/testLegacyByteArray.js
+++ b/installed-tests/js/testLegacyByteArray.js
@@ -1,29 +1,29 @@
 const ByteArray = imports.byteArray;
 const GIMarshallingTests = imports.gi.GIMarshallingTests;
 
-describe('Legacy byte array', function() {
-    it('has length 0 for empty array', function() {
+describe('Legacy byte array', function () {
+    it('has length 0 for empty array', function () {
         let a = new ByteArray.ByteArray();
         expect(a.length).toEqual(0);
     });
 
-    describe('initially sized to 10', function() {
+    describe('initially sized to 10', function () {
         let a;
-        beforeEach(function() {
+        beforeEach(function () {
             a = new ByteArray.ByteArray(10);
         });
 
-        it('has length 10', function() {
+        it('has length 10', function () {
             expect(a.length).toEqual(10);
         });
 
-        it('is initialized to zeroes', function() {
+        it('is initialized to zeroes', function () {
             for (let i = 0; i < a.length; ++i)
                 expect(a[i]).toEqual(0);
         });
     });
 
-    it('assigns values correctly', function() {
+    it('assigns values correctly', function () {
         let a = new ByteArray.ByteArray(256);
 
         for (let i = 0; i < a.length; ++i)
@@ -33,66 +33,66 @@ describe('Legacy byte array', function() {
             expect(a[i]).toEqual(255 - i);
     });
 
-    describe('assignment past end', function() {
+    describe('assignment past end', function () {
         let a;
-        beforeEach(function() {
+        beforeEach(function () {
             a = new ByteArray.ByteArray();
             a[2] = 5;
         });
 
-        it('implicitly lengthens the array', function() {
+        it('implicitly lengthens the array', function () {
             expect(a.length).toEqual(3);
             expect(a[2]).toEqual(5);
         });
 
-        it('implicitly creates zero bytes', function() {
+        it('implicitly creates zero bytes', function () {
             expect(a[0]).toEqual(0);
             expect(a[1]).toEqual(0);
         });
     });
 
-    it('changes the length when assigning to length property', function() {
+    it('changes the length when assigning to length property', function () {
         let a = new ByteArray.ByteArray(20);
         expect(a.length).toEqual(20);
         a.length = 5;
         expect(a.length).toEqual(5);
     });
 
-    describe('conversions', function() {
+    describe('conversions', function () {
         let a;
-        beforeEach(function() {
+        beforeEach(function () {
             a = new ByteArray.ByteArray();
             a[0] = 255;
         });
 
-        it('gives a byte 5 when assigning 5', function() {
+        it('gives a byte 5 when assigning 5', function () {
             a[0] = 5;
             expect(a[0]).toEqual(5);
         });
 
-        it('gives a byte 0 when assigning null', function() {
+        it('gives a byte 0 when assigning null', function () {
             a[0] = null;
             expect(a[0]).toEqual(0);
         });
 
-        it('gives a byte 0 when assigning undefined', function() {
+        it('gives a byte 0 when assigning undefined', function () {
             a[0] = undefined;
             expect(a[0]).toEqual(0);
         });
 
-        it('rounds off when assigning a double', function() {
+        it('rounds off when assigning a double', function () {
             a[0] = 3.14;
             expect(a[0]).toEqual(3);
         });
     });
 
-    it('can be created from an array', function() {
+    it('can be created from an array', function () {
         let a = ByteArray.fromArray([1, 2, 3, 4]);
         expect(a.length).toEqual(4);
         [1, 2, 3, 4].forEach((val, ix) => expect(a[ix]).toEqual(val));
     });
 
-    it('can be converted to a string of ASCII characters', function() {
+    it('can be converted to a string of ASCII characters', function () {
         let a = new ByteArray.ByteArray(4);
         a[0] = 97;
         a[1] = 98;
@@ -103,7 +103,7 @@ describe('Legacy byte array', function() {
         expect(s).toEqual('abcd');
     });
 
-    it('can be passed in with transfer none', function() {
+    it('can be passed in with transfer none', function () {
         const refByteArray = ByteArray.fromArray([0, 49, 0xFF, 51]);
         expect(() => GIMarshallingTests.bytearray_none_in(refByteArray)).not.toThrow();
     });
diff --git a/installed-tests/js/testLegacyClass.js b/installed-tests/js/testLegacyClass.js
index 7c0ab77a..1599508c 100644
--- a/installed-tests/js/testLegacyClass.js
+++ b/installed-tests/js/testLegacyClass.js
@@ -21,7 +21,7 @@ const MetaClass = new Lang.Class({
         this.parent(params);
 
         if (params.Extended) {
-            this.prototype.dynamic_method = this.wrapFunction('dynamic_method', function() {
+            this.prototype.dynamic_method = this.wrapFunction('dynamic_method', function () {
                 return 73;
             });
 
@@ -295,7 +295,7 @@ describe('Class framework', function () {
         expect(newAbstract.foo).toEqual(42);
     });
 
-    it('allows ES6 classes to inherit from abstract base classes', function() {
+    it('allows ES6 classes to inherit from abstract base classes', function () {
         class AbstractImpl extends AbstractBase {}
 
         let newAbstract = new AbstractImpl();
diff --git a/installed-tests/js/testTweener.js b/installed-tests/js/testTweener.js
index 4c00e81c..1f6efe57 100644
--- a/installed-tests/js/testTweener.js
+++ b/installed-tests/js/testTweener.js
@@ -277,10 +277,10 @@ describe('Tweener', function () {
     it('can register special properties', function () {
         Tweener.registerSpecialProperty(
             'negative_x',
-            function(obj) {
+            function (obj) {
                 return -obj.x;
             },
-            function(obj, val) {
+            function (obj, val) {
                 obj.x = -val;
             }
         );
@@ -340,7 +340,7 @@ describe('Tweener', function () {
     it('can split properties into more than one special property', function () {
         Tweener.registerSpecialPropertySplitter(
             'xnegy',
-            function(val) {
+            function (val) {
                 return [{name: 'x', value: val},
                     {name: 'y', value: -val}];
             }
diff --git a/modules/_bootstrap/coverage.js b/modules/_bootstrap/coverage.js
index b2998700..472de844 100644
--- a/modules/_bootstrap/coverage.js
+++ b/modules/_bootstrap/coverage.js
@@ -1,4 +1,4 @@
-(function(exports) {
+(function (exports) {
     'use strict';
 
     exports.debugger = new Debugger(exports.debuggee);
diff --git a/modules/_bootstrap/debugger.js b/modules/_bootstrap/debugger.js
index ee01d77c..ed407cab 100644
--- a/modules/_bootstrap/debugger.js
+++ b/modules/_bootstrap/debugger.js
@@ -98,7 +98,7 @@ Object.defineProperty(Debugger.Frame.prototype, 'num', {
     },
 });
 
-Debugger.Frame.prototype.describeFrame = function() {
+Debugger.Frame.prototype.describeFrame = function () {
     if (this.type === 'call') {
         return `${this.callee.name || '<anonymous>'}(${
             this.arguments.map(dvToString).join(', ')})`;
@@ -109,13 +109,13 @@ Debugger.Frame.prototype.describeFrame = function() {
     }
 };
 
-Debugger.Frame.prototype.describePosition = function() {
+Debugger.Frame.prototype.describePosition = function () {
     if (this.script)
         return this.script.describeOffset(this.offset);
     return null;
 };
 
-Debugger.Frame.prototype.describeFull = function() {
+Debugger.Frame.prototype.describeFull = function () {
     const fr = this.describeFrame();
     const pos = this.describePosition();
     if (pos)
@@ -821,12 +821,12 @@ function onInitialEnterFrame(frame) {
 }
 
 var dbg = new Debugger();
-dbg.onNewPromise = function({promiseID, promiseAllocationSite}) {
+dbg.onNewPromise = function ({promiseID, promiseAllocationSite}) {
     const site = promiseAllocationSite.toString().split('\n')[0];
     print(`Promise ${promiseID} started from ${site}`);
     return undefined;
 };
-dbg.onPromiseSettled = function(promise) {
+dbg.onPromiseSettled = function (promise) {
     let message = `Promise ${promise.promiseID} ${promise.promiseState} `;
     message += `after ${promise.promiseTimeToResolution.toFixed(3)} ms`;
     let brief, full;
@@ -843,14 +843,14 @@ dbg.onPromiseSettled = function(promise) {
         print(full);
     return undefined;
 };
-dbg.onDebuggerStatement = function(frame) {
+dbg.onDebuggerStatement = function (frame) {
     return saveExcursion(() => {
         topFrame = focusedFrame = frame;
         print(`Debugger statement, ${frame.describeFull()}`);
         return repl();
     });
 };
-dbg.onExceptionUnwind = function(frame, value) {
+dbg.onExceptionUnwind = function (frame, value) {
     return saveExcursion(() => {
         topFrame = focusedFrame = frame;
         print("Unwinding due to exception. (Type 'c' to continue unwinding.)");
diff --git a/modules/_bootstrap/default.js b/modules/_bootstrap/default.js
index 29dbdb1e..cc5f94bb 100644
--- a/modules/_bootstrap/default.js
+++ b/modules/_bootstrap/default.js
@@ -1,4 +1,4 @@
-(function(exports) {
+(function (exports) {
     'use strict';
 
     // Do early initialization here.
diff --git a/modules/_legacy.js b/modules/_legacy.js
index 10234ca0..40d64b89 100644
--- a/modules/_legacy.js
+++ b/modules/_legacy.js
@@ -13,13 +13,13 @@ function _Base() {
 }
 
 _Base.__super__ = null;
-_Base.prototype._init = function() { };
-_Base.prototype._construct = function(...args) {
+_Base.prototype._init = function () { };
+_Base.prototype._construct = function (...args) {
     this._init(...args);
     return this;
 };
 _Base.prototype.__name__ = '_Base';
-_Base.prototype.toString = function() {
+_Base.prototype.toString = function () {
     return `[object ${this.__name__}]`;
 };
 
@@ -72,7 +72,7 @@ Class.prototype = Object.create(_Base.prototype);
 Class.prototype.constructor = Class;
 Class.prototype.__name__ = 'Class';
 
-Class.prototype.wrapFunction = function(name, meth) {
+Class.prototype.wrapFunction = function (name, meth) {
     if (meth._origin)
         meth = meth._origin;
 
@@ -91,11 +91,11 @@ Class.prototype.wrapFunction = function(name, meth) {
     return wrapper;
 };
 
-Class.prototype.toString = function() {
+Class.prototype.toString = function () {
     return `[object ${this.__name__} for ${this.prototype.__name__}]`;
 };
 
-Class.prototype._construct = function(params, ...otherArgs) {
+Class.prototype._construct = function (params, ...otherArgs) {
     if (!params.Name)
         throw new TypeError("Classes require an explicit 'Name' parameter.");
 
@@ -174,7 +174,7 @@ Class.prototype.implements = function (iface) {
 };
 
 // key can be either a string or a symbol
-Class.prototype._copyPropertyDescriptor = function(params, propertyObj, key) {
+Class.prototype._copyPropertyDescriptor = function (params, propertyObj, key) {
     let descriptor = Object.getOwnPropertyDescriptor(params, key);
 
     if (typeof descriptor.value === 'function')
@@ -188,7 +188,7 @@ Class.prototype._copyPropertyDescriptor = function(params, propertyObj, key) {
     propertyObj[key] = descriptor;
 };
 
-Class.prototype._init = function(params) {
+Class.prototype._init = function (params) {
     let className = params.Name;
 
     let propertyObj = { };
@@ -287,7 +287,7 @@ Class.MetaInterface = Interface;
  * of the interface. Creating a class that doesn't override the function will
  * throw an error.
  */
-Interface.UNIMPLEMENTED = function UNIMPLEMENTED () {
+Interface.UNIMPLEMENTED = function UNIMPLEMENTED() {
     throw new Error('Not implemented');
 };
 
@@ -465,7 +465,7 @@ function defineGObjectLegacyObjects(GObject) {
             if (signals)
                 _createSignals(this.$gtype, signals);
 
-            Object.getOwnPropertyNames(params).forEach(function(name) {
+            Object.getOwnPropertyNames(params).forEach(name => {
                 if (['Name', 'Extends', 'Abstract'].includes(name))
                     return;
 
@@ -480,7 +480,7 @@ function defineGObjectLegacyObjects(GObject) {
                     } else if (name.startsWith('on_')) {
                         let id = GObject.signal_lookup(name.slice(3).replace('_', '-'), this.$gtype);
                         if (id !== 0) {
-                            GObject.signal_override_class_closure(id, this.$gtype, function(...argArray) {
+                            GObject.signal_override_class_closure(id, this.$gtype, function (...argArray) {
                                 let emitter = argArray.shift();
 
                                 return wrapped.apply(emitter, argArray);
@@ -488,7 +488,7 @@ function defineGObjectLegacyObjects(GObject) {
                         }
                     }
                 }
-            }.bind(this));
+            });
         },
 
         _isValidClass(klass) {
@@ -661,7 +661,7 @@ function defineGtkLegacyObjects(GObject, Gtk) {
             delete params.CssName;
 
             if (template) {
-                params._instance_init = function() {
+                params._instance_init = function () {
                     this.init_template();
                 };
             }
diff --git a/modules/lang.js b/modules/lang.js
index e59a2d10..9986f03c 100644
--- a/modules/lang.js
+++ b/modules/lang.js
@@ -83,7 +83,7 @@ function bind(obj, callback, ...bindArguments) {
         return callback.bind(obj);
 
     let me = obj;
-    return function(...args) {
+    return function (...args) {
         args = args.concat(bindArguments);
         return callback.apply(me, args);
     };
diff --git a/modules/overrides/GLib.js b/modules/overrides/GLib.js
index 41d8f81c..db8eee08 100644
--- a/modules/overrides/GLib.js
+++ b/modules/overrides/GLib.js
@@ -274,11 +274,11 @@ function _init() {
     // small HACK: we add a matches() method to standard Errors so that
     // you can do "if (e.matches(Ns.FooError, Ns.FooError.SOME_CODE))"
     // without checking instanceof
-    Error.prototype.matches = function() {
+    Error.prototype.matches = function () {
         return false;
     };
 
-    this.Variant._new_internal = function(sig, value) {
+    this.Variant._new_internal = function (sig, value) {
         let signature = Array.prototype.slice.call(sig);
 
         let variant = _packVariant(signature, value);
@@ -289,13 +289,13 @@ function _init() {
     };
 
     // Deprecate version of new GLib.Variant()
-    this.Variant.new = function(sig, value) {
+    this.Variant.new = function (sig, value) {
         return new GLib.Variant(sig, value);
     };
-    this.Variant.prototype.unpack = function() {
+    this.Variant.prototype.unpack = function () {
         return _unpackVariant(this, false);
     };
-    this.Variant.prototype.deepUnpack = function() {
+    this.Variant.prototype.deepUnpack = function () {
         return _unpackVariant(this, true);
     };
     // backwards compatibility alias
@@ -306,15 +306,15 @@ function _init() {
         return _unpackVariant(this, true, true);
     };
 
-    this.Variant.prototype.toString = function() {
+    this.Variant.prototype.toString = function () {
         return `[object variant of type "${this.get_type_string()}"]`;
     };
 
-    this.Bytes.prototype.toArray = function() {
+    this.Bytes.prototype.toArray = function () {
         return imports.byteArray.fromGBytes(this);
     };
 
-    this.log_structured = function(logDomain, logLevel, stringFields) {
+    this.log_structured = function (logDomain, logLevel, stringFields) {
         let fields = {};
         for (let key in stringFields)
             fields[key] = new GLib.Variant('s', stringFields[key]);
@@ -322,7 +322,7 @@ function _init() {
         GLib.log_variant(logDomain, logLevel, new GLib.Variant('a{sv}', fields));
     };
 
-    this.VariantDict.prototype.lookup = function(key, variantType = null, deep = false) {
+    this.VariantDict.prototype.lookup = function (key, variantType = null, deep = false) {
         if (typeof variantType === 'string')
             variantType = new GLib.VariantType(variantType);
 
diff --git a/modules/overrides/GObject.js b/modules/overrides/GObject.js
index bd1789ee..658d8fe6 100644
--- a/modules/overrides/GObject.js
+++ b/modules/overrides/GObject.js
@@ -181,13 +181,13 @@ function _init() {
     function _makeDummyClass(obj, name, upperName, gtypeName, actual) {
         let gtype = GObject.type_from_name(gtypeName);
         obj[`TYPE_${upperName}`] = gtype;
-        obj[name] = function(v) {
+        obj[name] = function (v) {
             return new actual(v);
         };
         obj[name].$gtype = gtype;
     }
 
-    _makeDummyClass(GObject, 'VoidType', 'NONE', 'void', function() {});
+    _makeDummyClass(GObject, 'VoidType', 'NONE', 'void', function () {});
     _makeDummyClass(GObject, 'Char', 'CHAR', 'gchar', Number);
     _makeDummyClass(GObject, 'UChar', 'UCHAR', 'guchar', Number);
     _makeDummyClass(GObject, 'Unichar', 'UNICHAR', 'gint', String);
@@ -224,71 +224,71 @@ function _init() {
 
     _makeDummyClass(GObject, 'Type', 'GTYPE', 'GType', GObject.type_from_name);
 
-    GObject.ParamSpec.char = function(name, nick, blurb, flags, minimum, maximum, defaultValue) {
+    GObject.ParamSpec.char = function (name, nick, blurb, flags, minimum, maximum, defaultValue) {
         return GObject.param_spec_char(name, nick, blurb, minimum, maximum, defaultValue, flags);
     };
 
-    GObject.ParamSpec.uchar = function(name, nick, blurb, flags, minimum, maximum, defaultValue) {
+    GObject.ParamSpec.uchar = function (name, nick, blurb, flags, minimum, maximum, defaultValue) {
         return GObject.param_spec_uchar(name, nick, blurb, minimum, maximum, defaultValue, flags);
     };
 
-    GObject.ParamSpec.int = function(name, nick, blurb, flags, minimum, maximum, defaultValue) {
+    GObject.ParamSpec.int = function (name, nick, blurb, flags, minimum, maximum, defaultValue) {
         return GObject.param_spec_int(name, nick, blurb, minimum, maximum, defaultValue, flags);
     };
 
-    GObject.ParamSpec.uint = function(name, nick, blurb, flags, minimum, maximum, defaultValue) {
+    GObject.ParamSpec.uint = function (name, nick, blurb, flags, minimum, maximum, defaultValue) {
         return GObject.param_spec_uint(name, nick, blurb, minimum, maximum, defaultValue, flags);
     };
 
-    GObject.ParamSpec.long = function(name, nick, blurb, flags, minimum, maximum, defaultValue) {
+    GObject.ParamSpec.long = function (name, nick, blurb, flags, minimum, maximum, defaultValue) {
         return GObject.param_spec_long(name, nick, blurb, minimum, maximum, defaultValue, flags);
     };
 
-    GObject.ParamSpec.ulong = function(name, nick, blurb, flags, minimum, maximum, defaultValue) {
+    GObject.ParamSpec.ulong = function (name, nick, blurb, flags, minimum, maximum, defaultValue) {
         return GObject.param_spec_ulong(name, nick, blurb, minimum, maximum, defaultValue, flags);
     };
 
-    GObject.ParamSpec.int64 = function(name, nick, blurb, flags, minimum, maximum, defaultValue) {
+    GObject.ParamSpec.int64 = function (name, nick, blurb, flags, minimum, maximum, defaultValue) {
         return GObject.param_spec_int64(name, nick, blurb, minimum, maximum, defaultValue, flags);
     };
 
-    GObject.ParamSpec.uint64 = function(name, nick, blurb, flags, minimum, maximum, defaultValue) {
+    GObject.ParamSpec.uint64 = function (name, nick, blurb, flags, minimum, maximum, defaultValue) {
         return GObject.param_spec_uint64(name, nick, blurb, minimum, maximum, defaultValue, flags);
     };
 
-    GObject.ParamSpec.float = function(name, nick, blurb, flags, minimum, maximum, defaultValue) {
+    GObject.ParamSpec.float = function (name, nick, blurb, flags, minimum, maximum, defaultValue) {
         return GObject.param_spec_float(name, nick, blurb, minimum, maximum, defaultValue, flags);
     };
 
-    GObject.ParamSpec.boolean = function(name, nick, blurb, flags, defaultValue) {
+    GObject.ParamSpec.boolean = function (name, nick, blurb, flags, defaultValue) {
         return GObject.param_spec_boolean(name, nick, blurb, defaultValue, flags);
     };
 
-    GObject.ParamSpec.flags = function(name, nick, blurb, flags, flagsType, defaultValue) {
+    GObject.ParamSpec.flags = function (name, nick, blurb, flags, flagsType, defaultValue) {
         return GObject.param_spec_flags(name, nick, blurb, flagsType, defaultValue, flags);
     };
 
-    GObject.ParamSpec.enum = function(name, nick, blurb, flags, enumType, defaultValue) {
+    GObject.ParamSpec.enum = function (name, nick, blurb, flags, enumType, defaultValue) {
         return GObject.param_spec_enum(name, nick, blurb, enumType, defaultValue, flags);
     };
 
-    GObject.ParamSpec.double = function(name, nick, blurb, flags, minimum, maximum, defaultValue) {
+    GObject.ParamSpec.double = function (name, nick, blurb, flags, minimum, maximum, defaultValue) {
         return GObject.param_spec_double(name, nick, blurb, minimum, maximum, defaultValue, flags);
     };
 
-    GObject.ParamSpec.string = function(name, nick, blurb, flags, defaultValue) {
+    GObject.ParamSpec.string = function (name, nick, blurb, flags, defaultValue) {
         return GObject.param_spec_string(name, nick, blurb, defaultValue, flags);
     };
 
-    GObject.ParamSpec.boxed = function(name, nick, blurb, flags, boxedType) {
+    GObject.ParamSpec.boxed = function (name, nick, blurb, flags, boxedType) {
         return GObject.param_spec_boxed(name, nick, blurb, boxedType, flags);
     };
 
-    GObject.ParamSpec.object = function(name, nick, blurb, flags, objectType) {
+    GObject.ParamSpec.object = function (name, nick, blurb, flags, objectType) {
         return GObject.param_spec_object(name, nick, blurb, objectType, flags);
     };
 
-    GObject.ParamSpec.param = function(name, nick, blurb, flags, paramType) {
+    GObject.ParamSpec.param = function (name, nick, blurb, flags, paramType) {
         return GObject.param_spec_param(name, nick, blurb, paramType, flags);
     };
 
@@ -367,14 +367,14 @@ function _init() {
 
     // For compatibility with Lang.Class... we need a _construct
     // or the Lang.Class constructor will fail.
-    GObject.Object.prototype._construct = function(...args) {
+    GObject.Object.prototype._construct = function (...args) {
         this._init(...args);
         return this;
     };
 
     GObject.registerClass = registerClass;
 
-    GObject.Object._classInit = function(klass) {
+    GObject.Object._classInit = function (klass) {
         let gtypename = _createGTypeName(klass);
         let gflags = klass.hasOwnProperty(GTypeFlags) ? klass[GTypeFlags] : 0;
         let gobjectInterfaces = klass.hasOwnProperty(interfaces) ? klass[interfaces] : [];
@@ -409,7 +409,7 @@ function _init() {
                 let id = GObject.signal_lookup(name.slice(3).replace('_', '-'),
                     newClass.$gtype);
                 if (id !== 0) {
-                    GObject.signal_override_class_closure(id, newClass.$gtype, function(...argArray) {
+                    GObject.signal_override_class_closure(id, newClass.$gtype, function (...argArray) {
                         let emitter = argArray.shift();
 
                         return func.apply(emitter, argArray);
@@ -422,7 +422,7 @@ function _init() {
             _checkInterface(iface, newClass.prototype));
 
         // For backwards compatibility only. Use instanceof instead.
-        newClass.implements = function(iface) {
+        newClass.implements = function (iface) {
             if (iface.$gtype)
                 return GObject.type_is_a(newClass.$gtype, iface.$gtype);
             return false;
@@ -431,7 +431,7 @@ function _init() {
         return newClass;
     };
 
-    GObject.Interface._classInit = function(klass) {
+    GObject.Interface._classInit = function (klass) {
         let gtypename = _createGTypeName(klass);
         let gobjectInterfaces = klass.hasOwnProperty(requires) ? klass[requires] : [];
         let props = _propertiesAsArray(klass);
@@ -493,7 +493,7 @@ function _init() {
     GObject.signals = signals;
 
     // Replacement for non-introspectable g_object_set()
-    GObject.Object.prototype.set = function(params) {
+    GObject.Object.prototype.set = function (params) {
         Object.assign(this, params);
     };
 
@@ -504,7 +504,7 @@ function _init() {
         TRUE_HANDLED: 2,
     };
 
-    GObject.Object.prototype.disconnect = function(id) {
+    GObject.Object.prototype.disconnect = function (id) {
         return GObject.signal_handler_disconnect(this, id);
     };
 
@@ -512,13 +512,13 @@ function _init() {
     // methods (such as Gio.Socket.connect or NMClient.Device.disconnect)
     // The original g_signal_* functions are not introspectable anyway, because
     // we need our own handling of signal argument marshalling
-    GObject.signal_connect = function(object, name, handler) {
+    GObject.signal_connect = function (object, name, handler) {
         return GObject.Object.prototype.connect.call(object, name, handler);
     };
-    GObject.signal_connect_after = function(object, name, handler) {
+    GObject.signal_connect_after = function (object, name, handler) {
         return GObject.Object.prototype.connect_after.call(object, name, handler);
     };
-    GObject.signal_emit_by_name = function(object, ...nameAndArgs) {
+    GObject.signal_emit_by_name = function (object, ...nameAndArgs) {
         return GObject.Object.prototype.emit.apply(object, nameAndArgs);
     };
 }
diff --git a/modules/overrides/Gio.js b/modules/overrides/Gio.js
index dafe6de4..a2489c6f 100644
--- a/modules/overrides/Gio.js
+++ b/modules/overrides/Gio.js
@@ -160,7 +160,7 @@ function _makeProxyMethod(method, sync) {
     for (i = 0; i < inArgs.length; i++)
         inSignature.push(inArgs[i].signature);
 
-    return function(...args) {
+    return function (...args) {
         return _proxyInvoker.call(this, name, sync, inSignature, args);
     };
 }
@@ -236,7 +236,7 @@ function _addDBusConvenience() {
 function _makeProxyWrapper(interfaceXml) {
     var info = _newInterfaceInfo(interfaceXml);
     var iname = info.name;
-    return function(bus, name, object, asyncCallback, cancellable,
+    return function (bus, name, object, asyncCallback, cancellable,
         flags = Gio.DBusProxyFlags.NONE) {
         var obj = new Gio.DBusProxy({
             g_connection: bus,
@@ -285,7 +285,7 @@ function _newInterfaceInfo(value) {
 function _injectToMethod(klass, method, addition) {
     var previous = klass[method];
 
-    klass[method] = function(...args) {
+    klass[method] = function (...args) {
         addition.apply(this, args);
         return previous.apply(this, args);
     };
@@ -294,7 +294,7 @@ function _injectToMethod(klass, method, addition) {
 function _injectToStaticMethod(klass, method, addition) {
     var previous = klass[method];
 
-    klass[method] = function(...parameters) {
+    klass[method] = function (...parameters) {
         let obj = previous.apply(this, parameters);
         addition.apply(obj, parameters);
         return obj;
@@ -304,7 +304,7 @@ function _injectToStaticMethod(klass, method, addition) {
 function _wrapFunction(klass, method, addition) {
     var previous = klass[method];
 
-    klass[method] = function(...args) {
+    klass[method] = function (...args) {
         args.unshift(previous);
         return addition.apply(this, args);
     };
@@ -400,13 +400,13 @@ function _wrapJSObject(interfaceInfo, jsObj) {
     info.cache_build();
 
     var impl = new GjsPrivate.DBusImplementation({g_interface_info: info});
-    impl.connect('handle-method-call', function(self, methodName, parameters, invocation) {
+    impl.connect('handle-method-call', function (self, methodName, parameters, invocation) {
         return _handleMethodCall.call(jsObj, info, self, methodName, parameters, invocation);
     });
-    impl.connect('handle-property-get', function(self, propertyName) {
+    impl.connect('handle-property-get', function (self, propertyName) {
         return _handlePropertyGet.call(jsObj, info, self, propertyName);
     });
-    impl.connect('handle-property-set', function(self, propertyName, value) {
+    impl.connect('handle-property-set', function (self, propertyName, value) {
         return _handlePropertySet.call(jsObj, info, self, propertyName, value);
     });
 
@@ -422,12 +422,12 @@ function* _listModelIterator() {
 
 function _promisify(proto, asyncFunc, finishFunc) {
     proto[`_original_${asyncFunc}`] = proto[asyncFunc];
-    proto[asyncFunc] = function(...args) {
+    proto[asyncFunc] = function (...args) {
         if (!args.every(arg => typeof arg !== 'function'))
             return this[`_original_${asyncFunc}`](...args);
         return new Promise((resolve, reject) => {
             const callStack = new Error().stack.split('\n').filter(line => 
!line.match(/promisify/)).join('\n');
-            this[`_original_${asyncFunc}`](...args, function(source, res) {
+            this[`_original_${asyncFunc}`](...args, function (source, res) {
                 try {
                     const result = source[finishFunc](res);
                     if (Array.isArray(result) && result.length > 1 && result[0] === true)
@@ -470,16 +470,16 @@ function _init() {
         unwatch_name: Gio.bus_unwatch_name,
     };
 
-    Gio.DBusConnection.prototype.watch_name = function(name, flags, appeared, vanished) {
+    Gio.DBusConnection.prototype.watch_name = function (name, flags, appeared, vanished) {
         return Gio.bus_watch_name_on_connection(this, name, flags, appeared, vanished);
     };
-    Gio.DBusConnection.prototype.unwatch_name = function(id) {
+    Gio.DBusConnection.prototype.unwatch_name = function (id) {
         return Gio.bus_unwatch_name(id);
     };
-    Gio.DBusConnection.prototype.own_name = function(name, flags, acquired, lost) {
+    Gio.DBusConnection.prototype.own_name = function (name, flags, acquired, lost) {
         return Gio.bus_own_name_on_connection(this, name, flags, acquired, lost);
     };
-    Gio.DBusConnection.prototype.unown_name = function(id) {
+    Gio.DBusConnection.prototype.unown_name = function (id) {
         return Gio.bus_unown_name(id);
     };
 
@@ -515,7 +515,7 @@ function _init() {
     // shell-extension writers
 
     Gio.SettingsSchema.prototype._realGetKey = Gio.SettingsSchema.prototype.get_key;
-    Gio.SettingsSchema.prototype.get_key = function(key) {
+    Gio.SettingsSchema.prototype.get_key = function (key) {
         if (!this.has_key(key))
             throw new Error(`GSettings key ${key} not found in schema ${this.get_id()}`);
         return this._realGetKey(key);
@@ -524,7 +524,7 @@ function _init() {
     Gio.Settings.prototype._realMethods = Object.assign({}, Gio.Settings.prototype);
 
     function createCheckedMethod(method, checkMethod = '_checkKey') {
-        return function(id, ...args) {
+        return function (id, ...args) {
             this[checkMethod](id);
             return this._realMethods[method].call(this, id, ...args);
         };
diff --git a/modules/overrides/Gtk.js b/modules/overrides/Gtk.js
index f02bf12a..d25fa13a 100644
--- a/modules/overrides/Gtk.js
+++ b/modules/overrides/Gtk.js
@@ -37,12 +37,12 @@ function _init() {
     Gtk.Widget.prototype.__metaclass__ = GtkWidgetClass;
 
     if (GjsPrivate.gtk_container_child_set_property) {
-        Gtk.Container.prototype.child_set_property = function(child, property, value) {
+        Gtk.Container.prototype.child_set_property = function (child, property, value) {
             GjsPrivate.gtk_container_child_set_property(this, child, property, value);
         };
     }
 
-    Gtk.Widget.prototype._init = function(params) {
+    Gtk.Widget.prototype._init = function (params) {
         if (this.constructor[Gtk.template]) {
             Gtk.Widget.set_connect_func.call(this.constructor, (builder, obj, signalName, handlerName, 
connectObj, flags) => {
                 if (connectObj !== null)
@@ -73,14 +73,14 @@ function _init() {
         }
     };
 
-    Gtk.Widget._classInit = function(klass) {
+    Gtk.Widget._classInit = function (klass) {
         let template = klass[Gtk.template];
         let cssName = klass[Gtk.cssName];
         let children = klass[Gtk.children];
         let internalChildren = klass[Gtk.internalChildren];
 
         if (template) {
-            klass.prototype._instance_init = function() {
+            klass.prototype._instance_init = function () {
                 this.init_template();
             };
         }
diff --git a/modules/package.js b/modules/package.js
index e40a2461..1e633c12 100644
--- a/modules/package.js
+++ b/modules/package.js
@@ -319,7 +319,7 @@ function initGettext() {
     let gettext = imports.gettext;
     window._ = gettext.gettext;
     window.C_ = gettext.pgettext;
-    window.N_ = function(x) {
+    window.N_ = function (x) {
         return x;
     };
 }
diff --git a/modules/tweener/equations.js b/modules/tweener/equations.js
index a9e39bbe..dc009863 100644
--- a/modules/tweener/equations.js
+++ b/modules/tweener/equations.js
@@ -51,7 +51,7 @@ easeOutInSine, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, linear */
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeNone (t, b, c, d, pParams) {
+function easeNone(t, b, c, d, pParams) {
     return c * t / d + b;
 }
 
@@ -69,7 +69,7 @@ function linear(t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeInQuad (t, b, c, d, pParams) {
+function easeInQuad(t, b, c, d, pParams) {
     return c * (t /= d) * t + b;
 }
 
@@ -82,7 +82,7 @@ function easeInQuad (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeOutQuad (t, b, c, d, pParams) {
+function easeOutQuad(t, b, c, d, pParams) {
     return -c * (t /= d) * (t - 2) + b;
 }
 
@@ -95,7 +95,7 @@ function easeOutQuad (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeInOutQuad (t, b, c, d, pParams) {
+function easeInOutQuad(t, b, c, d, pParams) {
     if ((t /= d / 2) < 1)
         return c / 2 * t * t + b;
     return -c / 2 * (--t * (t - 2) - 1) + b;
@@ -110,7 +110,7 @@ function easeInOutQuad (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeOutInQuad (t, b, c, d, pParams) {
+function easeOutInQuad(t, b, c, d, pParams) {
     if (t < d / 2)
         return easeOutQuad(t * 2, b, c / 2, d, pParams);
     return easeInQuad(t * 2 - d, b + c / 2, c / 2, d, pParams);
@@ -125,7 +125,7 @@ function easeOutInQuad (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeInCubic (t, b, c, d, pParams) {
+function easeInCubic(t, b, c, d, pParams) {
     return c * (t /= d) * t * t + b;
 }
 
@@ -138,7 +138,7 @@ function easeInCubic (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeOutCubic (t, b, c, d, pParams) {
+function easeOutCubic(t, b, c, d, pParams) {
     return c * ((t = t / d - 1) * t * t + 1) + b;
 }
 
@@ -151,7 +151,7 @@ function easeOutCubic (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeInOutCubic (t, b, c, d, pParams) {
+function easeInOutCubic(t, b, c, d, pParams) {
     if ((t /= d / 2) < 1)
         return c / 2 * t * t * t + b;
     return c / 2 * ((t -= 2) * t * t + 2) + b;
@@ -166,7 +166,7 @@ function easeInOutCubic (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeOutInCubic (t, b, c, d, pParams) {
+function easeOutInCubic(t, b, c, d, pParams) {
     if (t < d / 2)
         return easeOutCubic(t * 2, b, c / 2, d, pParams);
     return easeInCubic(t * 2 - d, b + c / 2, c / 2, d, pParams);
@@ -181,7 +181,7 @@ function easeOutInCubic (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeInQuart (t, b, c, d, pParams) {
+function easeInQuart(t, b, c, d, pParams) {
     return c * (t /= d) * t * t * t + b;
 }
 
@@ -194,7 +194,7 @@ function easeInQuart (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeOutQuart (t, b, c, d, pParams) {
+function easeOutQuart(t, b, c, d, pParams) {
     return -c * ((t = t / d - 1) * t * t * t - 1) + b;
 }
 
@@ -207,7 +207,7 @@ function easeOutQuart (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeInOutQuart (t, b, c, d, pParams) {
+function easeInOutQuart(t, b, c, d, pParams) {
     if ((t /= d / 2) < 1)
         return c / 2 * t * t * t * t + b;
     return -c / 2 * ((t -= 2) * t * t * t - 2) + b;
@@ -222,7 +222,7 @@ function easeInOutQuart (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeOutInQuart (t, b, c, d, pParams) {
+function easeOutInQuart(t, b, c, d, pParams) {
     if (t < d / 2)
         return easeOutQuart(t * 2, b, c / 2, d, pParams);
     return easeInQuart(t * 2 - d, b + c / 2, c / 2, d, pParams);
@@ -237,7 +237,7 @@ function easeOutInQuart (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeInQuint (t, b, c, d, pParams) {
+function easeInQuint(t, b, c, d, pParams) {
     return c * (t /= d) * t * t * t * t + b;
 }
 
@@ -250,7 +250,7 @@ function easeInQuint (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeOutQuint (t, b, c, d, pParams) {
+function easeOutQuint(t, b, c, d, pParams) {
     return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
 }
 
@@ -263,7 +263,7 @@ function easeOutQuint (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeInOutQuint (t, b, c, d, pParams) {
+function easeInOutQuint(t, b, c, d, pParams) {
     if ((t /= d / 2) < 1)
         return c / 2 * t * t * t * t * t + b;
     return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
@@ -278,7 +278,7 @@ function easeInOutQuint (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeOutInQuint (t, b, c, d, pParams) {
+function easeOutInQuint(t, b, c, d, pParams) {
     if (t < d / 2)
         return easeOutQuint(t * 2, b, c / 2, d, pParams);
     return easeInQuint(t * 2 - d, b + c / 2, c / 2, d, pParams);
@@ -293,7 +293,7 @@ function easeOutInQuint (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeInSine (t, b, c, d, pParams) {
+function easeInSine(t, b, c, d, pParams) {
     return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;
 }
 
@@ -306,7 +306,7 @@ function easeInSine (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeOutSine (t, b, c, d, pParams) {
+function easeOutSine(t, b, c, d, pParams) {
     return c * Math.sin(t / d * (Math.PI / 2)) + b;
 }
 
@@ -319,7 +319,7 @@ function easeOutSine (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeInOutSine (t, b, c, d, pParams) {
+function easeInOutSine(t, b, c, d, pParams) {
     return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
 }
 
@@ -332,7 +332,7 @@ function easeInOutSine (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeOutInSine (t, b, c, d, pParams) {
+function easeOutInSine(t, b, c, d, pParams) {
     if (t < d / 2)
         return easeOutSine(t * 2, b, c / 2, d, pParams);
     return easeInSine(t * 2 - d, b + c / 2, c / 2, d, pParams);
@@ -347,7 +347,7 @@ function easeOutInSine (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeInExpo (t, b, c, d, pParams) {
+function easeInExpo(t, b, c, d, pParams) {
     return t <= 0 ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;
 }
 
@@ -360,7 +360,7 @@ function easeInExpo (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeOutExpo (t, b, c, d, pParams) {
+function easeOutExpo(t, b, c, d, pParams) {
     return t >= d ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b;
 }
 
@@ -373,7 +373,7 @@ function easeOutExpo (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeInOutExpo (t, b, c, d, pParams) {
+function easeInOutExpo(t, b, c, d, pParams) {
     if (t <= 0)
         return b;
     if (t >= d)
@@ -392,7 +392,7 @@ function easeInOutExpo (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeOutInExpo (t, b, c, d, pParams) {
+function easeOutInExpo(t, b, c, d, pParams) {
     if (t < d / 2)
         return easeOutExpo(t * 2, b, c / 2, d, pParams);
     return easeInExpo(t * 2 - d, b + c / 2, c / 2, d, pParams);
@@ -407,7 +407,7 @@ function easeOutInExpo (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeInCirc (t, b, c, d, pParams) {
+function easeInCirc(t, b, c, d, pParams) {
     return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;
 }
 
@@ -420,7 +420,7 @@ function easeInCirc (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeOutCirc (t, b, c, d, pParams) {
+function easeOutCirc(t, b, c, d, pParams) {
     return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;
 }
 
@@ -433,7 +433,7 @@ function easeOutCirc (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeInOutCirc (t, b, c, d, pParams) {
+function easeInOutCirc(t, b, c, d, pParams) {
     if ((t /= d / 2) < 1)
         return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;
     return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;
@@ -448,7 +448,7 @@ function easeInOutCirc (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeOutInCirc (t, b, c, d, pParams) {
+function easeOutInCirc(t, b, c, d, pParams) {
     if (t < d / 2)
         return easeOutCirc(t * 2, b, c / 2, d, pParams);
     return easeInCirc(t * 2 - d, b + c / 2, c / 2, d, pParams);
@@ -465,7 +465,7 @@ function easeOutInCirc (t, b, c, d, pParams) {
  * @param p             Period.
  * @return              The correct value.
  */
-function easeInElastic (t, b, c, d, pParams) {
+function easeInElastic(t, b, c, d, pParams) {
     if (t <= 0)
         return b;
     if ((t /= d) >= 1)
@@ -493,7 +493,7 @@ function easeInElastic (t, b, c, d, pParams) {
  * @param p             Period.
  * @return              The correct value.
  */
-function easeOutElastic (t, b, c, d, pParams) {
+function easeOutElastic(t, b, c, d, pParams) {
     if (t <= 0)
         return b;
     if ((t /= d) >= 1)
@@ -521,7 +521,7 @@ function easeOutElastic (t, b, c, d, pParams) {
  * @param p             Period.
  * @return              The correct value.
  */
-function easeInOutElastic (t, b, c, d, pParams) {
+function easeInOutElastic(t, b, c, d, pParams) {
     if (t <= 0)
         return b;
     if ((t /= d / 2) >= 2)
@@ -551,7 +551,7 @@ function easeInOutElastic (t, b, c, d, pParams) {
  * @param p             Period.
  * @return              The correct value.
  */
-function easeOutInElastic (t, b, c, d, pParams) {
+function easeOutInElastic(t, b, c, d, pParams) {
     if (t < d / 2)
         return easeOutElastic(t * 2, b, c / 2, d, pParams);
     return easeInElastic(t * 2 - d, b + c / 2, c / 2, d, pParams);
@@ -567,7 +567,7 @@ function easeOutInElastic (t, b, c, d, pParams) {
  * @param s             Overshoot ammount: higher s means greater overshoot (0 produces cubic easing with no 
overshoot, and the default value of 1.70158 produces an overshoot of 10 percent).
  * @return              The correct value.
  */
-function easeInBack (t, b, c, d, pParams) {
+function easeInBack(t, b, c, d, pParams) {
     var s = !pParams || isNaN(pParams.overshoot) ? 1.70158 : pParams.overshoot;
     return c * (t /= d) * t * ((s + 1) * t - s) + b;
 }
@@ -582,7 +582,7 @@ function easeInBack (t, b, c, d, pParams) {
  * @param s             Overshoot ammount: higher s means greater overshoot (0 produces cubic easing with no 
overshoot, and the default value of 1.70158 produces an overshoot of 10 percent).
  * @return              The correct value.
  */
-function easeOutBack (t, b, c, d, pParams) {
+function easeOutBack(t, b, c, d, pParams) {
     var s = !pParams || isNaN(pParams.overshoot) ? 1.70158 : pParams.overshoot;
     return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
 }
@@ -597,7 +597,7 @@ function easeOutBack (t, b, c, d, pParams) {
  * @param s             Overshoot ammount: higher s means greater overshoot (0 produces cubic easing with no 
overshoot, and the default value of 1.70158 produces an overshoot of 10 percent).
  * @return              The correct value.
  */
-function easeInOutBack (t, b, c, d, pParams) {
+function easeInOutBack(t, b, c, d, pParams) {
     var s = !pParams || isNaN(pParams.overshoot) ? 1.70158 : pParams.overshoot;
     if ((t /= d / 2) < 1)
         return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b;
@@ -614,7 +614,7 @@ function easeInOutBack (t, b, c, d, pParams) {
  * @param s             Overshoot ammount: higher s means greater overshoot (0 produces cubic easing with no 
overshoot, and the default value of 1.70158 produces an overshoot of 10 percent).
  * @return              The correct value.
  */
-function easeOutInBack (t, b, c, d, pParams) {
+function easeOutInBack(t, b, c, d, pParams) {
     if (t < d / 2)
         return easeOutBack(t * 2, b, c / 2, d, pParams);
     return easeInBack(t * 2 - d, b + c / 2, c / 2, d, pParams);
@@ -629,7 +629,7 @@ function easeOutInBack (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeInBounce (t, b, c, d, pParams) {
+function easeInBounce(t, b, c, d, pParams) {
     return c - easeOutBounce(d - t, 0, c, d) + b;
 }
 
@@ -642,7 +642,7 @@ function easeInBounce (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeOutBounce (t, b, c, d, pParams) {
+function easeOutBounce(t, b, c, d, pParams) {
     if ((t /= d) < 1 / 2.75)
         return c * (7.5625 * t * t) + b;
     else if (t < 2 / 2.75)
@@ -662,7 +662,7 @@ function easeOutBounce (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeInOutBounce (t, b, c, d, pParams) {
+function easeInOutBounce(t, b, c, d, pParams) {
     if (t < d / 2)
         return easeInBounce(t * 2, 0, c, d) * .5 + b;
     else
@@ -678,7 +678,7 @@ function easeInOutBounce (t, b, c, d, pParams) {
  * @param d             Expected easing duration (in frames or seconds).
  * @return              The correct value.
  */
-function easeOutInBounce (t, b, c, d, pParams) {
+function easeOutInBounce(t, b, c, d, pParams) {
     if (t < d / 2)
         return easeOutBounce(t * 2, b, c / 2, d, pParams);
     return easeInBounce(t * 2 - d, b + c / 2, c / 2, d, pParams);
diff --git a/modules/tweener/tweener.js b/modules/tweener/tweener.js
index 70bed530..1ce79207 100644
--- a/modules/tweener/tweener.js
+++ b/modules/tweener/tweener.js
@@ -88,7 +88,7 @@ FrameTicker.prototype = {
         this._timeoutID = GLib.timeout_add(
             GLib.PRIORITY_DEFAULT,
             Math.floor(1000 / me.FRAME_RATE),
-            function() {
+            function () {
                 me._currentTime += 1000 / me.FRAME_RATE;
                 me.emit('prepare-frame');
                 return true;


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