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

Commit 42ae46e

Browse files
committed
chore: fix linting
1 parent 6aa245f commit 42ae46e

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/core/utils/traverse-to.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ const traverseToMfsObject = (ipfs, path, options, callback) => {
7474
parent: null
7575
})
7676

77-
reduce(pathSegments.map((pathSegment, index) => ({pathSegment, index})), {
77+
reduce(pathSegments.map((pathSegment, index) => ({ pathSegment, index })), {
7878
name: FILE_SEPARATOR,
7979
node: rootNode,
8080
parent: null
81-
}, (parent, {pathSegment, index}, done) => {
81+
}, (parent, { pathSegment, index }, done) => {
8282
const existingLink = parent.node.links.find(link => link.name === pathSegment)
8383

8484
if (!existingLink) {

test/write.spec.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ describe('write', function () {
262262
})
263263
})
264264

265-
runTest(({type, path, content}) => {
265+
runTest(({ type, path, content }) => {
266266
it(`limits how many bytes to write to a file (${type})`, () => {
267267
return mfs.write(path, content, {
268268
create: true,
@@ -276,7 +276,7 @@ describe('write', function () {
276276
})
277277
})
278278

279-
runTest(({type, path, content, contentSize}) => {
279+
runTest(({ type, path, content, contentSize }) => {
280280
it(`overwrites start of a file without truncating (${type})`, () => {
281281
const newContent = Buffer.from('Goodbye world')
282282

@@ -294,7 +294,7 @@ describe('write', function () {
294294
})
295295
})
296296

297-
runTest(({type, path, content, contentSize}) => {
297+
runTest(({ type, path, content, contentSize }) => {
298298
it(`pads the start of a new file when an offset is specified (${type})`, () => {
299299
const offset = 10
300300

@@ -316,7 +316,7 @@ describe('write', function () {
316316
})
317317
})
318318

319-
runTest(({type, path, content, contentSize}) => {
319+
runTest(({ type, path, content, contentSize }) => {
320320
it(`expands a file when an offset is specified (${type})`, () => {
321321
const offset = contentSize - 1
322322
const newContent = Buffer.from('Oh hai!')
@@ -336,7 +336,7 @@ describe('write', function () {
336336
})
337337
})
338338

339-
runTest(({type, path, content, contentSize}) => {
339+
runTest(({ type, path, content, contentSize }) => {
340340
it(`expands a file when an offset is specified and the offset is longer than the file (${type})`, () => {
341341
const offset = contentSize + 5
342342
const newContent = Buffer.from('Oh hai!')
@@ -358,7 +358,7 @@ describe('write', function () {
358358
})
359359
})
360360

361-
runTest(({type, path, content}) => {
361+
runTest(({ type, path, content }) => {
362362
it(`truncates a file after writing (${type})`, () => {
363363
const newContent = Buffer.from('Oh hai!')
364364

@@ -375,7 +375,7 @@ describe('write', function () {
375375
})
376376
})
377377

378-
runTest(({type, path, content}) => {
378+
runTest(({ type, path, content }) => {
379379
it(`truncates a file after writing with a stream (${type})`, () => {
380380
const newContent = Buffer.from('Oh hai!')
381381
const stream = values([newContent])
@@ -393,7 +393,7 @@ describe('write', function () {
393393
})
394394
})
395395

396-
runTest(({type, path, content}) => {
396+
runTest(({ type, path, content }) => {
397397
it(`truncates a file after writing with a stream with an offset (${type})`, () => {
398398
const offset = 100
399399
const newContent = Buffer.from('Oh hai!')
@@ -411,7 +411,7 @@ describe('write', function () {
411411
})
412412
})
413413

414-
runTest(({type, path, content}) => {
414+
runTest(({ type, path, content }) => {
415415
it(`writes a file with raw blocks for newly created leaf nodes (${type})`, () => {
416416
return mfs.write(path, content, {
417417
create: true,
@@ -439,7 +439,7 @@ describe('write', function () {
439439
}
440440

441441
return Promise.all(
442-
files.map(({name, source}) => mfs.write(`/concurrent/${name}`, source, {
442+
files.map(({ name, source }) => mfs.write(`/concurrent/${name}`, source, {
443443
create: true,
444444
parents: true
445445
}))

0 commit comments

Comments
 (0)