Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
chore: re-enable linting (#324)
Browse files Browse the repository at this point in the history
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 <alan@tableflip.io>
  • Loading branch information
alanshaw authored Jul 5, 2018
1 parent 91a1b5e commit 87a8f96
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .aegir.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict'

module.exports = {
lint: {
files: [
'js/src/**/*.js',
'js/test/**/*.js'
]
}
}
1 change: 1 addition & 0 deletions js/src/bitswap/unwant.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-env mocha */
/* eslint max-nested-callbacks: ["error", 6] */
'use strict'

const waterfall = require('async/waterfall')
Expand Down
1 change: 1 addition & 0 deletions js/src/bitswap/wantlist.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-env mocha */
/* eslint max-nested-callbacks: ["error", 6] */
'use strict'

const waterfall = require('async/waterfall')
Expand Down
1 change: 1 addition & 0 deletions js/src/key/list.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-env mocha */
/* eslint max-nested-callbacks: ["error", 6] */
'use strict'

const timesSeries = require('async/timesSeries')
Expand Down
1 change: 1 addition & 0 deletions js/src/key/rename.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-env mocha */
/* eslint max-nested-callbacks: ["error", 6] */
'use strict'

const chai = require('chai')
Expand Down
1 change: 1 addition & 0 deletions js/src/key/rm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-env mocha */
/* eslint max-nested-callbacks: ["error", 6] */
'use strict'

const hat = require('hat')
Expand Down
1 change: 1 addition & 0 deletions js/src/pubsub/subscribe.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-env mocha */
/* eslint max-nested-callbacks: ["error", 6] */
'use strict'

const series = require('async/series')
Expand Down
2 changes: 2 additions & 0 deletions js/src/utils/swarm.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const eachSeries = require('async/eachSeries')

function connect (fromNode, toAddrs, cb) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 87a8f96

Please sign in to comment.