From b50347682420ac3e93e28a8252e2c78848cc0cef Mon Sep 17 00:00:00 2001 From: Andre Staltz Date: Wed, 26 Apr 2023 14:32:08 +0300 Subject: [PATCH] format code --- lib/range.js | 2 +- package.json | 6 ++++-- test/thread-sync.test.js | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/range.js b/lib/range.js index 25c5e85..da808f9 100644 --- a/lib/range.js +++ b/lib/range.js @@ -25,5 +25,5 @@ function estimateMsgCount(range) { module.exports = { isEmptyRange, - estimateMsgCount + estimateMsgCount, } diff --git a/package.json b/package.json index d2da2fe..584351f 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,8 @@ "bs58": "^5.0.0", "c8": "7", "ppppp-db": "github:staltz/ppppp-db", + "prettier": "^2.6.2", + "pretty-quick": "^3.1.3", "rimraf": "^4.4.0", "secret-stack": "^6.4.1", "ssb-box": "^1.0.1", @@ -48,8 +50,8 @@ }, "scripts": { "test": "tape test/*.js | tap-arc --bail", - "format-code": "prettier --write \"*.js\" \"(test|compat|indexes|operators)/*.js\"", - "format-code-staged": "pretty-quick --staged --pattern \"*.js\" --pattern \"(test|compat|indexes|operators)/*.js\"", + "format-code": "prettier --write \"(lib|test)/**/*.js\"", + "format-code-staged": "pretty-quick --staged --pattern \"(lib|test)/**/*.js\"", "coverage": "c8 --reporter=lcov npm run test" }, "husky": { diff --git a/test/thread-sync.test.js b/test/thread-sync.test.js index beab1ee..6eb1c6e 100644 --- a/test/thread-sync.test.js +++ b/test/thread-sync.test.js @@ -337,7 +337,7 @@ test('sync a thread with reactions too', async (t) => { const reactionA3 = await p(alice.db.create)({ type: 'reaction', - content: {text: 'yes', link: replyA1.hash}, + content: { text: 'yes', link: replyA1.hash }, tangles: [rootA.hash, replyA1.hash], keys: aliceKeys, })