Skip to content

Commit fbf9390

Browse files
committed
fix(linting): no-unused-vars
1 parent ea26e3a commit fbf9390

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

lib/errors.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class GitError extends Error {
88
}
99

1010
class GitConnectionError extends GitError {
11-
constructor (message) {
11+
constructor () {
1212
super('A git connection error occurred')
1313
}
1414

@@ -18,13 +18,13 @@ class GitConnectionError extends GitError {
1818
}
1919

2020
class GitPathspecError extends GitError {
21-
constructor (message) {
21+
constructor () {
2222
super('The git reference could not be found')
2323
}
2424
}
2525

2626
class GitUnknownError extends GitError {
27-
constructor (message) {
27+
constructor () {
2828
super('An unknown git error occurred')
2929
}
3030
}

test/clone.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ let repoSha = ''
2828
let submodsRepoSha = ''
2929

3030
t.setTimeout(120000)
31-
t.test('create repo', { bail: true }, t => {
31+
t.test('create repo', { bail: true }, () => {
3232
const git = (...cmd) => spawnGit(cmd, { cwd: repo })
3333
const write = (f, c) => fs.writeFileSync(`${repo}/${f}`, c)
3434
return git('init', '-b', 'main')
@@ -100,7 +100,7 @@ t.test('spawn daemon', { bail: true }, t => {
100100
daemon.on('close', () => fs.rmSync(me, { recursive: true, force: true }))
101101
})
102102

103-
t.test('create a repo with a submodule', { bail: true }, t => {
103+
t.test('create a repo with a submodule', { bail: true }, () => {
104104
const submoduleRepo = resolve(me, 'submodule-repo')
105105
const git = (...cmd) => spawnGit(cmd, { cwd: submoduleRepo })
106106
const write = (f, c) => fs.writeFileSync(`${submoduleRepo}/${f}`, c)
@@ -226,7 +226,7 @@ const clonedRepo = join(me, clonedRepoDir)
226226
const clonedRepoSpaces = join(me, clonedSpacesRepoDir)
227227
const clonedRepoSpaces2 = join(me, clonedSpacesRepoDir2)
228228

229-
t.test('setup aditional tests', t => {
229+
t.test('setup aditional tests', () => {
230230
const git = (...cmd) => spawnGit(cmd, { cwd: regularRepo })
231231
const write = (f, c) => fs.writeFileSync(`${regularRepo}/${f}`, c)
232232
return git('init', '-b', 'main')

test/is-clean.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const { promisify } = require('util')
88
const writeFile = promisify(require('fs').writeFile)
99
const write = (file, data) => writeFile(resolve(repo, file), data)
1010

11-
t.test('create git repo', t =>
11+
t.test('create git repo', () =>
1212
spawn(['init'], { cwd: repo })
1313
.then(() => spawn(['config', 'user.name', 'pacotedev'], { cwd: repo }))
1414
.then(() => spawn(['config', 'user.email', 'i+pacotedev@izs.me'], { cwd: repo }))

test/revs.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const fixMainBranch = (err) => {
2525
return git('init')
2626
}
2727
const write = (f, c) => fs.writeFileSync(`${repo}/${f}`, c)
28-
t.test('setup', t =>
28+
t.test('setup', () =>
2929
git('init', '-b', mainBranch).catch(fixMainBranch)
3030
.then(() => git('config', 'user.name', 'pacotedev'))
3131
.then(() => git('config', 'user.email', 'i+pacotedev@izs.me'))
@@ -57,7 +57,7 @@ t.test('point latest at HEAD', t =>
5757
latest: '69.42.0',
5858
})))
5959

60-
t.test('add a latest branch, point to 1.2.3 version', t =>
60+
t.test('add a latest branch, point to 1.2.3 version', () =>
6161
git('checkout', '-b', 'latest')
6262
.then(() => git('reset', '--hard', 'version-1.2.3'))
6363
.then(() => git('checkout', mainBranch))

test/spawn.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ t.test('argument test for allowReplace', async t => {
2727
// for our purposes. This just tests that the argument is added
2828
// by default.
2929
const mockedSpawn = t.mock('../lib/spawn.js', {
30-
'@npmcli/promise-spawn': async (exe, args, opts) => args,
30+
'@npmcli/promise-spawn': async (exe, args) => args,
3131
})
3232
const [allow, deny, allowWithArg, denyWithArg] = await Promise.all([
3333
mockedSpawn(['a', 'b', 'c'], { allowReplace: true }),

0 commit comments

Comments
 (0)