Skip to content

Commit e580138

Browse files
committed
fix: resolve ESLint getter-return conflict in _useSSH
Use ternary expression with explicit return to satisfy getter-return rule while avoiding no-useless-return. Added explicit return type annotation for clarity.
1 parent cb0d1bb commit e580138

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

src/lib/run/dyno.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,10 @@ export default class Dyno extends Duplex {
7070
}
7171
}
7272

73-
get _useSSH() {
74-
if (this.uri) {
75-
/* tslint:disable:no-http-string */
76-
return this.uri.protocol === 'http:' || this.uri.protocol === 'https:'
77-
/* tslint:enable:no-http-string */
78-
}
79-
80-
return undefined
73+
get _useSSH(): boolean | undefined {
74+
return this.uri
75+
? (this.uri.protocol === 'http:' || this.uri.protocol === 'https:')
76+
: undefined
8177
}
8278

8379
_connect() {

0 commit comments

Comments
 (0)