style: Disable camelcase rule for GObject properties
For GObject properties, we follow the convention of all-lowercase, dash-separated names. Those translate to underscores in getters/setters, so exempt them from the newly added "camelcase" rule. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/627
This commit is contained in:
parent
e357559582
commit
1e13f32cea
@ -188,30 +188,37 @@ const SystemActions = GObject.registerClass({
|
||||
this._sessionUpdated();
|
||||
}
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
get can_power_off() {
|
||||
return this._actions.get(POWER_OFF_ACTION_ID).available;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
get can_suspend() {
|
||||
return this._actions.get(SUSPEND_ACTION_ID).available;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
get can_lock_screen() {
|
||||
return this._actions.get(LOCK_SCREEN_ACTION_ID).available;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
get can_switch_user() {
|
||||
return this._actions.get(SWITCH_USER_ACTION_ID).available;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
get can_logout() {
|
||||
return this._actions.get(LOGOUT_ACTION_ID).available;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
get can_lock_orientation() {
|
||||
return this._actions.get(LOCK_ORIENTATION_ACTION_ID).available;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
get orientation_lock_icon() {
|
||||
return this._actions.get(LOCK_ORIENTATION_ACTION_ID).iconName;
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
script_applicationsShowStart, script_applicationsShowDone,
|
||||
script_afterShowHide, malloc_usedSize, glx_swapComplete,
|
||||
clutter_stagePaintDone */
|
||||
/* eslint camelcase: ["error", { properties: "never", allow: ["^script_", "^malloc", "^glx", "^clutter"] }] */
|
||||
|
||||
const System = imports.system;
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
script_redrawTestDone, script_collectTimings,
|
||||
script_geditLaunch, script_geditFirstFrame,
|
||||
clutter_stagePaintStart, clutter_paintCompletedTimestamp */
|
||||
/* eslint camelcase: ["error", { properties: "never", allow: ["^script_", "^clutter"] }] */
|
||||
const { Clutter, Gio, Shell } = imports.gi;
|
||||
const Main = imports.ui.main;
|
||||
const Scripting = imports.ui.scripting;
|
||||
|
@ -662,6 +662,7 @@ class AppIcon extends St.BoxLayout {
|
||||
this.add(this.label, { x_fill: false });
|
||||
}
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
set_size(size) {
|
||||
this.icon = this.app.create_icon_texture(size);
|
||||
this._iconBin.child = this.icon;
|
||||
|
@ -81,10 +81,12 @@ var MonitorConstraint = GObject.registerClass({
|
||||
this.notify('index');
|
||||
}
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
get work_area() {
|
||||
return this._workArea;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
set work_area(v) {
|
||||
if (v == this._workArea)
|
||||
return;
|
||||
|
@ -307,10 +307,12 @@ var PadDiagram = GObject.registerClass({
|
||||
super._init(params);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
get left_handed() {
|
||||
return this._leftHanded;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
set left_handed(leftHanded) {
|
||||
this._leftHanded = leftHanded;
|
||||
}
|
||||
@ -329,10 +331,12 @@ var PadDiagram = GObject.registerClass({
|
||||
this._handle = this._composeStyledDiagram();
|
||||
}
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
get editor_actor() {
|
||||
return this._editorActor;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
set editor_actor(actor) {
|
||||
actor.hide();
|
||||
this._editorActor = actor;
|
||||
|
Loading…
Reference in New Issue
Block a user