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

@ -3,7 +3,7 @@ import React from 'react';
import {decorate, getTabsProps} from '../utils/plugins';
import Tabs_ from './tabs';
import {HeaderProps} from '../hyper';
import type {HeaderProps} from '../hyper';
const Tabs = decorate(Tabs_, 'Tabs');

View file

@ -1,5 +1,5 @@
import React from 'react';
import {NotificationProps, NotificationState} from '../hyper';
import type {NotificationProps, NotificationState} from '../hyper';
export default class Notification extends React.PureComponent<NotificationProps, NotificationState> {
dismissTimer!: NodeJS.Timeout;

View file

@ -3,7 +3,7 @@ import React from 'react';
import {decorate} from '../utils/plugins';
import Notification_ from './notification';
import {NotificationsProps} from '../hyper';
import type {NotificationsProps} from '../hyper';
const Notification = decorate(Notification_, 'Notification');

View file

@ -1,5 +1,5 @@
import React, {useCallback} from 'react';
import {SearchBoxProps} from '../hyper';
import type {SearchBoxProps} from '../hyper';
import {VscArrowUp} from '@react-icons/all-files/vsc/VscArrowUp';
import {VscArrowDown} from '@react-icons/all-files/vsc/VscArrowDown';
import {VscClose} from '@react-icons/all-files/vsc/VscClose';

View file

@ -1,6 +1,6 @@
import React from 'react';
import _ from 'lodash';
import {SplitPaneProps} from '../hyper';
import type {SplitPaneProps} from '../hyper';
export default class SplitPane extends React.PureComponent<SplitPaneProps, {dragging: boolean}> {
dragPanePosition!: number;

View file

@ -1,5 +1,5 @@
import React from 'react';
import {StyleSheetProps} from '../hyper';
import type {StyleSheetProps} from '../hyper';
export default class StyleSheet extends React.PureComponent<StyleSheetProps> {
render() {

View file

@ -1,5 +1,5 @@
import React from 'react';
import {TabProps} from '../hyper';
import type {TabProps} from '../hyper';
export default class Tab extends React.PureComponent<TabProps> {
constructor(props: TabProps) {

View file

@ -3,7 +3,7 @@ import React from 'react';
import {decorate, getTabProps} from '../utils/plugins';
import Tab_ from './tab';
import {TabsProps} from '../hyper';
import type {TabsProps} from '../hyper';
const Tab = decorate(Tab_, 'Tab');
const isMac = /Mac/.test(navigator.userAgent);

View file

@ -4,7 +4,7 @@ import {decorate, getTermProps, getTermGroupProps} from '../utils/plugins';
import {resizeTermGroup} from '../actions/term-groups';
import Term_ from './term';
import SplitPane_ from './split-pane';
import {HyperState, HyperDispatch, TermGroupProps, TermGroupOwnProps} from '../hyper';
import type {HyperState, HyperDispatch, TermGroupProps, TermGroupOwnProps} from '../hyper';
const Term = decorate(Term_, 'Term');
const SplitPane = decorate(SplitPane_, 'SplitPane');

View file

@ -1,8 +1,10 @@
import React from 'react';
import {Terminal, ITerminalOptions, IDisposable} from 'xterm';
import type {ITerminalOptions, IDisposable} from 'xterm';
import {Terminal} from 'xterm';
import {FitAddon} from 'xterm-addon-fit';
import {WebLinksAddon} from 'xterm-addon-web-links';
import {SearchAddon, ISearchDecorationOptions} from 'xterm-addon-search';
import type {ISearchDecorationOptions} from 'xterm-addon-search';
import {SearchAddon} from 'xterm-addon-search';
import {WebglAddon} from 'xterm-addon-webgl';
import {CanvasAddon} from 'xterm-addon-canvas';
import {LigaturesAddon} from 'xterm-addon-ligatures';
@ -12,7 +14,7 @@ import Color from 'color';
import terms from '../terms';
import processClipboard from '../utils/paste';
import _SearchBox from './searchBox';
import {TermProps} from '../hyper';
import type {TermProps} from '../hyper';
import {pickBy, isEqual} from 'lodash';
import {decorate} from '../utils/plugins';
import 'xterm/css/xterm.css';

View file

@ -3,8 +3,8 @@ import {decorate, getTermGroupProps} from '../utils/plugins';
import {registerCommandHandlers} from '../command-registry';
import TermGroup_ from './term-group';
import StyleSheet_ from './style-sheet';
import {TermsProps, HyperDispatch} from '../hyper';
import Term from './term';
import type {TermsProps, HyperDispatch} from '../hyper';
import type Term from './term';
import {ObjectTypedKeys} from '../utils/object';
const TermGroup = decorate(TermGroup_, 'TermGroup');