1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-23 10:32:29 +03:00

reenabled @typescript-eslint/no-untyped-public-signature

This commit is contained in:
Eugene Pankov 2021-01-02 20:38:45 +01:00
parent 1b0402c2cf
commit 154cc29333
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
3 changed files with 10 additions and 6 deletions

View File

@ -100,7 +100,6 @@ rules:
'@typescript-eslint/no-unnecessary-condition':
- error
- allowConstantLoopConditions: true
'@typescript-eslint/no-untyped-public-signature': off # bugs out on constructors
'@typescript-eslint/restrict-template-expressions': off
'@typescript-eslint/prefer-readonly-parameter-types': off
'@typescript-eslint/no-unsafe-member-access': off

View File

@ -212,7 +212,8 @@ export class SSHSession extends BaseSession {
}
const socket = new Socket()
socket.connect(forward.targetPort, forward.targetAddress)
socket.on('error', (e: Error) => {
socket.on('error', e => {
// eslint-disable-next-line @typescript-eslint/no-base-to-string
this.emitServiceMessage(colors.bgRed.black(' X ') + ` Could not forward the remote connection to ${forward.targetAddress}:${forward.targetPort}: ${e}`)
reject()
})
@ -242,7 +243,8 @@ export class SSHSession extends BaseSession {
if (!displaySpec.startsWith('/')) {
socket.connect(xPort, xHost)
}
socket.on('error', (e: Error) => {
socket.on('error', e => {
// eslint-disable-next-line @typescript-eslint/no-base-to-string
this.emitServiceMessage(colors.bgRed.black(' X ') + ` Could not connect to the X server ${xHost}:${xPort}: ${e}`)
reject()
})
@ -277,8 +279,9 @@ export class SSHSession extends BaseSession {
sourcePort ?? 0,
targetAddress,
targetPort,
(err: Error, stream) => {
(err, stream) => {
if (err) {
// eslint-disable-next-line @typescript-eslint/no-base-to-string
this.emitServiceMessage(colors.bgRed.black(' X ') + ` Remote has rejected the forwarded connection to ${targetAddress}:${targetPort} via ${fw}: ${err}`)
return reject()
}
@ -303,8 +306,9 @@ export class SSHSession extends BaseSession {
}
if (fw.type === PortForwardType.Remote) {
await new Promise((resolve, reject) => {
this.ssh.forwardIn(fw.host, fw.port, (err: Error) => {
this.ssh.forwardIn(fw.host, fw.port, err => {
if (err) {
// eslint-disable-next-line @typescript-eslint/no-base-to-string
this.emitServiceMessage(colors.bgRed.black(' X ') + ` Remote rejected port forwarding for ${fw}: ${err}`)
return reject(err)
}

View File

@ -155,12 +155,13 @@ export class SSHService {
}
this.zone.run(resolve)
})
ssh.on('error', (error: Error) => {
ssh.on('error', error => {
if (error.message === 'All configured authentication methods failed') {
this.passwordStorage.deletePassword(session.connection)
}
this.zone.run(() => {
if (connected) {
// eslint-disable-next-line @typescript-eslint/no-base-to-string
this.toastr.error(error.toString())
} else {
reject(error)