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

reenabled @typescript-eslint/no-shadow

This commit is contained in:
Eugene Pankov 2021-01-02 20:53:34 +01:00
parent e36bad2553
commit e6bf76c616
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
8 changed files with 16 additions and 16 deletions

View File

@ -113,4 +113,3 @@ rules:
'@typescript-eslint/no-implicit-any-catch': off
'@typescript-eslint/member-ordering': off
'@typescript-eslint/no-var-requires': off
'@typescript-eslint/no-shadow': off

View File

@ -58,8 +58,8 @@ findPlugins().then(async plugins => {
window['safeModeReason'] = error
try {
await bootstrap(plugins, true)
} catch (error) {
console.error('Bootstrap failed:', error)
} catch (error2) {
console.error('Bootstrap failed:', error2)
}
}
})

View File

@ -3,13 +3,13 @@ import * as path from 'path'
const nodeModule = require('module') // eslint-disable-line @typescript-eslint/no-var-requires
const nodeRequire = (global as any).require
function normalizePath (path: string): string {
function normalizePath (p: string): string {
const cygwinPrefix = '/cygdrive/'
if (path.startsWith(cygwinPrefix)) {
path = path.substring(cygwinPrefix.length).replace('/', '\\')
path = path[0] + ':' + path.substring(1)
if (p.startsWith(cygwinPrefix)) {
p = p.substring(cygwinPrefix.length).replace('/', '\\')
p = p[0] + ':' + p.substring(1)
}
return path
return p
}
global['module'].paths.map((x: string) => nodeModule.globalPaths.push(normalizePath(x)))

View File

@ -520,7 +520,7 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit
private layoutInternal (root: SplitContainer, x: number, y: number, w: number, h: number) {
const size = root.orientation === 'v' ? h : w
const sizes = root.ratios.map(x => x * size)
const sizes = root.ratios.map(ratio => ratio * size)
root.x = x
root.y = y

View File

@ -34,8 +34,8 @@ export class SplitTabSpannerComponent {
let current = start
const oldPosition: number = this.isVertical ? this.element.nativeElement.offsetTop : this.element.nativeElement.offsetLeft
const dragHandler = (e: MouseEvent) => {
current = this.isVertical ? e.pageY : e.pageX
const dragHandler = (dragEvent: MouseEvent) => {
current = this.isVertical ? dragEvent.pageY : dragEvent.pageX
const newPosition = oldPosition + (current - start)
if (this.isVertical) {
this.element.nativeElement.style.top = `${newPosition - this.marginOffset}px`

View File

@ -76,10 +76,10 @@ export class ForwardedPort {
})
} else if (this.type === PortForwardType.Dynamic) {
return new Promise((resolve, reject) => {
this.listener = socksv5.createServer((info, accept, reject) => {
this.listener = socksv5.createServer((info, acceptConnection, rejectConnection) => {
callback(
() => accept(true),
() => reject(),
() => acceptConnection(true),
() => rejectConnection(),
null,
null,
info.dstAddr,

View File

@ -99,8 +99,8 @@ export class EditConnectionModalComponent {
save () {
for (const k of Object.values(SSHAlgorithmType)) {
this.connection.algorithms![k] = Object.entries(this.algorithms[k])
.filter(([_k, v]) => !!v)
.map(([k, _v]) => k)
.filter(([_, v]) => !!v)
.map(([key, _]) => key)
}
this.modalInstance.close(this.connection)
}

View File

@ -210,6 +210,7 @@ export class SSHService {
if (await fs.exists(WINDOWS_OPENSSH_AGENT_PIPE)) {
agent = WINDOWS_OPENSSH_AGENT_PIPE
} else {
// eslint-disable-next-line @typescript-eslint/no-shadow
const pageantRunning = await new Promise<boolean>(resolve => {
windowsProcessTreeNative.getProcessList(list => { // eslint-disable-line block-scoped-var
resolve(list.some(x => x.name === 'pageant.exe'))