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

@ -78,7 +78,7 @@ function _getCalendarDayAbbreviation(dayNumber) {
/* Translators: Calendar grid abbreviation for Friday */
NC_("grid friday", "F"),
/* Translators: Calendar grid abbreviation for Saturday */
NC_("grid saturday", "S")
NC_("grid saturday", "S"),
];
return Shell.util_translate_time_string(abbreviations[dayNumber]);
}
@ -110,7 +110,7 @@ var EventSourceBase = GObject.registerClass({
GObject.ParamFlags.READABLE,
false),
},
Signals: { 'changed': {} }
Signals: { 'changed': {} },
}, class EventSourceBase extends GObject.Object {
get isLoading() {
throw new GObject.NotImplementedError(`isLoading in ${this.constructor.name}`);
@ -352,7 +352,7 @@ class DBusEventSource extends EventSourceBase {
});
var Calendar = GObject.registerClass({
Signals: { 'selected-date-changed': { param_types: [GLib.DateTime.$gtype] } }
Signals: { 'selected-date-changed': { param_types: [GLib.DateTime.$gtype] } },
}, class Calendar extends St.Widget {
_init() {
this._weekStart = Shell.util_get_week_start();
@ -387,7 +387,7 @@ var Calendar = GObject.registerClass({
super._init({
style_class: 'calendar',
layout_manager: new Clutter.GridLayout(),
reactive: true
reactive: true,
});
this._buildHeader();
@ -962,7 +962,7 @@ class NotificationTimeLabel extends St.Label {
super._init({
style_class: 'event-time',
x_align: Clutter.ActorAlign.START,
y_align: Clutter.ActorAlign.END
y_align: Clutter.ActorAlign.END,
});
this._datetime = datetime;
}
@ -1109,7 +1109,7 @@ class CalendarMessageList extends St.Widget {
style_class: 'message-list',
layout_manager: new Clutter.BinLayout(),
x_expand: true,
y_expand: true
y_expand: true,
});
this._placeholder = new Placeholder();
@ -1119,9 +1119,11 @@ class CalendarMessageList extends St.Widget {
x_expand: true, y_expand: true });
this.add_actor(box);
this._scrollView = new St.ScrollView({ style_class: 'vfade',
overlay_scrollbars: true,
x_expand: true, y_expand: true, });
this._scrollView = new St.ScrollView({
style_class: 'vfade',
overlay_scrollbars: true,
x_expand: true, y_expand: true,
});
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
box.add_actor(this._scrollView);