cleanup: Require "dangling" commas

Since ES5, trailing commas in arrays and object literals are valid.
We generally haven't used them so far, but they are actually a good
idea, as they make additions and removals in diffs much cleaner.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
This commit is contained in:
Florian Müllner
2019-08-20 23:43:54 +02:00
committed by Georges Basile Stavracas Neto
parent 07cc84f632
commit ebf77748a8
81 changed files with 452 additions and 445 deletions

View File

@ -272,8 +272,8 @@ var ScreenshotService = class {
color: GLib.Variant.new('(ddd)', [
red / 255.0,
green / 255.0,
blue / 255.0
])
blue / 255.0,
]),
}]);
this._removeShooterForSender(invocation.get_sender());
invocation.return_value(retval);
@ -287,7 +287,7 @@ var ScreenshotService = class {
};
var SelectArea = GObject.registerClass({
Signals: { 'finished': { param_types: [Meta.Rectangle.$gtype] } }
Signals: { 'finished': { param_types: [Meta.Rectangle.$gtype] } },
}, class SelectArea extends St.Widget {
_init() {
this._startX = -1;
@ -300,7 +300,7 @@ var SelectArea = GObject.registerClass({
visible: false,
reactive: true,
x: 0,
y: 0
y: 0,
});
Main.uiGroup.add_actor(this);
@ -312,7 +312,7 @@ var SelectArea = GObject.registerClass({
this._rubberband = new St.Widget({
style_class: 'select-area-rubberband',
visible: false
visible: false,
});
this.add_actor(this._rubberband);
}
@ -332,7 +332,7 @@ var SelectArea = GObject.registerClass({
x: Math.min(this._startX, this._lastX),
y: Math.min(this._startY, this._lastY),
width: Math.abs(this._startX - this._lastX) + 1,
height: Math.abs(this._startY - this._lastY) + 1
height: Math.abs(this._startY - this._lastY) + 1,
});
}
@ -367,7 +367,7 @@ var SelectArea = GObject.registerClass({
opacity: 0,
duration: 200,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => this._grabHelper.ungrab()
onComplete: () => this._grabHelper.ungrab(),
});
return Clutter.EVENT_PROPAGATE;
}
@ -384,7 +384,7 @@ var SelectArea = GObject.registerClass({
});
var PickPixel = GObject.registerClass({
Signals: { 'finished': { param_types: [Graphene.Point.$gtype] } }
Signals: { 'finished': { param_types: [Graphene.Point.$gtype] } },
}, class PickPixel extends St.Widget {
_init() {
super._init({ visible: false, reactive: true });
@ -436,7 +436,7 @@ class Flashspot extends Lightbox.Lightbox {
super._init(Main.uiGroup, {
inhibitEvents: true,
width: area.width,
height: area.height
height: area.height,
});
this.style_class = 'flashspot';
this.set_position(area.x, area.y);
@ -452,7 +452,7 @@ class Flashspot extends Lightbox.Lightbox {
if (doneCallback)
doneCallback();
this.destroy();
}
},
});
}
});