From a7cdcf5007a62acfa02d7f7a756c532f66bfb9d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Wed, 10 Oct 2018 21:17:54 +0200 Subject: [PATCH] style: prefer const over let Prefer const over let when the binding is static, in order to comply with an upcoming Standard rule. --- src/config.js | 2 +- test/node.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.js b/src/config.js index 26367438..15f00ec3 100644 --- a/src/config.js +++ b/src/config.js @@ -41,7 +41,7 @@ module.exports = (store) => { if (key !== undefined && !_has(config, key)) { return callback(new Error('Key ' + key + ' does not exist in config')) } - let value = key !== undefined ? _get(config, key) : config + const value = key !== undefined ? _get(config, key) : config callback(null, value) }) }, diff --git a/test/node.js b/test/node.js index b560fdab..62451c1d 100644 --- a/test/node.js +++ b/test/node.js @@ -22,7 +22,7 @@ describe('IPFS Repo Tests onNode.js', () => { return callback(new Error('already locked')) } - let lockPath = path.join(dir, customLock.lockName) + const lockPath = path.join(dir, customLock.lockName) fs.writeFileSync(lockPath, '') callback(null, {