Skip to content

Commit 473cb41

Browse files
committed
fix linting
1 parent 4fdf6ea commit 473cb41

File tree

5 files changed

+26
-20
lines changed

5 files changed

+26
-20
lines changed

packages/cli/src/commands/ci/debug.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export default class Debug extends Command {
4040
const kolkrabbi = new KolkrabbiAPI(this.config.userAgent, () => this.heroku.auth)
4141

4242
const pipelineRepository = await kolkrabbi.getPipelineRepository(pipeline.id)
43-
const organization = pipelineRepository.organization &&
44-
pipelineRepository.organization.name
43+
const organization = pipelineRepository.organization
44+
&& pipelineRepository.organization.name
4545

4646
const git = new Git()
4747
const commit = await git.readCommit('HEAD')

packages/cli/src/commands/ci/migrate-manifest.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import {ux} from '@oclif/core'
33
import {color} from '@heroku-cli/color'
44
import {promises as fs} from 'node:fs'
55

6-
const writeFile = fs.writeFile
7-
const unlinkFile = fs.unlink
8-
const readFile = fs.readFile
6+
const {writeFile, unlink} = fs
7+
const unlinkFile = unlink
8+
const {readFile} = fs
99

1010
export default class CiMigrateManifest extends Command {
1111
static description = 'app-ci.json is deprecated. Run this command to migrate to app.json with an environments key.'

packages/cli/test/unit/commands/ci/migrate-manifest.unit.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {expect, test} from '@oclif/test'
2-
import * as fs from 'async-file'
2+
import {promises as fs} from 'node:fs'
33
const {readFile, writeFile, unlink} = fs
44
const unlinkFile = unlink
55

packages/cli/test/unit/commands/ci/rerun.unit.test.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,34 +46,37 @@ describe('ci:rerun', function () {
4646
createArchive: () => Promise.resolve('new-archive.tgz'),
4747
spawn: () => Promise.resolve(),
4848
urlExists: () => Promise.resolve(),
49-
exec: (args: any) => {
49+
exec(args: any) {
5050
switch (args.join(' ')) {
51-
case 'remote':
51+
case 'remote': {
5252
return Promise.resolve('heroku')
53-
default:
53+
}
54+
55+
default: {
5456
return Promise.resolve()
5557
}
58+
}
5659
},
5760
}
5861

5962
const fsFake = {
6063
stat: () => Promise.resolve({size: 500}),
6164
createReadStream: () => ({
62-
pipe: (dest: any) => {
65+
pipe(dest: any) {
6366
// Simulate a readable stream that properly pipes to destination
6467
if (dest && typeof dest.once === 'function') {
6568
dest.once('response', () => {})
6669
}
6770

6871
return dest
6972
},
70-
once: () => {},
71-
on: () => {},
73+
once() {},
74+
on() {},
7275
}),
7376
}
7477

7578
const gotFake = {
76-
stream: {put: () => {
79+
stream: {put() {
7780
const stream = new PassThrough()
7881
// Simulate HTTP response by emitting 'response' event
7982
setImmediate(() => {

packages/cli/test/unit/commands/ci/run.unit.test.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,34 +38,37 @@ describe('ci:run', function () {
3838
createArchive: () => Promise.resolve('new-archive.tgz'),
3939
spawn: () => Promise.resolve(),
4040
urlExists: () => Promise.resolve(),
41-
exec: (args: any) => {
41+
exec(args: any) {
4242
switch (args.join(' ')) {
43-
case 'remote':
43+
case 'remote': {
4444
return Promise.resolve('heroku')
45-
default:
45+
}
46+
47+
default: {
4648
return Promise.resolve()
4749
}
50+
}
4851
},
4952
}
5053

5154
const fsFake = {
5255
stat: () => Promise.resolve({size: 500}),
5356
createReadStream: () => ({
54-
pipe: (dest: any) => {
57+
pipe(dest: any) {
5558
// Simulate a readable stream that properly pipes to destination
5659
if (dest && typeof dest.once === 'function') {
5760
dest.once('response', () => {})
5861
}
5962

6063
return dest
6164
},
62-
once: () => {},
63-
on: () => {},
65+
once() {},
66+
on() {},
6467
}),
6568
}
6669

6770
const gotFake = {
68-
stream: {put: () => {
71+
stream: {put() {
6972
const stream = new PassThrough()
7073
// Simulate HTTP response by emitting 'response' event
7174
setImmediate(() => {

0 commit comments

Comments
 (0)