[gjs: 17/43] CI: Add lines-between-class-members to eslint rules



commit d492a8b069bdd79218763c1a4bac46c3c98092cd
Author: Philip Chimento <philip chimento gmail com>
Date:   Sat Aug 3 20:56:38 2019 -0700

    CI: Add lines-between-class-members to eslint rules
    
    This is similar to what's required in Python PEP8, increases
    readability.

 .eslintrc.yml                              | 1 +
 installed-tests/js/testGIMarshalling.js    | 6 ++++++
 installed-tests/js/testGObjectClass.js     | 1 +
 installed-tests/js/testGObjectInterface.js | 2 ++
 installed-tests/js/testLegacyClass.js      | 1 +
 installed-tests/js/testLegacyGObject.js    | 1 +
 6 files changed, 12 insertions(+)
---
diff --git a/.eslintrc.yml b/.eslintrc.yml
index 384a71a3..87b03249 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -61,6 +61,7 @@ rules:
   linebreak-style:
     - error
     - unix
+  lines-between-class-members: error
   no-constant-condition:
     - error
     - checkLoops: false
diff --git a/installed-tests/js/testGIMarshalling.js b/installed-tests/js/testGIMarshalling.js
index a28c3c18..c4708735 100644
--- a/installed-tests/js/testGIMarshalling.js
+++ b/installed-tests/js/testGIMarshalling.js
@@ -587,21 +587,27 @@ const VFuncTester = GObject.registerClass(class VFuncTester extends GIMarshallin
     vfunc_vfunc_return_value_only() {
         return 42;
     }
+
     vfunc_vfunc_one_out_parameter() {
         return 43;
     }
+
     vfunc_vfunc_multiple_out_parameters() {
         return [44, 45];
     }
+
     vfunc_vfunc_return_value_and_one_out_parameter() {
         return [46, 47];
     }
+
     vfunc_vfunc_return_value_and_multiple_out_parameters() {
         return [48, 49, 50];
     }
+
     vfunc_vfunc_array_out_parameter() {
         return [50, 51];
     }
+
     vfunc_vfunc_meth_with_err(x) {
         switch (x) {
         case -1:
diff --git a/installed-tests/js/testGObjectClass.js b/installed-tests/js/testGObjectClass.js
index ad6910e9..629610b7 100644
--- a/installed-tests/js/testGObjectClass.js
+++ b/installed-tests/js/testGObjectClass.js
@@ -340,6 +340,7 @@ describe('GObject class with decorator', function () {
             get readwrite() {
                 return this._subclass_readwrite;
             }
+
             set readwrite(val) {
                 this._subclass_readwrite = `subclass${val}`;
             }
diff --git a/installed-tests/js/testGObjectInterface.js b/installed-tests/js/testGObjectInterface.js
index c88b02cc..d2d12af1 100644
--- a/installed-tests/js/testGObjectInterface.js
+++ b/installed-tests/js/testGObjectInterface.js
@@ -56,6 +56,7 @@ const GObjectImplementingGObjectInterface = GObject.registerClass({
     }
 
     requiredG() {}
+
     optionalG() {
         return AGObjectInterface.optionalG(this);
     }
@@ -79,6 +80,7 @@ const ImplementationOfTwoInterfaces = GObject.registerClass({
     },
 }, class ImplementationOfTwoInterfaces extends GObject.Object {
     requiredG() {}
+
     optionalG() {
         return InterfaceRequiringGObjectInterface.optionalG(this);
     }
diff --git a/installed-tests/js/testLegacyClass.js b/installed-tests/js/testLegacyClass.js
index afd8a7c6..17b5f3cb 100644
--- a/installed-tests/js/testLegacyClass.js
+++ b/installed-tests/js/testLegacyClass.js
@@ -716,6 +716,7 @@ describe('ES6 class inheriting from Lang.Class', function () {
             chainUpToMe() {
                 super.chainUpToMe();
             }
+
             overrideMe() {}
         };
     });
diff --git a/installed-tests/js/testLegacyGObject.js b/installed-tests/js/testLegacyGObject.js
index a4c515b2..f7baae3b 100644
--- a/installed-tests/js/testLegacyGObject.js
+++ b/installed-tests/js/testLegacyGObject.js
@@ -842,6 +842,7 @@ const Shiny = GObject.registerClass({
     get overrideProperty() {
         return this._overrideProperty + 2;
     }
+
     set overrideProperty(value) {
         this._overrideProperty = value - 1;
     }


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