mirror of
https://gitlab.gnome.org/julianschacher/top-bar-organizer.git
synced 2025-10-27 07:09:07 +00:00
Other: Require trailing commas for multiline for most
Require trailing commas for multiline for arrays, objects, imports and exports and disallow trailing commas for functions. Do this by updating the ESLint config and fixing new complaints. The reason for this change are the resulting future cleaner version diffs. Also see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Trailing_commas https://eslint.org/docs/latest/rules/comma-dangle
This commit is contained in:
parent
88e510d54e
commit
d903274d73
@ -49,5 +49,12 @@ rules:
|
||||
object-curly-spacing:
|
||||
- error
|
||||
- always
|
||||
comma-dangle:
|
||||
- error
|
||||
- arrays: always-multiline
|
||||
objects: always-multiline
|
||||
imports: always-multiline
|
||||
exports: always-multiline
|
||||
functions: never
|
||||
globals:
|
||||
log: readonly
|
||||
|
||||
@ -14,8 +14,8 @@ export default class BoxOrderManager extends GObject.Object {
|
||||
static {
|
||||
GObject.registerClass({
|
||||
Signals: {
|
||||
"appIndicatorReady": {}
|
||||
}
|
||||
"appIndicatorReady": {},
|
||||
},
|
||||
}, this);
|
||||
}
|
||||
|
||||
@ -157,7 +157,7 @@ export default class BoxOrderManager extends GObject.Object {
|
||||
const indicatorContainers = [
|
||||
Main.panel._leftBox.get_children(),
|
||||
Main.panel._centerBox.get_children(),
|
||||
Main.panel._rightBox.get_children()
|
||||
Main.panel._rightBox.get_children(),
|
||||
].flat();
|
||||
|
||||
// Create an indicator containers set from the indicator containers for
|
||||
@ -212,7 +212,7 @@ export default class BoxOrderManager extends GObject.Object {
|
||||
center: Main.panel._centerBox.get_children(),
|
||||
// Reverse this array, since the items in the left and center box
|
||||
// are logically LTR, while the items in the right box are RTL.
|
||||
right: Main.panel._rightBox.get_children().reverse()
|
||||
right: Main.panel._rightBox.get_children().reverse(),
|
||||
};
|
||||
|
||||
// This function goes through the indicator containers of the given box
|
||||
|
||||
@ -13,13 +13,13 @@ export default class PrefsBoxOrderItemRow extends Adw.ActionRow {
|
||||
GTypeName: "PrefsBoxOrderItemRow",
|
||||
Template: GLib.uri_resolve_relative(import.meta.url, "../ui/prefs-box-order-item-row.ui", GLib.UriFlags.NONE),
|
||||
InternalChildren: [
|
||||
"item-name-display-label"
|
||||
"item-name-display-label",
|
||||
],
|
||||
Signals: {
|
||||
"move": {
|
||||
param_types: [GObject.TYPE_STRING]
|
||||
}
|
||||
}
|
||||
param_types: [GObject.TYPE_STRING],
|
||||
},
|
||||
},
|
||||
}, this);
|
||||
this.install_action("row.forget", null, (self, _actionName, _param) => {
|
||||
const parentListBox = self.get_parent();
|
||||
|
||||
@ -21,13 +21,13 @@ export default class PrefsBoxOrderListBox extends Gtk.ListBox {
|
||||
"The box order this PrefsBoxOrderListBox is associated with.",
|
||||
GObject.ParamFlags.READWRITE,
|
||||
""
|
||||
)
|
||||
),
|
||||
},
|
||||
Signals: {
|
||||
"row-move": {
|
||||
param_types: [PrefsBoxOrderItemRow, GObject.TYPE_STRING]
|
||||
}
|
||||
}
|
||||
param_types: [PrefsBoxOrderItemRow, GObject.TYPE_STRING],
|
||||
},
|
||||
},
|
||||
}, this);
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ export default class PrefsBoxOrderListEmptyPlaceholder extends Gtk.Box {
|
||||
static {
|
||||
GObject.registerClass({
|
||||
GTypeName: "PrefsBoxOrderListEmptyPlaceholder",
|
||||
Template: GLib.uri_resolve_relative(import.meta.url, "../ui/prefs-box-order-list-empty-placeholder.ui", GLib.UriFlags.NONE)
|
||||
Template: GLib.uri_resolve_relative(import.meta.url, "../ui/prefs-box-order-list-empty-placeholder.ui", GLib.UriFlags.NONE),
|
||||
}, this);
|
||||
}
|
||||
|
||||
|
||||
@ -19,8 +19,8 @@ export default class PrefsPage extends Adw.PreferencesPage {
|
||||
InternalChildren: [
|
||||
"left-box-order-list-box",
|
||||
"center-box-order-list-box",
|
||||
"right-box-order-list-box"
|
||||
]
|
||||
"right-box-order-list-box",
|
||||
],
|
||||
}, this);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user