[gjs: 12/43] CI: Add dot-location to eslint rules
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 12/43] CI: Add dot-location to eslint rules
- Date: Wed, 14 Aug 2019 17:28:04 +0000 (UTC)
commit 7e11c5e828a64a63a6b810157e0e6caac0434d35
Author: Philip Chimento <philip chimento gmail com>
Date: Sat Aug 3 18:00:33 2019 -0700
CI: Add dot-location to eslint rules
This enforces the wrap-before-dot style common in code that uses JS
promises:
getPromise()
.then(doSomething)
.catch(logError)
.eslintrc.yml | 3 +++
installed-tests/js/testSystem.js | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/.eslintrc.yml b/.eslintrc.yml
index c8cfe957..6663797d 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -31,6 +31,9 @@ rules:
- error
- multi-or-nest
- consistent
+ dot-location:
+ - error
+ - property
indent:
- error
- 4
diff --git a/installed-tests/js/testSystem.js b/installed-tests/js/testSystem.js
index 922a70fe..ad6732f5 100644
--- a/installed-tests/js/testSystem.js
+++ b/installed-tests/js/testSystem.js
@@ -32,8 +32,8 @@ describe('System.addressOfGObject()', function () {
});
it('throws for non GObject objects', function () {
- expect(() => System.addressOfGObject({})).
- toThrowError(/Object 0x[a-f0-9]+ is not a GObject/);
+ expect(() => System.addressOfGObject({}))
+ .toThrowError(/Object 0x[a-f0-9]+ is not a GObject/);
});
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]