Skip to content

Commit

Permalink
fix(linting): no-unused-vars
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed May 4, 2024
1 parent ea26e3a commit fbf9390
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions lib/errors.js
Expand Up @@ -8,7 +8,7 @@ class GitError extends Error {
}

class GitConnectionError extends GitError {
constructor (message) {
constructor () {
super('A git connection error occurred')
}

Expand All @@ -18,13 +18,13 @@ class GitConnectionError extends GitError {
}

class GitPathspecError extends GitError {
constructor (message) {
constructor () {
super('The git reference could not be found')
}
}

class GitUnknownError extends GitError {
constructor (message) {
constructor () {
super('An unknown git error occurred')
}
}
Expand Down
6 changes: 3 additions & 3 deletions test/clone.js
Expand Up @@ -28,7 +28,7 @@ let repoSha = ''
let submodsRepoSha = ''

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

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

t.test('setup aditional tests', t => {
t.test('setup aditional tests', () => {
const git = (...cmd) => spawnGit(cmd, { cwd: regularRepo })
const write = (f, c) => fs.writeFileSync(`${regularRepo}/${f}`, c)
return git('init', '-b', 'main')
Expand Down
2 changes: 1 addition & 1 deletion test/is-clean.js
Expand Up @@ -8,7 +8,7 @@ const { promisify } = require('util')
const writeFile = promisify(require('fs').writeFile)
const write = (file, data) => writeFile(resolve(repo, file), data)

t.test('create git repo', t =>
t.test('create git repo', () =>
spawn(['init'], { cwd: repo })
.then(() => spawn(['config', 'user.name', 'pacotedev'], { cwd: repo }))
.then(() => spawn(['config', 'user.email', '[email protected]'], { cwd: repo }))
Expand Down
4 changes: 2 additions & 2 deletions test/revs.js
Expand Up @@ -25,7 +25,7 @@ const fixMainBranch = (err) => {
return git('init')
}
const write = (f, c) => fs.writeFileSync(`${repo}/${f}`, c)
t.test('setup', t =>
t.test('setup', () =>
git('init', '-b', mainBranch).catch(fixMainBranch)
.then(() => git('config', 'user.name', 'pacotedev'))
.then(() => git('config', 'user.email', '[email protected]'))
Expand Down Expand Up @@ -57,7 +57,7 @@ t.test('point latest at HEAD', t =>
latest: '69.42.0',
})))

t.test('add a latest branch, point to 1.2.3 version', t =>
t.test('add a latest branch, point to 1.2.3 version', () =>
git('checkout', '-b', 'latest')
.then(() => git('reset', '--hard', 'version-1.2.3'))
.then(() => git('checkout', mainBranch))
Expand Down
2 changes: 1 addition & 1 deletion test/spawn.js
Expand Up @@ -27,7 +27,7 @@ t.test('argument test for allowReplace', async t => {
// for our purposes. This just tests that the argument is added
// by default.
const mockedSpawn = t.mock('../lib/spawn.js', {
'@npmcli/promise-spawn': async (exe, args, opts) => args,
'@npmcli/promise-spawn': async (exe, args) => args,
})
const [allow, deny, allowWithArg, denyWithArg] = await Promise.all([
mockedSpawn(['a', 'b', 'c'], { allowReplace: true }),
Expand Down

0 comments on commit fbf9390

Please sign in to comment.