style: Avoid trailing commas in array destructuring
When destructuring multiple return values, we often use trailing commas to indicate that there are additional elements that we are ignoring. There isn't anything inherently wrong with that, but it's a style that's too confusing for eslint - on the one hand we require a space after a comma, on the other hand we require no space before closing brackets. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
This commit is contained in:
@ -276,7 +276,7 @@ var IconGrid = GObject.registerClass({
|
||||
if (forWidth < 0)
|
||||
nColumns = children.length;
|
||||
else
|
||||
[nColumns, ] = this._computeLayout(forWidth);
|
||||
[nColumns] = this._computeLayout(forWidth);
|
||||
|
||||
let nRows;
|
||||
if (nColumns > 0)
|
||||
@ -504,7 +504,7 @@ var IconGrid = GObject.registerClass({
|
||||
this._clonesAnimating.push(actorClone);
|
||||
Main.uiGroup.add_actor(actorClone);
|
||||
|
||||
let [width, height,,] = this._getAllocatedChildSizeAndSpacing(actor);
|
||||
let [width, height] = this._getAllocatedChildSizeAndSpacing(actor);
|
||||
actorClone.set_size(width, height);
|
||||
let scaleX = sourceScaledWidth / width;
|
||||
let scaleY = sourceScaledHeight / height;
|
||||
|
Reference in New Issue
Block a user