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();
|
this._sessionUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
get can_power_off() {
|
get can_power_off() {
|
||||||
return this._actions.get(POWER_OFF_ACTION_ID).available;
|
return this._actions.get(POWER_OFF_ACTION_ID).available;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
get can_suspend() {
|
get can_suspend() {
|
||||||
return this._actions.get(SUSPEND_ACTION_ID).available;
|
return this._actions.get(SUSPEND_ACTION_ID).available;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
get can_lock_screen() {
|
get can_lock_screen() {
|
||||||
return this._actions.get(LOCK_SCREEN_ACTION_ID).available;
|
return this._actions.get(LOCK_SCREEN_ACTION_ID).available;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
get can_switch_user() {
|
get can_switch_user() {
|
||||||
return this._actions.get(SWITCH_USER_ACTION_ID).available;
|
return this._actions.get(SWITCH_USER_ACTION_ID).available;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
get can_logout() {
|
get can_logout() {
|
||||||
return this._actions.get(LOGOUT_ACTION_ID).available;
|
return this._actions.get(LOGOUT_ACTION_ID).available;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
get can_lock_orientation() {
|
get can_lock_orientation() {
|
||||||
return this._actions.get(LOCK_ORIENTATION_ACTION_ID).available;
|
return this._actions.get(LOCK_ORIENTATION_ACTION_ID).available;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
get orientation_lock_icon() {
|
get orientation_lock_icon() {
|
||||||
return this._actions.get(LOCK_ORIENTATION_ACTION_ID).iconName;
|
return this._actions.get(LOCK_ORIENTATION_ACTION_ID).iconName;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
script_applicationsShowStart, script_applicationsShowDone,
|
script_applicationsShowStart, script_applicationsShowDone,
|
||||||
script_afterShowHide, malloc_usedSize, glx_swapComplete,
|
script_afterShowHide, malloc_usedSize, glx_swapComplete,
|
||||||
clutter_stagePaintDone */
|
clutter_stagePaintDone */
|
||||||
|
/* eslint camelcase: ["error", { properties: "never", allow: ["^script_", "^malloc", "^glx", "^clutter"] }] */
|
||||||
|
|
||||||
const System = imports.system;
|
const System = imports.system;
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
script_redrawTestDone, script_collectTimings,
|
script_redrawTestDone, script_collectTimings,
|
||||||
script_geditLaunch, script_geditFirstFrame,
|
script_geditLaunch, script_geditFirstFrame,
|
||||||
clutter_stagePaintStart, clutter_paintCompletedTimestamp */
|
clutter_stagePaintStart, clutter_paintCompletedTimestamp */
|
||||||
|
/* eslint camelcase: ["error", { properties: "never", allow: ["^script_", "^clutter"] }] */
|
||||||
const { Clutter, Gio, Shell } = imports.gi;
|
const { Clutter, Gio, Shell } = imports.gi;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Scripting = imports.ui.scripting;
|
const Scripting = imports.ui.scripting;
|
||||||
|
@ -662,6 +662,7 @@ class AppIcon extends St.BoxLayout {
|
|||||||
this.add(this.label, { x_fill: false });
|
this.add(this.label, { x_fill: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
set_size(size) {
|
set_size(size) {
|
||||||
this.icon = this.app.create_icon_texture(size);
|
this.icon = this.app.create_icon_texture(size);
|
||||||
this._iconBin.child = this.icon;
|
this._iconBin.child = this.icon;
|
||||||
|
@ -81,10 +81,12 @@ var MonitorConstraint = GObject.registerClass({
|
|||||||
this.notify('index');
|
this.notify('index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
get work_area() {
|
get work_area() {
|
||||||
return this._workArea;
|
return this._workArea;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
set work_area(v) {
|
set work_area(v) {
|
||||||
if (v == this._workArea)
|
if (v == this._workArea)
|
||||||
return;
|
return;
|
||||||
|
@ -307,10 +307,12 @@ var PadDiagram = GObject.registerClass({
|
|||||||
super._init(params);
|
super._init(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
get left_handed() {
|
get left_handed() {
|
||||||
return this._leftHanded;
|
return this._leftHanded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
set left_handed(leftHanded) {
|
set left_handed(leftHanded) {
|
||||||
this._leftHanded = leftHanded;
|
this._leftHanded = leftHanded;
|
||||||
}
|
}
|
||||||
@ -329,10 +331,12 @@ var PadDiagram = GObject.registerClass({
|
|||||||
this._handle = this._composeStyledDiagram();
|
this._handle = this._composeStyledDiagram();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
get editor_actor() {
|
get editor_actor() {
|
||||||
return this._editorActor;
|
return this._editorActor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
set editor_actor(actor) {
|
set editor_actor(actor) {
|
||||||
actor.hide();
|
actor.hide();
|
||||||
this._editorActor = actor;
|
this._editorActor = actor;
|
||||||
|
Loading…
Reference in New Issue
Block a user