[polari/lint-camelcase: 1/2] style: Disable camelcase rule for GObject properties



commit 7cfb6e8e85d1c2d892642dd7c63cae6c7aeb2375
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Feb 1 12:03:12 2019 +0100

    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/polari/merge_requests/87

 src/chatView.js          | 6 ++++++
 src/connections.js       | 4 ++++
 src/entryArea.js         | 2 ++
 src/mainWindow.js        | 3 +++
 src/roomStack.js         | 1 +
 src/serverRoomManager.js | 1 +
 src/userList.js          | 2 ++
 7 files changed, 19 insertions(+)
---
diff --git a/src/chatView.js b/src/chatView.js
index d6c3b79..c4fb0b7 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -243,6 +243,7 @@ const HoverFilterTag = GObject.registerClass({
         this.foreground_rgba = color;
     }
 
+    // eslint-disable-next-line camelcase
     set filtered_tag(value) {
         this._filteredTag = value;
         this.notify('filtered-tag');
@@ -253,10 +254,12 @@ const HoverFilterTag = GObject.registerClass({
         this._updateColor();
     }
 
+    // eslint-disable-next-line camelcase
     get filtered_tag() {
         return this._filteredTag;
     }
 
+    // eslint-disable-next-line camelcase
     set hover_opacity(value) {
         if (this._hoverOpacity == value)
             return;
@@ -267,6 +270,7 @@ const HoverFilterTag = GObject.registerClass({
             this._updateColor();
     }
 
+    // eslint-disable-next-line camelcase
     get hover_opacity() {
         return this._hoverOpacity;
     }
@@ -622,10 +626,12 @@ var ChatView = GObject.registerClass({
         }
     }
 
+    // eslint-disable-next-line camelcase
     get max_nick_chars() {
         return this._maxNickChars;
     }
 
+    // eslint-disable-next-line camelcase
     get can_drop() {
         return this._channel != null;
     }
diff --git a/src/connections.js b/src/connections.js
index 68936d5..ea4bea8 100644
--- a/src/connections.js
+++ b/src/connections.js
@@ -133,10 +133,12 @@ var ConnectionsList = GObject.registerClass({
         });
     }
 
+    // eslint-disable-next-line camelcase
     get favorites_only() {
         return this._favoritesOnly;
     }
 
+    // eslint-disable-next-line camelcase
     set favorites_only(favsOnly) {
         if (this._favoritesOnly == favsOnly)
             return;
@@ -383,6 +385,7 @@ var ConnectionDetails = GObject.registerClass({
         this._sslCheckbox.active = this._savedSSL;
     }
 
+    // eslint-disable-next-line camelcase
     get can_confirm() {
         let paramsChanged = this._nameEntry.text != this._savedName ||
                             this._serverEntry.text != this._savedServer ||
@@ -395,6 +398,7 @@ var ConnectionDetails = GObject.registerClass({
                paramsChanged;
     }
 
+    // eslint-disable-next-line camelcase
     get has_service() {
         return this._networksManager.getAccountIsPredefined(this._account);
     }
diff --git a/src/entryArea.js b/src/entryArea.js
index 97452dc..95a2135 100644
--- a/src/entryArea.js
+++ b/src/entryArea.js
@@ -51,6 +51,7 @@ var ChatEntry = GObject.registerClass({
         this._useDefaultHandler = false;
     }
 
+    // eslint-disable-next-line camelcase
     get can_drop() {
         return true;
     }
@@ -290,6 +291,7 @@ var EntryArea = GObject.registerClass({
         this._chatEntry.connect('unmap', this._updateCompletions.bind(this));
     }
 
+    // eslint-disable-next-line camelcase
     set max_nick_chars(maxChars) {
         this._maxNickChars = maxChars;
         this._updateNick();
diff --git a/src/mainWindow.js b/src/mainWindow.js
index c016703..6c9f2ab 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -202,6 +202,7 @@ var MainWindow = GObject.registerClass({
         return this._subtitle;
     }
 
+    // eslint-disable-next-line camelcase
     get subtitle_visible() {
         return this._subtitle.length > 0;
     }
@@ -269,10 +270,12 @@ var MainWindow = GObject.registerClass({
         this._titlebarRight.set_decoration_layout(layoutRight);
     }
 
+    // eslint-disable-next-line camelcase
     get active_room() {
         return this._room;
     }
 
+    // eslint-disable-next-line camelcase
     set active_room(room) {
         if (room == this._room)
             return;
diff --git a/src/roomStack.js b/src/roomStack.js
index cccbaf9..2fa9e1b 100644
--- a/src/roomStack.js
+++ b/src/roomStack.js
@@ -57,6 +57,7 @@ var RoomStack = GObject.registerClass({
         this._updateSensitivity();
     }
 
+    // eslint-disable-next-line camelcase
     get entry_area_height() {
         return this._entryAreaHeight;
     }
diff --git a/src/serverRoomManager.js b/src/serverRoomManager.js
index dedd398..2513b30 100644
--- a/src/serverRoomManager.js
+++ b/src/serverRoomManager.js
@@ -190,6 +190,7 @@ var ServerRoomList = GObject.registerClass({
         });
     }
 
+    // eslint-disable-next-line camelcase
     get can_join() {
         let canJoin = false;
         this._store.foreach((model, path, iter) => {
diff --git a/src/userList.js b/src/userList.js
index 278fe56..7bcdd6d 100644
--- a/src/userList.js
+++ b/src/userList.js
@@ -134,10 +134,12 @@ var UserDetails = GObject.registerClass({
         this._notificationLabel.opacity = this.notifications_enabled ? 1. : 0.;
     }
 
+    // eslint-disable-next-line camelcase
     get notifications_enabled() {
         return this._notificationsEnabled;
     }
 
+    // eslint-disable-next-line camelcase
     set notifications_enabled(value) {
         if (this._notificationsEnabled == value)
             return;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]