summaryrefslogtreecommitdiff
path: root/examples/gtk-application.js
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2019-08-03 17:57:34 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2019-08-13 22:17:23 -0700
commit47d74dfbcccafe8281502180bdae43ebb6e90c2f (patch)
tree18f1e1609719e9c39d8abfa3ab8fa282a1698276 /examples/gtk-application.js
parent688b7b6f064d63e4bebef94b676d6e0df1e98557 (diff)
downloadgjs-47d74dfbcccafe8281502180bdae43ebb6e90c2f.tar.gz
CI: Add curly to eslint rules
This allows omitting the braces on a one-line block (note one-statement is not necessarily one-line!) but enforces consistent brace style between if and else clauses which can be a source of bugs.
Diffstat (limited to 'examples/gtk-application.js')
-rw-r--r--examples/gtk-application.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/gtk-application.js b/examples/gtk-application.js
index fe3c6f11..99a3fd98 100644
--- a/examples/gtk-application.js
+++ b/examples/gtk-application.js
@@ -31,13 +31,12 @@ var ExampleApplication = GObject.registerClass({
flags: Gio.ApplicationFlags.FLAGS_NONE,
});
}
-
+
// Example property getter/setter
get exampleprop() {
- if (typeof this._exampleprop === 'undefined') {
+ if (typeof this._exampleprop === 'undefined')
return 'a default value';
- }
-
+
return this._exampleprop;
}
@@ -65,9 +64,8 @@ var ExampleApplication = GObject.registerClass({
exampleAction.connect('activate', (action, param) => {
param = param.deepUnpack().toString();
- if (param === 'exampleParameter') {
+ if (param === 'exampleParameter')
log('Yes!');
- }
});
this.add_action(exampleAction);