[gnome-maps/wip/mattiasb/eslint: 1/8] Lint: No dangling commas
- From: Mattias Bengtsson <mattiasb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mattiasb/eslint: 1/8] Lint: No dangling commas
- Date: Sat, 30 Jan 2016 20:25:31 +0000 (UTC)
commit 0625150d0643d13661c52d02d6dfeb99b88f2f88
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date: Fri Jan 29 16:59:54 2016 +0100
Lint: No dangling commas
Disallow dangling commas in object literals.
var foo = {
bar: "baz",
qux: "quux", // ← Dangling comma here
};
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]