Skip to content

Commit 095786d

Browse files
committed
fix(linting): no-unused-vars
1 parent dc0202d commit 095786d

5 files changed

Lines changed: 11 additions & 10 deletions

File tree

lib/bin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env node
2+
/* eslint-disable no-console */
23

34
const run = conf => {
45
const pacote = require('../')

lib/git.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class GitFetcher extends Fetcher {
156156
[_resolvedFromClone] () {
157157
// do a full or shallow clone, then look at the HEAD
158158
// kind of wasteful, but no other option, really
159-
return this[_clone](dir => this.resolved)
159+
return this[_clone](() => this.resolved)
160160
}
161161

162162
[_prepareDir] (dir) {

test/bin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pacote.manifest = (spec, conf) => Promise.resolve({
2323
pacote.packument = (spec, conf) => Promise.resolve({ method: 'packument', spec, conf })
2424
pacote.tarball.file = (spec, file, conf) => Promise.resolve({ method: 'tarball', spec, file, conf })
2525
const { Minipass } = require('minipass')
26-
pacote.tarball.stream = (spec, handler, conf) => handler(new Minipass().end('tarball data'))
26+
pacote.tarball.stream = (spec, handler) => handler(new Minipass().end('tarball data'))
2727
pacote.extract = (spec, dest, conf) => Promise.resolve({ method: 'extract', spec, dest, conf })
2828

2929
t.test('running bin runs main file', t => {

test/fetcher.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ t.test('tarball data', async t => {
9494

9595
t.test('tarballFile', t => {
9696
const target = resolve(me, 'tarball-file')
97-
t.test('basic copy', t =>
97+
t.test('basic copy', () =>
9898
new FileFetcher(abbrevspec, { cache })
9999
.tarballFile(target + '/basic/1.tgz'))
100100

101-
t.test('again, folder already created', t =>
101+
t.test('again, folder already created', () =>
102102
new FileFetcher(abbrevspec, { cache })
103103
.tarballFile(target + '/basic/2.tgz'))
104104

test/git.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const tar = require('tar')
8787

8888
let REPO_HEAD = ''
8989
t.test('setup', { bail: true }, t => {
90-
t.test('create repo', t => {
90+
t.test('create repo', () => {
9191
const git = (...cmd) => spawnGit(cmd, { cwd: repo })
9292
const write = (f, c) => fs.writeFileSync(`${repo}/${f}`, c)
9393
const npm = (...cmd) => spawnNpm('npm', [
@@ -162,7 +162,7 @@ t.test('setup', { bail: true }, t => {
162162
.then(({ stdout }) => REPO_HEAD = stdout.trim())
163163
})
164164

165-
t.test('create cycle of git prepared deps', async t => {
165+
t.test('create cycle of git prepared deps', async () => {
166166
for (const repoDir of [cycleA, cycleB]) {
167167
const git = (...cmd) => spawnGit(cmd, { cwd: repoDir })
168168
const write = (f, c) => fs.writeFileSync(`${repoDir}/${f}`, c)
@@ -227,7 +227,7 @@ t.test('setup', { bail: true }, t => {
227227
daemon.on('close', () => rmSync(me, { recursive: true, force: true }))
228228
})
229229

230-
t.test('create a repo with a submodule', t => {
230+
t.test('create a repo with a submodule', () => {
231231
const submoduleRepo = resolve(me, 'submodule-repo')
232232
const git = (...cmd) => spawnGit(cmd, { cwd: submoduleRepo })
233233
const write = (f, c) => fs.writeFileSync(`${submoduleRepo}/${f}`, c)
@@ -285,7 +285,7 @@ t.test('setup', { bail: true }, t => {
285285
.then(() => git('commit', '-m', 'package'))
286286
})
287287

288-
t.test('create a repo with workspaces', t => {
288+
t.test('create a repo with workspaces', () => {
289289
const workspacesRepo = resolve(me, 'workspaces-repo')
290290
const wsfolder = resolve(me, 'workspaces-repo/a')
291291
const git = (...cmd) => spawnGit(cmd, { cwd: workspacesRepo })
@@ -315,7 +315,7 @@ t.test('setup', { bail: true }, t => {
315315
.then(() => git('commit', '-m', 'a/package.json'))
316316
})
317317

318-
t.test('create a repo with only a prepack script', t => {
318+
t.test('create a repo with only a prepack script', () => {
319319
const prepackRepo = resolve(me, 'prepack-repo')
320320
const git = (...cmd) => spawnGit(cmd, { cwd: prepackRepo })
321321
const write = (f, c) => fs.writeFileSync(`${prepackRepo}/${f}`, c)
@@ -608,7 +608,7 @@ t.test('fetch a weird ref', t => {
608608
t.end()
609609
})
610610

611-
t.test('fetch a private repo where the tgz is a 404', t => {
611+
t.test('fetch a private repo where the tgz is a 404', () => {
612612
const gf = new GitFetcher(`localhost:repo/x#${REPO_HEAD}`, opts)
613613
gf.spec.hosted.tarball = () => `${hostedUrl}/not-found.tgz`
614614
// should fetch it by falling back to ssh when it gets an http error

0 commit comments

Comments
 (0)