[gjs/ewlsh/update-eslint] Update dangling comma eslint rule. - In ESLint v6, dangling commas on functions are now linted.
- From: Evan Welsh <ewlsh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/ewlsh/update-eslint] Update dangling comma eslint rule. - In ESLint v6, dangling commas on functions are now linted.
- Date: Tue, 23 Jun 2020 00:31:48 +0000 (UTC)
commit 1118ee62e374f9f956fea2d0c022ad58a3f01398
Author: Evan Welsh <noreply evanwelsh com>
Date: Mon Jun 22 19:31:22 2020 -0500
Update dangling comma eslint rule.
- In ESLint v6, dangling commas on functions are now linted.
.eslintrc.yml | 2 +-
examples/gtk-application.js | 6 +++---
installed-tests/js/testTweener.js | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/.eslintrc.yml b/.eslintrc.yml
index ce05880f..7bcb5eb0 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -26,7 +26,7 @@ rules:
- error
- arrays: always-multiline
objects: always-multiline
- functions: only-multiline
+ functions: never
comma-spacing:
- error
- before: false
diff --git a/examples/gtk-application.js b/examples/gtk-application.js
index 514b8bdd..e8ea05a4 100644
--- a/examples/gtk-application.js
+++ b/examples/gtk-application.js
@@ -20,7 +20,7 @@ var ExampleApplication = GObject.registerClass({
'ExampleProperty', // nickname
'An example read write property', // description
GObject.ParamFlags.READWRITE, // read/write/construct...
- 'a default value',
+ 'a default value'
),
},
Signals: {'examplesig': {param_types: [GObject.TYPE_INT]}},
@@ -83,7 +83,7 @@ var ExampleApplication = GObject.registerClass({
notif.set_title('Example Notification');
notif.set_body('Example Body');
notif.set_icon(
- new Gio.ThemedIcon({name: 'dialog-information-symbolic'}),
+ new Gio.ThemedIcon({name: 'dialog-information-symbolic'})
);
// A default action for when the body of the notification is clicked
@@ -92,7 +92,7 @@ var ExampleApplication = GObject.registerClass({
// A button for the notification
notif.add_button(
'Button Text',
- "app.exampleAction('exampleParameter')",
+ "app.exampleAction('exampleParameter')"
);
// This won't actually be shown, since an application needs a .desktop
diff --git a/installed-tests/js/testTweener.js b/installed-tests/js/testTweener.js
index a674e074..1f6efe57 100644
--- a/installed-tests/js/testTweener.js
+++ b/installed-tests/js/testTweener.js
@@ -282,7 +282,7 @@ describe('Tweener', function () {
},
function (obj, val) {
obj.x = -val;
- },
+ }
);
var objectA = {
@@ -343,7 +343,7 @@ describe('Tweener', function () {
function (val) {
return [{name: 'x', value: val},
{name: 'y', value: -val}];
- },
+ }
);
var objectA = {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]