mirror of
https://github.com/Eugeny/tabby
synced 2024-12-04 18:40:16 +00:00
bumped eslint
This commit is contained in:
parent
4684b0d6f5
commit
1b0ce6d684
21 changed files with 536 additions and 327 deletions
|
@ -1,7 +1,13 @@
|
|||
settings:
|
||||
import/parsers:
|
||||
'@typescript-eslint/parser': ['.ts']
|
||||
import/resolver:
|
||||
typescript: true
|
||||
typescript:
|
||||
project:
|
||||
- tsconfig.json
|
||||
- tabby-*/tsconfig.json
|
||||
node: true
|
||||
|
||||
env:
|
||||
browser: true
|
||||
es6: true
|
||||
|
@ -28,7 +34,7 @@ overrides:
|
|||
- plugin:import/typescript
|
||||
plugins:
|
||||
- '@typescript-eslint'
|
||||
- 'import'
|
||||
- import
|
||||
rules:
|
||||
'@typescript-eslint/semi':
|
||||
- error
|
||||
|
@ -130,6 +136,7 @@ overrides:
|
|||
'@typescript-eslint/naming-convention': off
|
||||
'@typescript-eslint/lines-between-class-members':
|
||||
- error
|
||||
- always
|
||||
- exceptAfterSingleLine: true
|
||||
'@typescript-eslint/dot-notation': off
|
||||
'@typescript-eslint/no-implicit-any-catch': off
|
||||
|
@ -152,3 +159,6 @@ overrides:
|
|||
'@typescript-eslint/consistent-generic-constructors': off
|
||||
'keyword-spacing': off
|
||||
'@typescript-eslint/keyword-spacing': off
|
||||
'@typescript-eslint/class-methods-use-this': off
|
||||
'@typescript-eslint/lines-around-comment': off
|
||||
'@typescript-eslint/no-redundant-type-constituents': off # broken
|
||||
|
|
|
@ -183,7 +183,7 @@ export class Application {
|
|||
}
|
||||
|
||||
enableTray (): void {
|
||||
if (this.tray || process.platform === 'linux') {
|
||||
if (!!this.tray || process.platform === 'linux') {
|
||||
return
|
||||
}
|
||||
if (process.platform === 'darwin') {
|
||||
|
|
10
package.json
10
package.json
|
@ -26,8 +26,8 @@
|
|||
"@types/js-yaml": "^4.0.5",
|
||||
"@types/node": "20.3.1",
|
||||
"@types/webpack-env": "^1.18.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
||||
"@typescript-eslint/parser": "^5.54.1",
|
||||
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
||||
"@typescript-eslint/parser": "^6.4.1",
|
||||
"apply-loader": "2.0.0",
|
||||
"axios": "^1.4.0",
|
||||
"babel-loader": "^9.1.2",
|
||||
|
@ -44,9 +44,9 @@
|
|||
"electron-download": "^4.1.1",
|
||||
"electron-installer-snap": "^5.1.0",
|
||||
"electron-rebuild": "^3.2.9",
|
||||
"eslint": "^8.38.0",
|
||||
"eslint-import-resolver-typescript": "^3.5.2",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint": "^8.48.0",
|
||||
"eslint-import-resolver-typescript": "^3.6.0",
|
||||
"eslint-plugin-import": "^2.28.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"gettext-extractor": "^3.8.0",
|
||||
"graceful-fs": "^4.2.10",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
export interface MenuItemOptions {
|
||||
type?: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio')
|
||||
type?: 'normal' | 'separator' | 'submenu' | 'checkbox' | 'radio'
|
||||
label?: string
|
||||
sublabel?: string
|
||||
enabled?: boolean
|
||||
|
|
|
@ -9,5 +9,6 @@ export class CoreConfigProvider extends ConfigProvider {
|
|||
[Platform.Linux]: require('./configDefaults.linux.yaml').default,
|
||||
[Platform.Web]: require('./configDefaults.web.yaml').default,
|
||||
}
|
||||
|
||||
defaults = require('./configDefaults.yaml').default
|
||||
}
|
||||
|
|
|
@ -188,10 +188,10 @@ export default class AppModule { // eslint-disable-line @typescript-eslint/no-ex
|
|||
if (!provider) {
|
||||
return
|
||||
}
|
||||
this.showSelector(provider)
|
||||
this.showSelector(provider).catch(() => null)
|
||||
}
|
||||
if (hotkey === 'command-selector') {
|
||||
commands.showSelector().catch(() => {return})
|
||||
commands.showSelector().catch(() => null)
|
||||
}
|
||||
|
||||
if (hotkey === 'profile-selector') {
|
||||
|
@ -229,7 +229,7 @@ export default class AppModule { // eslint-disable-line @typescript-eslint/no-ex
|
|||
})
|
||||
}
|
||||
|
||||
await this.selector.show(this.translate.instant('Select profile'), options).catch(() => {return})
|
||||
await this.selector.show(this.translate.instant('Select profile'), options)
|
||||
}
|
||||
|
||||
static forRoot (): ModuleWithProviders<AppModule> {
|
||||
|
|
|
@ -109,6 +109,6 @@ export class CommandService {
|
|||
description: c.sublabel,
|
||||
icon: c.icon,
|
||||
})),
|
||||
).then(() => {return})
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,5 +22,6 @@ export class ElectronConfigProvider extends ConfigProvider {
|
|||
},
|
||||
},
|
||||
}
|
||||
|
||||
defaults = {}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ export class ShellIntegrationService {
|
|||
command: 'paste "%V"',
|
||||
},
|
||||
]
|
||||
|
||||
private constructor (
|
||||
private electron: ElectronService,
|
||||
private hostApp: HostAppService,
|
||||
|
|
|
@ -68,7 +68,7 @@ export class PluginManagerService {
|
|||
map(plugins => plugins.filter(x => x.packageName.startsWith(namePrefix))),
|
||||
map(plugins => plugins.filter(x => !PLUGIN_BLACKLIST.includes(x.packageName))),
|
||||
map(plugins => {
|
||||
const mapping: Record<string, PluginInfo[]> = {}
|
||||
const mapping: Record<string, PluginInfo[]|undefined> = {}
|
||||
for (const p of plugins) {
|
||||
mapping[p.name] ??= []
|
||||
mapping[p.name].push(p)
|
||||
|
|
|
@ -20,6 +20,7 @@ export class SettingsConfigProvider extends ConfigProvider {
|
|||
},
|
||||
},
|
||||
}
|
||||
|
||||
platformDefaults = {
|
||||
[Platform.macOS]: {
|
||||
hotkeys: {
|
||||
|
|
|
@ -18,6 +18,7 @@ export class SFTPCreateDirectoryModalComponent extends BaseComponent {
|
|||
create (): void {
|
||||
this.modalInstance.close(this.directoryName)
|
||||
}
|
||||
|
||||
cancel (): void {
|
||||
this.modalInstance.close('')
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import * as C from 'constants'
|
||||
// eslint-disable-next-line @typescript-eslint/no-duplicate-imports, no-duplicate-imports
|
||||
import { Subject, Observable } from 'rxjs'
|
||||
import { posix as posixPath } from 'path'
|
||||
import { Injector, NgZone } from '@angular/core'
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import * as fs from 'mz/fs'
|
||||
import * as crypto from 'crypto'
|
||||
// eslint-disable-next-line @typescript-eslint/no-duplicate-imports, no-duplicate-imports
|
||||
import * as sshpk from 'sshpk'
|
||||
import colors from 'ansi-colors'
|
||||
import stripAnsi from 'strip-ansi'
|
||||
|
|
|
@ -7,7 +7,7 @@ export class X11Socket {
|
|||
|
||||
static resolveDisplaySpec (spec?: string|null): SocketConnectOpts {
|
||||
// eslint-disable-next-line prefer-const, @typescript-eslint/no-unused-vars
|
||||
let [_, xHost, xDisplay] = /^(.+):(\d+)(?:.(\d+))$/.exec(spec ?? process.env.DISPLAY ?? 'localhost:0') ?? []
|
||||
let [_, xHost, xDisplay] = /^(.+):(\d+)(?:.(\d+))$/.exec(spec ?? process.env.DISPLAY ?? 'localhost:0') ?? [undefined, undefined, undefined]
|
||||
if (process.platform === 'win32') {
|
||||
xHost ??= 'localhost'
|
||||
} else {
|
||||
|
@ -18,7 +18,7 @@ export class X11Socket {
|
|||
xHost = spec
|
||||
}
|
||||
|
||||
const display = parseInt(xDisplay || '0')
|
||||
const display = parseInt(xDisplay ?? '0')
|
||||
const port = display < 100 ? display + 6000 : display
|
||||
|
||||
if (xHost === 'unix') {
|
||||
|
|
|
@ -53,6 +53,6 @@ export class CommonSFTPContextMenu extends SFTPContextMenuItemProvider {
|
|||
const modal = this.ngbModal.open(SFTPDeleteModalComponent)
|
||||
modal.componentInstance.item = item
|
||||
modal.componentInstance.sftp = session
|
||||
await modal.result.catch(() => {return})
|
||||
await modal.result.catch(() => null)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */
|
||||
import { Socket } from 'net'
|
||||
import colors from 'ansi-colors'
|
||||
import stripAnsi from 'strip-ansi'
|
||||
|
|
|
@ -150,11 +150,13 @@ export class BaseTerminalTabComponent<P extends BaseTerminalProfile> extends Bas
|
|||
},
|
||||
},
|
||||
})
|
||||
|
||||
private spinnerActive = false
|
||||
private spinnerPaused = false
|
||||
private toolbarRevealTimeout = new ResettableTimeout(() => {
|
||||
this.revealToolbar = false
|
||||
}, 1000)
|
||||
|
||||
private frontendWriteLock = Promise.resolve()
|
||||
|
||||
get input$ (): Observable<Buffer> {
|
||||
|
|
|
@ -33,6 +33,7 @@ export class StreamProcessingSettingsComponent {
|
|||
description: _('Send bytes by typing in hex values'),
|
||||
},
|
||||
]
|
||||
|
||||
outputModes = [
|
||||
{
|
||||
key: null,
|
||||
|
@ -45,6 +46,7 @@ export class StreamProcessingSettingsComponent {
|
|||
description: _('Output is shown as a hexdump'),
|
||||
},
|
||||
]
|
||||
|
||||
newlineModes = [
|
||||
{ key: null, name: _('Keep') },
|
||||
{ key: 'strip', name: _('Strip') },
|
||||
|
|
|
@ -106,6 +106,7 @@ export class MultifocusService {
|
|||
return
|
||||
}
|
||||
const tabs = currentTab.getAllTabs().filter(t => t instanceof BaseTerminalTabComponent)
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||
this.start(pane, tabs as any)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue