Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Commit

Permalink
fix: linting passes again
Browse files Browse the repository at this point in the history
With the AEgir 17.1.1 release StandardJS 12 was introduced, which lead
to new linting rules. Those rules made the linting fail. This commit
fixes those issues and also upgrades AEgir to 17.1.1 explicitly.
  • Loading branch information
vmx committed Dec 10, 2018
1 parent 9a12316 commit 4fc3c6e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"homepage": "https://github.com/ipld/js-ipld#readme",
"license": "MIT",
"devDependencies": {
"aegir": "^17.0.0",
"aegir": "^17.1.1",
"bitcoinjs-lib": "^4.0.2",
"chai": "^4.2.0",
"dirty-chai": "^2.0.1",
Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class IPLDResolver {

// Enable all supplied formats
for (const format of options.formats) {
const {resolver, util} = format
const { resolver, util } = format
const multicodec = resolver.multicodec
this.support.add(multicodec, resolver, util)
}
Expand Down Expand Up @@ -294,7 +294,7 @@ class IPLDResolver {
if (err) {
return cb(err)
}
cb(null, {path: p, link: link})
cb(null, { path: p, link: link })
})
}, cb)
})
Expand Down Expand Up @@ -450,7 +450,7 @@ IPLDResolver.inMemory = function (callback) {
if (err) {
return callback(err)
}
callback(null, new IPLDResolver({blockService}))
callback(null, new IPLDResolver({ blockService }))
})
}

Expand Down
14 changes: 7 additions & 7 deletions test/basics.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = (repo) => {
describe('basics', () => {
it('creates an instance', () => {
const bs = new BlockService(repo)
const r = new IPLDResolver({blockService: bs})
const r = new IPLDResolver({ blockService: bs })
expect(r.bs).to.exist()
})

Expand All @@ -34,7 +34,7 @@ module.exports = (repo) => {
describe('validation', () => {
it('get - errors on unknown resolver', (done) => {
const bs = new BlockService(repo)
const r = new IPLDResolver({blockService: bs})
const r = new IPLDResolver({ blockService: bs })
// choosing a format that is not supported
const cid = new CID(1, 'base1', multihash.encode(Buffer.from('abcd', 'hex'), 'sha1'))
r.get(cid, '/', {}, (err, result) => {
Expand All @@ -46,7 +46,7 @@ module.exports = (repo) => {

it('_get - errors on unknown resolver', (done) => {
const bs = new BlockService(repo)
const r = new IPLDResolver({blockService: bs})
const r = new IPLDResolver({ blockService: bs })
// choosing a format that is not supported
const cid = new CID(1, 'base1', multihash.encode(Buffer.from('abcd', 'hex'), 'sha1'))
r.get(cid, (err, result) => {
Expand All @@ -58,7 +58,7 @@ module.exports = (repo) => {

it('put - errors on unknown resolver', (done) => {
const bs = new BlockService(repo)
const r = new IPLDResolver({blockService: bs})
const r = new IPLDResolver({ blockService: bs })
// choosing a format that is not supported
r.put(null, { format: 'base1' }, (err, result) => {
expect(err).to.exist()
Expand All @@ -69,7 +69,7 @@ module.exports = (repo) => {

it('put - errors if no options', (done) => {
const bs = new BlockService(repo)
const r = new IPLDResolver({blockService: bs})
const r = new IPLDResolver({ blockService: bs })
r.put(null, (err, result) => {
expect(err).to.exist()
expect(err.message).to.eql('IPLDResolver.put requires options')
Expand All @@ -79,7 +79,7 @@ module.exports = (repo) => {

it('_put - errors on unknown resolver', (done) => {
const bs = new BlockService(repo)
const r = new IPLDResolver({blockService: bs})
const r = new IPLDResolver({ blockService: bs })
// choosing a format that is not supported
const cid = new CID(1, 'base1', multihash.encode(Buffer.from('abcd', 'hex'), 'sha1'))
r._put(cid, null, (err, result) => {
Expand All @@ -91,7 +91,7 @@ module.exports = (repo) => {

it('treeStream - errors on unknown resolver', (done) => {
const bs = new BlockService(repo)
const r = new IPLDResolver({blockService: bs})
const r = new IPLDResolver({ blockService: bs })
// choosing a format that is not supported
const cid = new CID(1, 'base1', multihash.encode(Buffer.from('abcd', 'hex'), 'sha1'))
pull(
Expand Down
2 changes: 1 addition & 1 deletion test/ipld-dag-cbor.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = (repo) => {
before((done) => {
const bs = new BlockService(repo)

resolver = new IPLDResolver({blockService: bs})
resolver = new IPLDResolver({ blockService: bs })

series([
(cb) => {
Expand Down
2 changes: 1 addition & 1 deletion test/ipld-dag-pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = (repo) => {
before((done) => {
const bs = new BlockService(repo)

resolver = new IPLDResolver({blockService: bs})
resolver = new IPLDResolver({ blockService: bs })

series([
(cb) => {
Expand Down
10 changes: 5 additions & 5 deletions test/ipld-git.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module.exports = (repo) => {
(cb) => {
treeNode = {
somefile: {
hash: {'/': blobCid.buffer},
hash: { '/': blobCid.buffer },
mode: '100644'
}
}
Expand All @@ -65,7 +65,7 @@ module.exports = (repo) => {
(cb) => {
commitNode = {
gitType: 'commit',
tree: {'/': treeCid.buffer},
tree: { '/': treeCid.buffer },
parents: [],
author: {
name: 'John Doe',
Expand All @@ -89,9 +89,9 @@ module.exports = (repo) => {
(cb) => {
commit2Node = {
gitType: 'commit',
tree: {'/': treeCid.buffer},
tree: { '/': treeCid.buffer },
parents: [
{'/': commitCid.buffer}
{ '/': commitCid.buffer }
],
author: {
name: 'John Doe',
Expand All @@ -115,7 +115,7 @@ module.exports = (repo) => {
(cb) => {
tagNode = {
gitType: 'tag',
object: {'/': commit2Cid.buffer},
object: { '/': commit2Cid.buffer },
type: 'commit',
tag: 'v0.0.0',
tagger: {
Expand Down

0 comments on commit 4fc3c6e

Please sign in to comment.