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

@ -101,7 +101,7 @@ var WindowClone = GObject.registerClass({
'hide-chrome': {},
'selected': { param_types: [GObject.TYPE_UINT] },
'show-chrome': {},
'size-changed': {}
'size-changed': {},
},
}, class WindowClone extends St.Widget {
_init(realWindow, workspace) {
@ -126,7 +126,7 @@ var WindowClone = GObject.registerClass({
reactive: true,
can_focus: true,
accessible_role: Atk.Role.PUSH_BUTTON,
layout_manager: new WindowCloneLayout()
layout_manager: new WindowCloneLayout(),
});
this.set_offscreen_redirect(Clutter.OffscreenRedirect.AUTOMATIC_FOR_OPACITY);
@ -647,7 +647,7 @@ var WindowOverlay = class {
let params = {
x, y, width,
duration: Overview.ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
};
if (height !== undefined)
@ -686,7 +686,7 @@ var WindowOverlay = class {
a.ease({
opacity: 255,
duration: WINDOW_OVERLAY_FADE_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
});
}
@ -697,7 +697,7 @@ var WindowOverlay = class {
a.ease({
opacity: 0,
duration: WINDOW_OVERLAY_FADE_TIME,
mode: Clutter.AnimationMode.EASE_IN_QUAD
mode: Clutter.AnimationMode.EASE_IN_QUAD,
});
});
}
@ -759,7 +759,7 @@ Signals.addSignalMethods(WindowOverlay.prototype);
var WindowPositionFlags = {
NONE: 0,
INITIAL: 1 << 0,
ANIMATE: 1 << 1
ANIMATE: 1 << 1,
};
// Window Thumbnail Layout Algorithm
@ -1387,7 +1387,7 @@ class Workspace extends St.Widget {
clone.ease({
opacity: 255,
mode: Clutter.AnimationMode.EASE_IN_QUAD,
duration: Overview.ANIMATION_TIME
duration: Overview.ANIMATION_TIME,
});
}
@ -1432,7 +1432,7 @@ class Workspace extends St.Widget {
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => {
this._showWindowOverlay(clone, overlay);
}
},
});
clone.overlay.relayout(true);
}
@ -1488,7 +1488,7 @@ class Workspace extends St.Widget {
win._overviewHint = {
x: stageX,
y: stageY,
scale: stageWidth / clone.width
scale: stageWidth / clone.width,
};
}
clone.destroy();
@ -1730,7 +1730,7 @@ class Workspace extends St.Widget {
clone.ease({
opacity,
duration,
mode: Clutter.AnimationMode.EASE_OUT_QUAD
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
} else {
// The window is hidden
@ -1782,7 +1782,7 @@ class Workspace extends St.Widget {
scale_y: 1,
opacity: 255,
duration: Overview.ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
} else {
// The window is hidden, make it shrink and fade it out
@ -1791,7 +1791,7 @@ class Workspace extends St.Widget {
scale_y: 0,
opacity: 0,
duration: Overview.ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
}
@ -2033,7 +2033,7 @@ class Workspace extends St.Widget {
win._overviewHint = {
x: actor.x,
y: actor.y,
scale: actor.scale_x
scale: actor.scale_x,
};
let metaWindow = win.get_meta_window();