[gnome-shell-extensions] lint: Sync with gnome-shell
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] lint: Sync with gnome-shell
- Date: Sat, 20 Aug 2022 17:17:19 +0000 (UTC)
commit 563d7770d31a69d00c89a115a5046b67866d3518
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Aug 20 18:50:51 2022 +0200
lint: Sync with gnome-shell
gnome-shell started transitioning to gjs' object spacing rule,
i.e. `{foo: 42}` instead of `{ foo: 42 }`.
We have a much smaller code base than the shell and aren't using
a secondary "allowed-but-deprecated" configuration that allows a
gradual transition, so just pull the switch and update to the new
style.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/240>
extensions/apps-menu/extension.js | 14 +++++++-------
extensions/auto-move-windows/extension.js | 2 +-
extensions/auto-move-windows/prefs.js | 14 +++++++-------
extensions/drive-menu/extension.js | 2 +-
extensions/native-window-placement/extension.js | 4 ++--
extensions/places-menu/extension.js | 2 +-
extensions/places-menu/placeDisplay.js | 16 ++++++++--------
extensions/screenshot-window-sizer/extension.js | 6 +++---
extensions/user-theme/extension.js | 2 +-
extensions/user-theme/prefs.js | 4 ++--
extensions/user-theme/util.js | 2 +-
extensions/window-list/extension.js | 24 ++++++++++++------------
extensions/window-list/prefs.js | 10 +++++-----
extensions/window-list/windowPicker.js | 12 ++++++------
extensions/window-list/workspaceIndicator.js | 10 +++++-----
extensions/windowsNavigator/extension.js | 16 ++++++++--------
extensions/workspace-indicator/extension.js | 8 ++++----
extensions/workspace-indicator/prefs.js | 10 +++++-----
lint/eslintrc-shell.yml | 5 +++--
19 files changed, 82 insertions(+), 81 deletions(-)
---
diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js
index cc1d697..6757f21 100644
--- a/extensions/apps-menu/extension.js
+++ b/extensions/apps-menu/extension.js
@@ -117,7 +117,7 @@ class CategoryMenuItem extends PopupMenu.PopupBaseMenuItem {
else
name = _('Favorites');
- this.add_child(new St.Label({ text: name }));
+ this.add_child(new St.Label({text: name}));
this.connect('motion-event', this._onMotionEvent.bind(this));
this.connect('notify::active', this._onActiveChanged.bind(this));
}
@@ -408,7 +408,7 @@ class ApplicationsButton extends PanelMenu.Button {
});
});
- this._tree = new GMenu.Tree({ menu_basename: 'applications.menu' });
+ this._tree = new GMenu.Tree({menu_basename: 'applications.menu'});
this._treeChangedId = this._tree.connect('changed',
this._onTreeChanged.bind(this));
@@ -509,7 +509,7 @@ class ApplicationsButton extends PanelMenu.Button {
}
let app = appSys.lookup_app(id);
if (!app)
- app = new Shell.App({ app_info: entry.get_app_info() });
+ app = new Shell.App({app_info: entry.get_app_info()});
if (app.get_app_info().should_show())
this.applicationsByCategory[categoryId].push(app);
} else if (nextType === GMenu.TreeItemType.SEPARATOR) {
@@ -555,8 +555,8 @@ class ApplicationsButton extends PanelMenu.Button {
_createLayout() {
let section = new PopupMenu.PopupMenuSection();
this.menu.addMenuItem(section);
- this.mainBox = new St.BoxLayout({ vertical: false });
- this.leftBox = new St.BoxLayout({ vertical: true });
+ this.mainBox = new St.BoxLayout({vertical: false});
+ this.leftBox = new St.BoxLayout({vertical: true});
this.applicationsScrollBox = new St.ScrollView({
style_class: 'apps-menu vfade',
x_expand: true,
@@ -578,9 +578,9 @@ class ApplicationsButton extends PanelMenu.Button {
vscroll.connect('scroll-stop', () => (this.menu.passEvents = false));
this.leftBox.add_child(this.categoriesScrollBox);
- this.applicationsBox = new St.BoxLayout({ vertical: true });
+ this.applicationsBox = new St.BoxLayout({vertical: true});
this.applicationsScrollBox.add_actor(this.applicationsBox);
- this.categoriesBox = new St.BoxLayout({ vertical: true });
+ this.categoriesBox = new St.BoxLayout({vertical: true});
this.categoriesScrollBox.add_actor(this.categoriesBox);
this.mainBox.add(this.leftBox);
diff --git a/extensions/auto-move-windows/extension.js b/extensions/auto-move-windows/extension.js
index 72fed2e..298de53 100644
--- a/extensions/auto-move-windows/extension.js
+++ b/extensions/auto-move-windows/extension.js
@@ -2,7 +2,7 @@
// Start apps on custom workspaces
/* exported init enable disable */
-const { Shell } = imports.gi;
+const {Shell} = imports.gi;
const ExtensionUtils = imports.misc.extensionUtils;
const Main = imports.ui.main;
diff --git a/extensions/auto-move-windows/prefs.js b/extensions/auto-move-windows/prefs.js
index acfd7fa..b849db7 100644
--- a/extensions/auto-move-windows/prefs.js
+++ b/extensions/auto-move-windows/prefs.js
@@ -2,7 +2,7 @@
// Start apps on custom workspaces
/* exported init buildPrefsWidget */
-const { Adw, Gio, GLib, GObject, Gtk } = imports.gi;
+const {Adw, Gio, GLib, GObject, Gtk} = imports.gi;
const ExtensionUtils = imports.misc.extensionUtils;
@@ -75,7 +75,7 @@ class RulesList extends GObject.Object {
append(appInfo) {
const pos = this.#rules.length;
- this.#rules.push(new Rule({ appInfo }));
+ this.#rules.push(new Rule({appInfo}));
this.#saveRules();
this.items_changed(pos, 0, 1);
@@ -97,7 +97,7 @@ class RulesList extends GObject.Object {
if (pos < 0)
return;
- this.#rules[pos].set({ workspace });
+ this.#rules[pos].set({workspace});
this.#saveRules();
}
@@ -116,7 +116,7 @@ class RulesList extends GObject.Object {
const [id, workspace] = stringRule.split(':');
const appInfo = Gio.DesktopAppInfo.new(id);
if (appInfo)
- this.#rules.push(new Rule({ appInfo, workspace }));
+ this.#rules.push(new Rule({appInfo, workspace}));
else
log(`Invalid ID ${id}`);
}
@@ -154,8 +154,8 @@ class AutoMoveSettingsWidget extends Adw.PreferencesGroup {
this._rules = new RulesList();
- const store = new Gio.ListStore({ item_type: Gio.ListModel });
- const listModel = new Gtk.FlattenListModel({ model: store });
+ const store = new Gio.ListStore({item_type: Gio.ListModel});
+ const listModel = new Gtk.FlattenListModel({model: store});
store.append(this._rules);
store.append(new NewItemModel());
@@ -248,7 +248,7 @@ class RuleRow extends Adw.ActionRow {
}
constructor(rule) {
- const { appInfo } = rule;
+ const {appInfo} = rule;
const id = appInfo.get_id();
super({
diff --git a/extensions/drive-menu/extension.js b/extensions/drive-menu/extension.js
index d054f87..251687a 100644
--- a/extensions/drive-menu/extension.js
+++ b/extensions/drive-menu/extension.js
@@ -1,6 +1,6 @@
/* exported init enable disable */
// Drive menu extension
-const { Clutter, Gio, GObject, Shell, St } = imports.gi;
+const {Clutter, Gio, GObject, Shell, St} = imports.gi;
const ExtensionUtils = imports.misc.extensionUtils;
const Main = imports.ui.main;
diff --git a/extensions/native-window-placement/extension.js b/extensions/native-window-placement/extension.js
index 78d4c7b..b6b662a 100644
--- a/extensions/native-window-placement/extension.js
+++ b/extensions/native-window-placement/extension.js
@@ -1,10 +1,10 @@
// -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*-
/* exported enable disable */
-const { Clutter } = imports.gi;
+const {Clutter} = imports.gi;
const ExtensionUtils = imports.misc.extensionUtils;
const Main = imports.ui.main;
-const { WindowPreview } = imports.ui.windowPreview;
+const {WindowPreview} = imports.ui.windowPreview;
const Workspace = imports.ui.workspace;
// testing settings for natural window placement strategy:
diff --git a/extensions/places-menu/extension.js b/extensions/places-menu/extension.js
index 7c51220..7bad2ff 100644
--- a/extensions/places-menu/extension.js
+++ b/extensions/places-menu/extension.js
@@ -1,7 +1,7 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
/* exported init enable disable */
-const { Clutter, GObject, St } = imports.gi;
+const {Clutter, GObject, St} = imports.gi;
const ExtensionUtils = imports.misc.extensionUtils;
const Main = imports.ui.main;
diff --git a/extensions/places-menu/placeDisplay.js b/extensions/places-menu/placeDisplay.js
index 5d04599..788f6bf 100644
--- a/extensions/places-menu/placeDisplay.js
+++ b/extensions/places-menu/placeDisplay.js
@@ -1,6 +1,6 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
-const { Gio, GLib, Shell } = imports.gi;
+const {Gio, GLib, Shell} = imports.gi;
const Signals = imports.signals;
const ExtensionUtils = imports.misc.extensionUtils;
@@ -31,7 +31,7 @@ class PlaceInfo {
this.kind = kind;
this.file = file;
this.name = name || this._getFileName();
- this.icon = icon ? new Gio.ThemedIcon({ name: icon }) : this.getIcon();
+ this.icon = icon ? new Gio.ThemedIcon({name: icon}) : this.getIcon();
}
destroy() {
@@ -94,16 +94,16 @@ class PlaceInfo {
// icon from the query info above
switch (this.kind) {
case 'network':
- return new Gio.ThemedIcon({ name: 'folder-remote-symbolic' });
+ return new Gio.ThemedIcon({name: 'folder-remote-symbolic'});
case 'devices':
- return new Gio.ThemedIcon({ name: 'drive-harddisk-symbolic' });
+ return new Gio.ThemedIcon({name: 'drive-harddisk-symbolic'});
case 'special':
case 'bookmarks':
default:
if (!this.file.is_native())
- return new Gio.ThemedIcon({ name: 'folder-remote-symbolic' });
+ return new Gio.ThemedIcon({name: 'folder-remote-symbolic'});
else
- return new Gio.ThemedIcon({ name: 'folder-symbolic' });
+ return new Gio.ThemedIcon({name: 'folder-symbolic'});
}
}
@@ -138,7 +138,7 @@ class RootInfo extends PlaceInfo {
}
getIcon() {
- return new Gio.ThemedIcon({ name: 'drive-harddisk-symbolic' });
+ return new Gio.ThemedIcon({name: 'drive-harddisk-symbolic'});
}
_propertiesChanged(proxy) {
@@ -255,7 +255,7 @@ var PlacesManager = class {
network: [],
};
- this._settings = new Gio.Settings({ schema_id: BACKGROUND_SCHEMA });
+ this._settings = new Gio.Settings({schema_id: BACKGROUND_SCHEMA});
this._showDesktopIconsChangedId = this._settings.connect(
'changed::show-desktop-icons', this._updateSpecials.bind(this));
this._updateSpecials();
diff --git a/extensions/screenshot-window-sizer/extension.js b/extensions/screenshot-window-sizer/extension.js
index aa613a7..d59ec3f 100644
--- a/extensions/screenshot-window-sizer/extension.js
+++ b/extensions/screenshot-window-sizer/extension.js
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-const { Clutter, Meta, Shell, St } = imports.gi;
+const {Clutter, Meta, Shell, St} = imports.gi;
const ExtensionUtils = imports.misc.extensionUtils;
const Main = imports.ui.main;
@@ -39,7 +39,7 @@ function hideMessage() {
*/
function flashMessage(message) {
if (!text) {
- text = new St.Label({ style_class: 'screenshot-sizer-message' });
+ text = new St.Label({style_class: 'screenshot-sizer-message'});
Main.uiGroup.add_actor(text);
}
@@ -132,7 +132,7 @@ function cycleScreenshotSizes(display, window, binding) {
* @param {Meta.Window} window - the window whose size changed
*/
function _notifySizeChange(window) {
- const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
+ const {scaleFactor} = St.ThemeContext.get_for_stage(global.stage);
let newOuterRect = window.get_frame_rect();
let message = '%d×%d'.format(
newOuterRect.width / scaleFactor,
diff --git a/extensions/user-theme/extension.js b/extensions/user-theme/extension.js
index 98c4e20..4295519 100644
--- a/extensions/user-theme/extension.js
+++ b/extensions/user-theme/extension.js
@@ -2,7 +2,7 @@
// Load shell theme from ~/.local/share/themes/name/gnome-shell
/* exported init */
-const { Gio } = imports.gi;
+const {Gio} = imports.gi;
const ExtensionUtils = imports.misc.extensionUtils;
const Main = imports.ui.main;
diff --git a/extensions/user-theme/prefs.js b/extensions/user-theme/prefs.js
index 3876c5a..ef5c9fc 100644
--- a/extensions/user-theme/prefs.js
+++ b/extensions/user-theme/prefs.js
@@ -4,7 +4,7 @@
// we use async/await here to not block the mainloop, not to parallelize
/* eslint-disable no-await-in-loop */
-const { Adw, Gio, GLib, GObject, Gtk } = imports.gi;
+const {Adw, Gio, GLib, GObject, Gtk} = imports.gi;
const ExtensionUtils = imports.misc.extensionUtils;
@@ -21,7 +21,7 @@ class UserThemePrefsWidget extends Adw.PreferencesGroup {
}
constructor() {
- super({ title: 'Themes' });
+ super({title: 'Themes'});
this._actionGroup = new Gio.SimpleActionGroup();
this.insert_action_group('theme', this._actionGroup);
diff --git a/extensions/user-theme/util.js b/extensions/user-theme/util.js
index cb000a7..222eb75 100644
--- a/extensions/user-theme/util.js
+++ b/extensions/user-theme/util.js
@@ -1,5 +1,5 @@
/* exported getThemeDirs getModeThemeDirs */
-const { GLib } = imports.gi;
+const {GLib} = imports.gi;
const fn = (...args) => GLib.build_filenamev(args);
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index 198a30d..1d71d34 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -1,5 +1,5 @@
/* exported init */
-const { Clutter, Gio, GLib, GObject, Gtk, Meta, Shell, St } = imports.gi;
+const {Clutter, Gio, GLib, GObject, Gtk, Meta, Shell, St} = imports.gi;
const DND = imports.ui.dnd;
const ExtensionUtils = imports.misc.extensionUtils;
@@ -8,8 +8,8 @@ const Overview = imports.ui.overview;
const PopupMenu = imports.ui.popupMenu;
const Me = ExtensionUtils.getCurrentExtension();
-const { WindowPicker, WindowPickerToggle } = Me.imports.windowPicker;
-const { WorkspaceIndicator } = Me.imports.workspaceIndicator;
+const {WindowPicker, WindowPickerToggle} = Me.imports.windowPicker;
+const {WorkspaceIndicator} = Me.imports.workspaceIndicator;
const _ = ExtensionUtils.gettext;
@@ -120,9 +120,9 @@ class WindowTitle extends St.BoxLayout {
this._metaWindow = metaWindow;
- this._icon = new St.Bin({ style_class: 'window-button-icon' });
+ this._icon = new St.Bin({style_class: 'window-button-icon'});
this.add(this._icon);
- this.label_actor = new St.Label({ y_align: Clutter.ActorAlign.CENTER });
+ this.label_actor = new St.Label({y_align: Clutter.ActorAlign.CENTER});
this.label_actor.clutter_text.single_line_mode = true;
this.add(this.label_actor);
@@ -250,7 +250,7 @@ class BaseButton extends St.Button {
if (this._longPressTimeoutId)
return;
- const { longPressDuration } = Clutter.Settings.get_default();
+ const {longPressDuration} = Clutter.Settings.get_default();
this._longPressTimeoutId =
GLib.timeout_add(GLib.PRIORITY_DEFAULT, longPressDuration, () => {
delete this._longPressTimeoutId;
@@ -543,7 +543,7 @@ class AppButton extends BaseButton {
this.app = app;
this._updateVisibility();
- let stack = new St.Widget({ layout_manager: new Clutter.BinLayout() });
+ let stack = new St.Widget({layout_manager: new Clutter.BinLayout()});
this.set_child(stack);
this._singleWindowTitle = new St.Bin({
@@ -742,7 +742,7 @@ class WindowList extends St.Widget {
this._perMonitor = perMonitor;
this._monitor = monitor;
- let box = new St.BoxLayout({ x_expand: true, y_expand: true });
+ let box = new St.BoxLayout({x_expand: true, y_expand: true});
this.add_actor(box);
let toggle = new WindowPickerToggle();
@@ -751,7 +751,7 @@ class WindowList extends St.Widget {
toggle.connect('notify::checked',
this._updateWindowListVisibility.bind(this));
- let layout = new Clutter.BoxLayout({ homogeneous: true });
+ let layout = new Clutter.BoxLayout({homogeneous: true});
this._windowList = new St.Widget({
style_class: 'window-list',
reactive: true,
@@ -769,13 +769,13 @@ class WindowList extends St.Widget {
});
this._windowList.connect('scroll-event', this._onScrollEvent.bind(this));
- let indicatorsBox = new St.BoxLayout({ x_align: Clutter.ActorAlign.END });
+ let indicatorsBox = new St.BoxLayout({x_align: Clutter.ActorAlign.END});
box.add(indicatorsBox);
this._workspaceIndicator = new WorkspaceIndicator();
indicatorsBox.add_child(this._workspaceIndicator.container);
- this._mutterSettings = new Gio.Settings({ schema_id: 'org.gnome.mutter' });
+ this._mutterSettings = new Gio.Settings({schema_id: 'org.gnome.mutter'});
this._workspacesOnlyOnPrimaryChangedId = this._mutterSettings.connect(
'changed::workspaces-only-on-primary',
this._updateWorkspaceIndicatorVisibility.bind(this));
@@ -918,7 +918,7 @@ class WindowList extends St.Widget {
let children = this._windowList.get_children();
let [, childWidth] = children[0].get_preferred_width(-1);
- let { spacing } = this._windowList.layout_manager;
+ let {spacing} = this._windowList.layout_manager;
let workspace = global.workspace_manager.get_active_workspace();
let windows = global.display.get_tab_list(Meta.TabList.NORMAL, workspace);
diff --git a/extensions/window-list/prefs.js b/extensions/window-list/prefs.js
index 02b5234..6ef097d 100644
--- a/extensions/window-list/prefs.js
+++ b/extensions/window-list/prefs.js
@@ -1,7 +1,7 @@
// -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*-
/* exported init buildPrefsWidget */
-const { Adw, Gio, GLib, GObject, Gtk } = imports.gi;
+const {Adw, Gio, GLib, GObject, Gtk} = imports.gi;
const ExtensionUtils = imports.misc.extensionUtils;
@@ -37,12 +37,12 @@ class WindowListPrefsWidget extends Adw.PreferencesPage {
this.add(groupingGroup);
const modes = [
- { mode: 'never', title: _('Never group windows') },
- { mode: 'auto', title: _('Group windows when space is limited') },
- { mode: 'always', title: _('Always group windows') },
+ {mode: 'never', title: _('Never group windows')},
+ {mode: 'auto', title: _('Group windows when space is limited')},
+ {mode: 'always', title: _('Always group windows')},
];
- for (const { mode, title } of modes) {
+ for (const {mode, title} of modes) {
const check = new Gtk.CheckButton({
action_name: 'window-list.grouping-mode',
action_target: new GLib.Variant('s', mode),
diff --git a/extensions/window-list/windowPicker.js b/extensions/window-list/windowPicker.js
index db33156..8da04cd 100644
--- a/extensions/window-list/windowPicker.js
+++ b/extensions/window-list/windowPicker.js
@@ -1,12 +1,12 @@
/* exported WindowPicker, WindowPickerToggle */
-const { Clutter, GObject, Shell, St } = imports.gi;
+const {Clutter, GObject, Shell, St} = imports.gi;
const Layout = imports.ui.layout;
const Main = imports.ui.main;
-const { WorkspacesDisplay } = imports.ui.workspacesView;
+const {WorkspacesDisplay} = imports.ui.workspacesView;
const Workspace = imports.ui.workspace;
-const { VIGNETTE_BRIGHTNESS } = imports.ui.lightbox;
+const {VIGNETTE_BRIGHTNESS} = imports.ui.lightbox;
const {
SIDE_CONTROLS_ANIMATION_TIME,
OverviewAdjustment,
@@ -90,7 +90,7 @@ class MyWorkspace extends Workspace.Workspace {
this._adjChangedId =
this._overviewAdjustment.connect('notify::value', () => {
- const { value: progress } = this._overviewAdjustment;
+ const {value: progress} = this._overviewAdjustment;
const brightness = 1 - (1 - VIGNETTE_BRIGHTNESS) * progress;
for (const bg of this._background?._backgroundGroup ?? []) {
bg.content.set({
@@ -151,7 +151,7 @@ class MyWorkspaceBackground extends Workspace.WorkspaceBackground {
var WindowPicker = class WindowPicker extends Clutter.Actor {
static [GObject.signals] = {
- 'open-state-changed': { param_types: [GObject.TYPE_BOOLEAN] },
+ 'open-state-changed': {param_types: [GObject.TYPE_BOOLEAN]},
};
static {
@@ -159,7 +159,7 @@ var WindowPicker = class WindowPicker extends Clutter.Actor {
}
constructor() {
- super({ reactive: true });
+ super({reactive: true});
this._visible = false;
this._modal = false;
diff --git a/extensions/window-list/workspaceIndicator.js b/extensions/window-list/workspaceIndicator.js
index 36d66bb..f59b844 100644
--- a/extensions/window-list/workspaceIndicator.js
+++ b/extensions/window-list/workspaceIndicator.js
@@ -1,5 +1,5 @@
/* exported WorkspaceIndicator */
-const { Clutter, Gio, GObject, Meta, St } = imports.gi;
+const {Clutter, Gio, GObject, Meta, St} = imports.gi;
const DND = imports.ui.dnd;
const ExtensionUtils = imports.misc.extensionUtils;
@@ -25,7 +25,7 @@ class WindowPreview extends St.Button {
});
this._delegate = this;
- DND.makeDraggable(this, { restoreOnSuccess: true });
+ DND.makeDraggable(this, {restoreOnSuccess: true});
this._window = window;
@@ -274,7 +274,7 @@ var WorkspaceIndicator = class WorkspaceIndicator extends PanelMenu.Button {
let workspaceManager = global.workspace_manager;
this._currentWorkspace = workspaceManager.get_active_workspace_index();
- this._statusLabel = new St.Label({ text: this._getStatusText() });
+ this._statusLabel = new St.Label({text: this._getStatusText()});
this._statusBin = new St.Bin({
style_class: 'status-label-bin',
@@ -309,7 +309,7 @@ var WorkspaceIndicator = class WorkspaceIndicator extends PanelMenu.Button {
this._updateThumbnails();
this._updateThumbnailVisibility();
- this._settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.wm.preferences' });
+ this._settings = new Gio.Settings({schema_id: 'org.gnome.desktop.wm.preferences'});
this._settingsChangedId = this._settings.connect(
'changed::workspace-names', this._updateMenuLabels.bind(this));
}
@@ -327,7 +327,7 @@ var WorkspaceIndicator = class WorkspaceIndicator extends PanelMenu.Button {
}
_updateThumbnailVisibility() {
- const { workspaceManager } = global;
+ const {workspaceManager} = global;
const vertical = workspaceManager.layout_rows === -1;
const useMenu =
vertical || workspaceManager.n_workspaces > MAX_THUMBNAILS;
diff --git a/extensions/windowsNavigator/extension.js b/extensions/windowsNavigator/extension.js
index f279430..4f55a33 100644
--- a/extensions/windowsNavigator/extension.js
+++ b/extensions/windowsNavigator/extension.js
@@ -1,6 +1,6 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
/* exported init */
-const { Clutter, Graphene, GObject, St } = imports.gi;
+const {Clutter, Graphene, GObject, St} = imports.gi;
const Main = imports.ui.main;
const OverviewControls = imports.ui.overviewControls;
@@ -53,13 +53,13 @@ class MyWorkspace extends Workspace.Workspace {
}
getWindowWithTooltip(id) {
- const { layoutManager } = this._container;
+ const {layoutManager} = this._container;
const slot = layoutManager._windowSlots[id - 1];
return slot ? slot[WINDOW_SLOT].metaWindow : null;
}
showWindowsTooltips() {
- const { layoutManager } = this._container;
+ const {layoutManager} = this._container;
for (let i = 0; i < layoutManager._windowSlots.length; i++) {
if (layoutManager._windowSlots[i])
layoutManager._windowSlots[i][WINDOW_SLOT].showTooltip(`${i + 1}`);
@@ -67,7 +67,7 @@ class MyWorkspace extends Workspace.Workspace {
}
hideWindowsTooltips() {
- const { layoutManager } = this._container;
+ const {layoutManager} = this._container;
for (let i in layoutManager._windowSlots) {
if (layoutManager._windowSlots[i])
layoutManager._windowSlots[i][WINDOW_SLOT].hideTooltip();
@@ -93,13 +93,13 @@ class MyWorkspace extends Workspace.Workspace {
this._text.add_constraint(new Clutter.AlignConstraint({
source: this.windowContainer,
align_axis: Clutter.AlignAxis.X_AXIS,
- pivot_point: new Graphene.Point({ x: 0.5, y: -1 }),
+ pivot_point: new Graphene.Point({x: 0.5, y: -1}),
factor: this._closeButtonSide === St.Side.LEFT ? 1 : 0,
}));
this._text.add_constraint(new Clutter.AlignConstraint({
source: this.windowContainer,
align_axis: Clutter.AlignAxis.Y_AXIS,
- pivot_point: new Graphene.Point({ x: -1, y: 0.5 }),
+ pivot_point: new Graphene.Point({x: -1, y: 0.5}),
factor: 0,
}));
@@ -107,7 +107,7 @@ class MyWorkspace extends Workspace.Workspace {
}).call(clone);
clone.showTooltip = function (text) {
- this._text.set({ text });
+ this._text.set({text});
this._text.show();
};
@@ -170,7 +170,7 @@ class MyWorkspacesView extends WorkspacesView.WorkspacesView {
}
_onKeyPress(s, o) {
- const { ControlsState } = OverviewControls;
+ const {ControlsState} = OverviewControls;
if (this._overviewAdjustment.value !== ControlsState.WINDOW_PICKER)
return false;
diff --git a/extensions/workspace-indicator/extension.js b/extensions/workspace-indicator/extension.js
index e424a69..2da644e 100644
--- a/extensions/workspace-indicator/extension.js
+++ b/extensions/workspace-indicator/extension.js
@@ -1,7 +1,7 @@
// -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*-
/* exported init enable disable */
-const { Clutter, Gio, GObject, Meta, St } = imports.gi;
+const {Clutter, Gio, GObject, Meta, St} = imports.gi;
const DND = imports.ui.dnd;
const ExtensionUtils = imports.misc.extensionUtils;
@@ -30,7 +30,7 @@ class WindowPreview extends St.Button {
});
this._delegate = this;
- DND.makeDraggable(this, { restoreOnSuccess: true });
+ DND.makeDraggable(this, {restoreOnSuccess: true});
this._window = window;
@@ -310,7 +310,7 @@ class WorkspaceIndicator extends PanelMenu.Button {
this._updateThumbnails();
this._updateThumbnailVisibility();
- this._settings = new Gio.Settings({ schema_id: WORKSPACE_SCHEMA });
+ this._settings = new Gio.Settings({schema_id: WORKSPACE_SCHEMA});
this._settingsChangedId = this._settings.connect(
`changed::${WORKSPACE_KEY}`,
this._updateMenuLabels.bind(this));
@@ -331,7 +331,7 @@ class WorkspaceIndicator extends PanelMenu.Button {
}
_updateThumbnailVisibility() {
- const { workspaceManager } = global;
+ const {workspaceManager} = global;
const vertical = workspaceManager.layout_rows === -1;
const useMenu =
vertical || workspaceManager.n_workspaces > MAX_THUMBNAILS;
diff --git a/extensions/workspace-indicator/prefs.js b/extensions/workspace-indicator/prefs.js
index 5a1da46..002be95 100644
--- a/extensions/workspace-indicator/prefs.js
+++ b/extensions/workspace-indicator/prefs.js
@@ -1,7 +1,7 @@
// -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*-
/* exported init buildPrefsWidget */
-const { Adw, Gio, GLib, GObject, Gtk, Pango } = imports.gi;
+const {Adw, Gio, GLib, GObject, Gtk, Pango} = imports.gi;
const ExtensionUtils = imports.misc.extensionUtils;
@@ -41,7 +41,7 @@ class WorkspacesList extends GObject.Object {
GObject.registerClass(this);
}
- #settings = new Gio.Settings({ schema_id: WORKSPACE_SCHEMA });
+ #settings = new Gio.Settings({schema_id: WORKSPACE_SCHEMA});
#names = this.#settings.get_strv(WORKSPACE_KEY);
#items = Gtk.StringList.new(this.#names);
#changedId;
@@ -131,8 +131,8 @@ class WorkspaceSettingsWidget extends Adw.PreferencesGroup {
this._workspaces = new WorkspacesList();
- const store = new Gio.ListStore({ item_type: Gio.ListModel });
- const listModel = new Gtk.FlattenListModel({ model: store });
+ const store = new Gio.ListStore({item_type: Gio.ListModel});
+ const listModel = new Gtk.FlattenListModel({model: store});
store.append(this._workspaces);
store.append(new NewItemModel());
@@ -157,7 +157,7 @@ class WorkspaceRow extends Adw.PreferencesRow {
}
constructor(name) {
- super({ name });
+ super({name});
const box = new Gtk.Box({
spacing: 12,
diff --git a/lint/eslintrc-shell.yml b/lint/eslintrc-shell.yml
index 2291532..75a7818 100644
--- a/lint/eslintrc-shell.yml
+++ b/lint/eslintrc-shell.yml
@@ -3,9 +3,10 @@ rules:
- error
- properties: never
allow: [^vfunc_, ^on_]
- object-curly-spacing:
+ consistent-return: error
+ eqeqeq:
- error
- - always
+ - smart
prefer-arrow-callback: error
globals:
global: readonly
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]