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

@ -33,8 +33,8 @@ var RadialShaderEffect = GObject.registerClass({
'sharpness', 'sharpness', 'sharpness',
GObject.ParamFlags.READWRITE,
0, 1, 0
)
}
),
},
}, class RadialShaderEffect extends Shell.GLSLEffect {
_init(params) {
this._brightness = undefined;
@ -109,7 +109,7 @@ var Lightbox = GObject.registerClass({
Properties: {
'active': GObject.ParamSpec.boolean(
'active', 'active', 'active', GObject.ParamFlags.READABLE, false),
}
},
}, class Lightbox extends St.Bin {
_init(container, params) {
params = Params.parse(params, {
@ -124,7 +124,7 @@ var Lightbox = GObject.registerClass({
reactive: params.inhibitEvents,
width: params.width,
height: params.height,
visible: false
visible: false,
});
this._active = false;
@ -146,7 +146,7 @@ var Lightbox = GObject.registerClass({
if (!params.width || !params.height) {
this.add_constraint(new Clutter.BindConstraint({
source: container,
coordinate: Clutter.BindCoordinate.ALL
coordinate: Clutter.BindCoordinate.ALL,
}));
}
@ -187,7 +187,7 @@ var Lightbox = GObject.registerClass({
let easeProps = {
duration: fadeInTime || 0,
mode: Clutter.AnimationMode.EASE_OUT_QUAD
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
};
let onComplete = () => {
@ -206,7 +206,7 @@ var Lightbox = GObject.registerClass({
} else {
this.ease(Object.assign(easeProps, {
opacity: 255 * this._fadeFactor,
onComplete
onComplete,
}));
}
}
@ -219,7 +219,7 @@ var Lightbox = GObject.registerClass({
let easeProps = {
duration: fadeOutTime || 0,
mode: Clutter.AnimationMode.EASE_OUT_QUAD
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
};
let onComplete = () => this.hide();