eslint: consistent type imports

This commit is contained in:
Labhansh Agrawal 2023-06-26 14:59:50 +05:30
parent 0eb05e8416
commit 928209b914
65 changed files with 141 additions and 112 deletions

View file

@ -1,5 +1,5 @@
import {Dispatch, Middleware} from 'redux';
import {HyperActions, HyperState} from '../hyper';
import type {Dispatch, Middleware} from 'redux';
import type {HyperActions, HyperState} from '../hyper';
/**
* Simple redux middleware that executes
* the `effect` field if provided in an action

View file

@ -10,7 +10,8 @@
* PR: https://github.com/kevva/executable/pull/10
*/
import fs, {Stats} from 'fs';
import type {Stats} from 'fs';
import fs from 'fs';
export function isExecutable(fileStat: Stats): boolean {
if (process.platform === 'win32') {

View file

@ -3,17 +3,19 @@
import {require as remoteRequire} from '@electron/remote';
// TODO: Should be updates to new async API https://medium.com/@nornagon/electrons-remote-module-considered-harmful-70d69500f31
import {connect as reduxConnect, Options} from 'react-redux';
import type {Options} from 'react-redux';
import {connect as reduxConnect} from 'react-redux';
import {basename} from 'path';
// patching Module._load
// so plugins can `require` them without needing their own version
// https://github.com/vercel/hyper/issues/619
import React, {ComponentType, PureComponent} from 'react';
import type {ComponentType} from 'react';
import React, {PureComponent} from 'react';
import ReactDOM from 'react-dom';
import Notification from '../components/notification';
import notify from './notify';
import {
import type {
hyperPlugin,
IUiReducer,
ISessionReducer,
@ -27,7 +29,7 @@ import {
Assignable,
HyperActions
} from '../hyper';
import {Dispatch, Middleware} from 'redux';
import type {Dispatch, Middleware} from 'redux';
import {ObjectTypedKeys} from './object';
import IPCChildProcess from './ipc-child-process';
import ChildProcess from 'child_process';

View file

@ -1,7 +1,7 @@
import {EventEmitter} from 'events';
import {IpcRenderer, IpcRendererEvent} from 'electron';
import type {IpcRenderer, IpcRendererEvent} from 'electron';
import electron from 'electron';
import {FilterNever, MainEvents, RendererEvents, TypedEmitter} from '../../common';
import type {FilterNever, MainEvents, RendererEvents, TypedEmitter} from '../../common';
export default class Client {
emitter: TypedEmitter<RendererEvents>;

View file

@ -1,4 +1,4 @@
import {ITermState} from '../hyper';
import type {ITermState} from '../hyper';
export default function findBySession(termGroupState: ITermState, sessionUid: string) {
const {termGroups} = termGroupState;