[gnome-maps/wip/mattiasb/eslint: 1/3] Lint: Disallow dangling commas



commit e84db96358fff7261dc14e532000246c1c021e88
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date:   Fri Jan 29 16:59:54 2016 +0100

    Lint: Disallow dangling commas
    
    Disallow dangling commas in object literals.
    
    http://eslint.org/docs/rules/comma-dangle

 .eslintrc.yaml             |    5 +++++
 src/layersPopover.js       |    2 +-
 src/location.js            |    2 +-
 src/notificationManager.js |    2 +-
 4 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/.eslintrc.yaml b/.eslintrc.yaml
index d85971c..fabc867 100644
--- a/.eslintrc.yaml
+++ b/.eslintrc.yaml
@@ -2,3 +2,8 @@ root: true
 
 env:
     es6: true
+
+rules:
+    comma-dangle:
+        - 2
+        - "never"
diff --git a/src/layersPopover.js b/src/layersPopover.js
index 328e144..7e8dcae 100644
--- a/src/layersPopover.js
+++ b/src/layersPopover.js
@@ -105,7 +105,7 @@ const LayersPopover = new Lang.Class({
 
     _onLoadLayerClicked: function(button) {
         let fileChooser = new ShapeLayerFileChooser({
-            transient_for: this.get_parent(),
+            transient_for: this.get_parent()
         });
 
         if (fileChooser.run() === Gtk.ResponseType.OK) {
diff --git a/src/location.js b/src/location.js
index f33f111..f57d90b 100644
--- a/src/location.js
+++ b/src/location.js
@@ -42,5 +42,5 @@ const Location = new Lang.Class({
 
     set heading(v) {
         this._heading = v;
-    },
+    }
 });
diff --git a/src/notificationManager.js b/src/notificationManager.js
index 15247c4..43ab293 100644
--- a/src/notificationManager.js
+++ b/src/notificationManager.js
@@ -50,5 +50,5 @@ const NotificationManager = new Lang.Class({
             }).bind(this));
         }
         notification.reveal();
-    },
+    }
 });


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