mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-19 19:09:54 +00:00
reenabled @typescript-eslint/no-shadow
This commit is contained in:
parent
e36bad2553
commit
e6bf76c616
@ -113,4 +113,3 @@ rules:
|
|||||||
'@typescript-eslint/no-implicit-any-catch': off
|
'@typescript-eslint/no-implicit-any-catch': off
|
||||||
'@typescript-eslint/member-ordering': off
|
'@typescript-eslint/member-ordering': off
|
||||||
'@typescript-eslint/no-var-requires': off
|
'@typescript-eslint/no-var-requires': off
|
||||||
'@typescript-eslint/no-shadow': off
|
|
||||||
|
@ -58,8 +58,8 @@ findPlugins().then(async plugins => {
|
|||||||
window['safeModeReason'] = error
|
window['safeModeReason'] = error
|
||||||
try {
|
try {
|
||||||
await bootstrap(plugins, true)
|
await bootstrap(plugins, true)
|
||||||
} catch (error) {
|
} catch (error2) {
|
||||||
console.error('Bootstrap failed:', error)
|
console.error('Bootstrap failed:', error2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -3,13 +3,13 @@ import * as path from 'path'
|
|||||||
const nodeModule = require('module') // eslint-disable-line @typescript-eslint/no-var-requires
|
const nodeModule = require('module') // eslint-disable-line @typescript-eslint/no-var-requires
|
||||||
const nodeRequire = (global as any).require
|
const nodeRequire = (global as any).require
|
||||||
|
|
||||||
function normalizePath (path: string): string {
|
function normalizePath (p: string): string {
|
||||||
const cygwinPrefix = '/cygdrive/'
|
const cygwinPrefix = '/cygdrive/'
|
||||||
if (path.startsWith(cygwinPrefix)) {
|
if (p.startsWith(cygwinPrefix)) {
|
||||||
path = path.substring(cygwinPrefix.length).replace('/', '\\')
|
p = p.substring(cygwinPrefix.length).replace('/', '\\')
|
||||||
path = path[0] + ':' + path.substring(1)
|
p = p[0] + ':' + p.substring(1)
|
||||||
}
|
}
|
||||||
return path
|
return p
|
||||||
}
|
}
|
||||||
|
|
||||||
global['module'].paths.map((x: string) => nodeModule.globalPaths.push(normalizePath(x)))
|
global['module'].paths.map((x: string) => nodeModule.globalPaths.push(normalizePath(x)))
|
||||||
|
@ -520,7 +520,7 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit
|
|||||||
|
|
||||||
private layoutInternal (root: SplitContainer, x: number, y: number, w: number, h: number) {
|
private layoutInternal (root: SplitContainer, x: number, y: number, w: number, h: number) {
|
||||||
const size = root.orientation === 'v' ? h : w
|
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.x = x
|
||||||
root.y = y
|
root.y = y
|
||||||
|
@ -34,8 +34,8 @@ export class SplitTabSpannerComponent {
|
|||||||
let current = start
|
let current = start
|
||||||
const oldPosition: number = this.isVertical ? this.element.nativeElement.offsetTop : this.element.nativeElement.offsetLeft
|
const oldPosition: number = this.isVertical ? this.element.nativeElement.offsetTop : this.element.nativeElement.offsetLeft
|
||||||
|
|
||||||
const dragHandler = (e: MouseEvent) => {
|
const dragHandler = (dragEvent: MouseEvent) => {
|
||||||
current = this.isVertical ? e.pageY : e.pageX
|
current = this.isVertical ? dragEvent.pageY : dragEvent.pageX
|
||||||
const newPosition = oldPosition + (current - start)
|
const newPosition = oldPosition + (current - start)
|
||||||
if (this.isVertical) {
|
if (this.isVertical) {
|
||||||
this.element.nativeElement.style.top = `${newPosition - this.marginOffset}px`
|
this.element.nativeElement.style.top = `${newPosition - this.marginOffset}px`
|
||||||
|
@ -76,10 +76,10 @@ export class ForwardedPort {
|
|||||||
})
|
})
|
||||||
} else if (this.type === PortForwardType.Dynamic) {
|
} else if (this.type === PortForwardType.Dynamic) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.listener = socksv5.createServer((info, accept, reject) => {
|
this.listener = socksv5.createServer((info, acceptConnection, rejectConnection) => {
|
||||||
callback(
|
callback(
|
||||||
() => accept(true),
|
() => acceptConnection(true),
|
||||||
() => reject(),
|
() => rejectConnection(),
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
info.dstAddr,
|
info.dstAddr,
|
||||||
|
@ -99,8 +99,8 @@ export class EditConnectionModalComponent {
|
|||||||
save () {
|
save () {
|
||||||
for (const k of Object.values(SSHAlgorithmType)) {
|
for (const k of Object.values(SSHAlgorithmType)) {
|
||||||
this.connection.algorithms![k] = Object.entries(this.algorithms[k])
|
this.connection.algorithms![k] = Object.entries(this.algorithms[k])
|
||||||
.filter(([_k, v]) => !!v)
|
.filter(([_, v]) => !!v)
|
||||||
.map(([k, _v]) => k)
|
.map(([key, _]) => key)
|
||||||
}
|
}
|
||||||
this.modalInstance.close(this.connection)
|
this.modalInstance.close(this.connection)
|
||||||
}
|
}
|
||||||
|
@ -210,6 +210,7 @@ export class SSHService {
|
|||||||
if (await fs.exists(WINDOWS_OPENSSH_AGENT_PIPE)) {
|
if (await fs.exists(WINDOWS_OPENSSH_AGENT_PIPE)) {
|
||||||
agent = WINDOWS_OPENSSH_AGENT_PIPE
|
agent = WINDOWS_OPENSSH_AGENT_PIPE
|
||||||
} else {
|
} else {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
||||||
const pageantRunning = await new Promise<boolean>(resolve => {
|
const pageantRunning = await new Promise<boolean>(resolve => {
|
||||||
windowsProcessTreeNative.getProcessList(list => { // eslint-disable-line block-scoped-var
|
windowsProcessTreeNative.getProcessList(list => { // eslint-disable-line block-scoped-var
|
||||||
resolve(list.some(x => x.name === 'pageant.exe'))
|
resolve(list.some(x => x.name === 'pageant.exe'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user