[gjs: 27/43] CI: Add no-trailing-spaces to eslint rules



commit ced56f3d223e95a82840c50771b908714a80c372
Author: Philip Chimento <philip chimento gmail com>
Date:   Sat Aug 3 23:31:36 2019 -0700

    CI: Add no-trailing-spaces to eslint rules
    
    Some git clients or editors will enforce this anyway, and we don't want
    them to put spacing fixes in unrelated commits, so fix 'em all now.

 .eslintrc.yml               |  1 +
 examples/gtk-application.js | 38 +++++++++++++++++++-------------------
 2 files changed, 20 insertions(+), 19 deletions(-)
---
diff --git a/.eslintrc.yml b/.eslintrc.yml
index c9cd89b7..5fe95ec0 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -97,6 +97,7 @@ rules:
   no-shadow: error
   no-tabs: error
   no-throw-literal: error
+  no-trailing-spaces: error
   no-unused-vars:
     - error
     - varsIgnorePattern: ^unused
diff --git a/examples/gtk-application.js b/examples/gtk-application.js
index 99a3fd98..d4893a7b 100644
--- a/examples/gtk-application.js
+++ b/examples/gtk-application.js
@@ -39,43 +39,43 @@ var ExampleApplication = GObject.registerClass({
 
         return this._exampleprop;
     }
-    
+
     set exampleprop(value) {
         this._exampleprop = value;
-        
+
         // notify() has to be called, if you want it
         this.notify('exampleprop');
     }
-    
+
     // Example signal emission
     emitExamplesig(number) {
         this.emit('examplesig', number);
     }
-    
+
     vfunc_startup() {
         super.vfunc_startup();
-        
+
         // An example GAction, see: https://wiki.gnome.org/HowDoI/GAction
         let exampleAction = new Gio.SimpleAction({
             name: 'exampleAction',
             parameter_type: new GLib.VariantType('s'),
         });
-        
+
         exampleAction.connect('activate', (action, param) => {
             param = param.deepUnpack().toString();
-            
+
             if (param === 'exampleParameter')
                 log('Yes!');
         });
-        
+
         this.add_action(exampleAction);
     }
-    
+
     vfunc_activate() {
         super.vfunc_activate();
-        
+
         this.hold();
-        
+
         // Example ApplicationWindow
         let window = new Gtk.ApplicationWindow({
             application: this,
@@ -83,16 +83,16 @@ var ExampleApplication = GObject.registerClass({
             default_width: 300,
             default_height: 200,
         });
-        
+
         let label = new Gtk.Label({label: this.exampleprop});
         window.add(label);
-        
+
         window.connect('delete-event', () => {
             this.quit();
         });
-        
+
         window.show_all();
-        
+
         // Example GNotification, see: https://developer.gnome.org/GNotification/
         let notif = new Gio.Notification();
         notif.set_title('Example Notification');
@@ -100,20 +100,20 @@ var ExampleApplication = GObject.registerClass({
         notif.set_icon(
             new Gio.ThemedIcon({name: 'dialog-information-symbolic'})
         );
-        
+
         // A default action for when the body of the notification is clicked
         notif.set_default_action("app.exampleAction('exampleParameter')");
-        
+
         // A button for the notification
         notif.add_button(
             'Button Text',
             "app.exampleAction('exampleParameter')"
         );
-        
+
         // This won't actually be shown, since an application needs a .desktop
         // file with a base name matching the application id
         this.send_notification('example-notification', notif);
-        
+
         // Withdraw
         this.withdraw_notification('example-notification');
     }


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