lint typescript-eslint/consistent-indexed-object-style

This commit is contained in:
Eugene Pankov 2020-12-24 18:56:59 +01:00
parent 2ef3a81dd8
commit aacc603309
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
11 changed files with 13 additions and 14 deletions

View File

@ -117,6 +117,5 @@ rules:
'@typescript-eslint/prefer-enum-initializers': off '@typescript-eslint/prefer-enum-initializers': off
'@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/consistent-indexed-object-style': off
'@typescript-eslint/no-var-requires': off '@typescript-eslint/no-var-requires': off
'@typescript-eslint/no-shadow': off '@typescript-eslint/no-shadow': off

View File

@ -33,5 +33,5 @@ export abstract class ConfigProvider {
* } * }
* ``` * ```
*/ */
platformDefaults: {[platform: string]: any} = {} platformDefaults: Record<string, any> = {}
} }

View File

@ -258,7 +258,7 @@ export class HostAppService {
/** /**
* Notifies other windows of config file changes * Notifies other windows of config file changes
*/ */
broadcastConfigChange (configStore: {[k: string]: any}): void { broadcastConfigChange (configStore: Record<string, any>): void {
this.electron.ipcRenderer.send('app:config-change', configStore) this.electron.ipcRenderer.send('app:config-change', configStore)
} }

View File

@ -12,7 +12,7 @@ export class TouchbarService {
private tabsSegmentedControl: TouchBarSegmentedControl private tabsSegmentedControl: TouchBarSegmentedControl
private buttonsSegmentedControl: TouchBarSegmentedControl private buttonsSegmentedControl: TouchBarSegmentedControl
private tabSegments: SegmentedControlSegment[] = [] private tabSegments: SegmentedControlSegment[] = []
private nsImageCache: {[id: string]: NativeImage} = {} private nsImageCache: Record<string, NativeImage> = {}
private constructor ( private constructor (
private app: AppService, private app: AppService,

View File

@ -19,8 +19,8 @@ export class PluginsSettingsTabComponent {
@Input() availablePlugins$: Observable<PluginInfo[]> @Input() availablePlugins$: Observable<PluginInfo[]>
@Input() availablePluginsQuery$ = new BehaviorSubject<string>('') @Input() availablePluginsQuery$ = new BehaviorSubject<string>('')
@Input() availablePluginsReady = false @Input() availablePluginsReady = false
@Input() knownUpgrades: {[id: string]: PluginInfo|null} = {} @Input() knownUpgrades: Record<string, PluginInfo|null> = {}
@Input() busy: {[id: string]: BusyState} = {} @Input() busy: Record<string, BusyState> = {}
@Input() erroredPlugin: string @Input() erroredPlugin: string
@Input() errorMessage: string @Input() errorMessage: string

View File

@ -41,7 +41,7 @@ export interface SSHConnection {
jumpHost?: string jumpHost?: string
agentForward?: boolean agentForward?: boolean
warnOnClose?: boolean warnOnClose?: boolean
algorithms?: {[t: string]: string[]} algorithms?: Record<string, string[]>
} }
export enum PortForwardType { export enum PortForwardType {

View File

@ -15,9 +15,9 @@ export class EditConnectionModalComponent {
connection: SSHConnection connection: SSHConnection
hasSavedPassword: boolean hasSavedPassword: boolean
supportedAlgorithms: {[id: string]: string[]} = {} supportedAlgorithms: Record<string, string> = {}
defaultAlgorithms: {[id: string]: string[]} = {} defaultAlgorithms: Record<string, string> = {}
algorithms: {[id: string]: {[a: string]: boolean}} = {} algorithms: Record<string, Record<string, boolean>> = {}
constructor ( constructor (
public config: ConfigService, public config: ConfigService,

View File

@ -14,7 +14,7 @@ import { PromptModalComponent } from './promptModal.component'
export class SSHSettingsTabComponent { export class SSHSettingsTabComponent {
connections: SSHConnection[] connections: SSHConnection[]
childGroups: SSHConnectionGroup[] childGroups: SSHConnectionGroup[]
groupCollapsed: {[id: string]: boolean} = {} groupCollapsed: Record<string, boolean> = {}
constructor ( constructor (
public config: ConfigService, public config: ConfigService,

View File

@ -37,7 +37,7 @@ export interface Shell {
name?: string name?: string
command: string command: string
args?: string[] args?: string[]
env: {[id: string]: string} env: Record<string, string>
/** /**
* Base path to which shell's internal FS is relative * Base path to which shell's internal FS is relative

View File

@ -331,7 +331,7 @@ export class Session extends BaseSession {
/** @hidden */ /** @hidden */
@Injectable({ providedIn: 'root' }) @Injectable({ providedIn: 'root' })
export class SessionsService { export class SessionsService {
sessions: {[id: string]: BaseSession} = {} sessions: Record<string, BaseSession> = {}
logger: Logger logger: Logger
private lastID = 0 private lastID = 0

View File

@ -16,7 +16,7 @@ try {
// WSL Distribution List // WSL Distribution List
// https://docs.microsoft.com/en-us/windows/wsl/install-win10#install-your-linux-distribution-of-choice // https://docs.microsoft.com/en-us/windows/wsl/install-win10#install-your-linux-distribution-of-choice
/* eslint-disable quote-props */ /* eslint-disable quote-props */
const wslIconMap: { [key: string]: string } = { const wslIconMap: Record<string, string> = {
'Alpine': require('../icons/alpine.svg'), 'Alpine': require('../icons/alpine.svg'),
'Debian': require('../icons/debian.svg'), 'Debian': require('../icons/debian.svg'),
'kali-linux': require('../icons/linux.svg'), 'kali-linux': require('../icons/linux.svg'),