@typescript-eslint linter

This commit is contained in:
Eugene Pankov
2019-06-14 23:47:48 +02:00
parent a5ecdeb5ea
commit c008a3478e
96 changed files with 1334 additions and 810 deletions

View File

@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core'
import { DomSanitizer } from '@angular/platform-browser'
import { ToolbarButtonProvider, IToolbarButton, AppService, HostAppService, HotkeysService } from 'terminus-core'
import { ToolbarButtonProvider, ToolbarButton, AppService, HostAppService, HotkeysService } from 'terminus-core'
import { SettingsTabComponent } from './components/settingsTab.component'
@@ -23,7 +23,7 @@ export class ButtonProvider extends ToolbarButtonProvider {
})
}
provide (): IToolbarButton[] {
provide (): ToolbarButton[] {
return [{
icon: this.domSanitizer.bypassSecurityTrustHtml(require('./icons/cog.svg')),
title: 'Settings',

View File

@@ -21,7 +21,7 @@ const INPUT_TIMEOUT = 1000
animate('250ms ease-out', style({
transform: 'translateX(0)',
opacity: '1',
}))
})),
]),
transition(':leave', [
style({
@@ -31,10 +31,10 @@ const INPUT_TIMEOUT = 1000
animate('250ms ease-in', style({
transform: 'translateX(25px)',
opacity: '0',
}))
])
])
]
})),
]),
]),
],
})
export class HotkeyInputModalComponent {
@Input() value: string[] = []

View File

@@ -24,7 +24,7 @@ export class MultiHotkeyInputComponent {
if (typeof this.model === 'string') {
this.model = [this.model]
}
this.model = this.model.map(item => (typeof item === 'string') ? [item] : item)
this.model = this.model.map(item => typeof item === 'string' ? [item] : item)
}
editItem (item) {

View File

@@ -6,14 +6,14 @@ import {
ElectronService,
DockingService,
ConfigService,
IHotkeyDescription,
HotkeyDescription,
HotkeysService,
BaseTabComponent,
Theme,
HostAppService,
Platform,
HomeBaseService,
ShellIntegrationService
ShellIntegrationService,
} from 'terminus-core'
import { SettingsTabProvider } from '../api'
@@ -30,7 +30,7 @@ import { SettingsTabProvider } from '../api'
export class SettingsTabComponent extends BaseTabComponent {
@Input() activeTab: string
hotkeyFilter = ''
hotkeyDescriptions: IHotkeyDescription[]
hotkeyDescriptions: HotkeyDescription[]
screens: any[]
Platform = Platform
configDefaults: any

View File

@@ -7,17 +7,17 @@ export class SettingsConfigProvider extends ConfigProvider {
[Platform.macOS]: {
hotkeys: {
settings: ['⌘-,'],
}
},
},
[Platform.Windows]: {
hotkeys: {
settings: ['Ctrl-,']
}
settings: ['Ctrl-,'],
},
},
[Platform.Linux]: {
hotkeys: {
settings: ['Ctrl-,']
}
settings: ['Ctrl-,'],
},
},
}
}

View File

@@ -1,17 +1,17 @@
import { Injectable } from '@angular/core'
import { IHotkeyDescription, HotkeyProvider } from 'terminus-core'
import { HotkeyDescription, HotkeyProvider } from 'terminus-core'
/** @hidden */
@Injectable()
export class SettingsHotkeyProvider extends HotkeyProvider {
hotkeys: IHotkeyDescription[] = [
hotkeys: HotkeyDescription[] = [
{
id: 'settings',
name: 'Open Settings',
},
]
async provide (): Promise<IHotkeyDescription[]> {
async provide (): Promise<HotkeyDescription[]> {
return this.hotkeys
}
}

View File

@@ -42,7 +42,7 @@ import { SettingsConfigProvider } from './config'
SettingsTabBodyComponent,
],
})
export default class SettingsModule { }
export default class SettingsModule { } // eslint-disable-line @typescript-eslint/no-extraneous-class
export * from './api'
export { SettingsTabComponent }