From d32fd5d344427bbb43208e87eaffc7ab1741af25 Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Thu, 5 Jul 2018 20:19:46 +0100 Subject: [PATCH] chore: re-enable linting When the JS code was moved into the js/ directory the aegir linting task was no longer considering them for linting. This is because the default globs do not include this path. This PR adds custom lint globs to the aegir config and fixes linting errors. depends on ipfs/aegir#240 License: MIT Signed-off-by: Alan Shaw --- .aegir.js | 10 ++++++++++ js/src/bitswap/unwant.js | 1 + js/src/bitswap/wantlist.js | 1 + js/src/key/list.js | 1 + js/src/key/rename.js | 1 + js/src/key/rm.js | 1 + js/src/pubsub/subscribe.js | 1 + js/src/utils/swarm.js | 2 ++ package.json | 2 +- 9 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .aegir.js diff --git a/.aegir.js b/.aegir.js new file mode 100644 index 000000000..bd405fb60 --- /dev/null +++ b/.aegir.js @@ -0,0 +1,10 @@ +'use strict' + +module.exports = { + lint: { + files: [ + 'js/src/**/*.js', + 'js/test/**/*.js' + ] + } +} diff --git a/js/src/bitswap/unwant.js b/js/src/bitswap/unwant.js index 41157dafa..ad74e42b5 100644 --- a/js/src/bitswap/unwant.js +++ b/js/src/bitswap/unwant.js @@ -1,4 +1,5 @@ /* eslint-env mocha */ +/* eslint max-nested-callbacks: ["error", 6] */ 'use strict' const waterfall = require('async/waterfall') diff --git a/js/src/bitswap/wantlist.js b/js/src/bitswap/wantlist.js index da16804f2..cdc11c570 100644 --- a/js/src/bitswap/wantlist.js +++ b/js/src/bitswap/wantlist.js @@ -1,4 +1,5 @@ /* eslint-env mocha */ +/* eslint max-nested-callbacks: ["error", 6] */ 'use strict' const waterfall = require('async/waterfall') diff --git a/js/src/key/list.js b/js/src/key/list.js index ff39b4ccf..ad5b935cd 100644 --- a/js/src/key/list.js +++ b/js/src/key/list.js @@ -1,4 +1,5 @@ /* eslint-env mocha */ +/* eslint max-nested-callbacks: ["error", 6] */ 'use strict' const timesSeries = require('async/timesSeries') diff --git a/js/src/key/rename.js b/js/src/key/rename.js index f1f98c2d8..ff3b5b16d 100644 --- a/js/src/key/rename.js +++ b/js/src/key/rename.js @@ -1,4 +1,5 @@ /* eslint-env mocha */ +/* eslint max-nested-callbacks: ["error", 6] */ 'use strict' const chai = require('chai') diff --git a/js/src/key/rm.js b/js/src/key/rm.js index 502959687..87ce3e93b 100644 --- a/js/src/key/rm.js +++ b/js/src/key/rm.js @@ -1,4 +1,5 @@ /* eslint-env mocha */ +/* eslint max-nested-callbacks: ["error", 6] */ 'use strict' const hat = require('hat') diff --git a/js/src/pubsub/subscribe.js b/js/src/pubsub/subscribe.js index 70e695af5..d8c63589f 100644 --- a/js/src/pubsub/subscribe.js +++ b/js/src/pubsub/subscribe.js @@ -1,4 +1,5 @@ /* eslint-env mocha */ +/* eslint max-nested-callbacks: ["error", 6] */ 'use strict' const series = require('async/series') diff --git a/js/src/utils/swarm.js b/js/src/utils/swarm.js index 368151b49..b36dc7df8 100644 --- a/js/src/utils/swarm.js +++ b/js/src/utils/swarm.js @@ -1,3 +1,5 @@ +'use strict' + const eachSeries = require('async/eachSeries') function connect (fromNode, toAddrs, cb) { diff --git a/package.json b/package.json index 7a8101e25..1e4d19b51 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ }, "homepage": "https://github.com/ipfs/interface-ipfs-core#readme", "dependencies": { - "aegir": "^14.0.0", + "aegir": "^15.0.0", "async": "^2.6.1", "big.js": "^5.1.2", "bl": "^2.0.1",