diff --git a/cli/api.ts b/cli/api.ts index 37c32f20..d99174f5 100644 --- a/cli/api.ts +++ b/cli/api.ts @@ -108,15 +108,13 @@ function getPackageName(plugin: string) { function existsOnNpm(plugin: string) { const name = getPackageName(plugin); - return got - .get(registryUrl + name.toLowerCase(), {timeout: 10000, responseType: 'json'}) - .then((res) => { - if (!res.body.versions) { - return Promise.reject(res); - } else { - return res; - } - }); + return got.get(registryUrl + name.toLowerCase(), {timeout: 10000, responseType: 'json'}).then((res) => { + if (!res.body.versions) { + return Promise.reject(res); + } else { + return res; + } + }); } function install(plugin: string, locally?: boolean) { diff --git a/lib/actions/term-groups.ts b/lib/actions/term-groups.ts index d2a83d4e..4696bb6d 100644 --- a/lib/actions/term-groups.ts +++ b/lib/actions/term-groups.ts @@ -13,19 +13,20 @@ import {setActiveSession, ptyExitSession, userExitSession} from './sessions'; import {ITermState, ITermGroup, HyperState, HyperDispatch, HyperActions} from '../hyper'; function requestSplit(direction: 'VERTICAL' | 'HORIZONTAL') { - return (activeUid: string) => (dispatch: HyperDispatch, getState: () => HyperState): void => { - dispatch({ - type: SESSION_REQUEST, - effect: () => { - const {ui, sessions} = getState(); - rpc.emit('new', { - splitDirection: direction, - cwd: ui.cwd, - activeUid: activeUid ? activeUid : sessions.activeUid - }); - } - }); - }; + return (activeUid: string) => + (dispatch: HyperDispatch, getState: () => HyperState): void => { + dispatch({ + type: SESSION_REQUEST, + effect: () => { + const {ui, sessions} = getState(); + rpc.emit('new', { + splitDirection: direction, + cwd: ui.cwd, + activeUid: activeUid ? activeUid : sessions.activeUid + }); + } + }); + }; } export const requestVerticalSplit = requestSplit(DIRECTION.VERTICAL); diff --git a/lib/containers/header.ts b/lib/containers/header.ts index 6e0c5f2e..ee27ce35 100644 --- a/lib/containers/header.ts +++ b/lib/containers/header.ts @@ -15,18 +15,16 @@ const getActivityMarkers = ({ui}: HyperState) => ui.activityMarkers; const getTabs = createSelector( [getSessions, getRootGroups, getActiveSessions, getActiveRootGroup, getActivityMarkers], (sessions, rootGroups, activeSessions, activeRootGroup, activityMarkers) => - rootGroups.map( - (t): ITab => { - const activeSessionUid = activeSessions[t.uid]; - const session = sessions[activeSessionUid]; - return { - uid: t.uid, - title: session.title, - isActive: t.uid === activeRootGroup, - hasActivity: activityMarkers[session.uid] - }; - } - ) + rootGroups.map((t): ITab => { + const activeSessionUid = activeSessions[t.uid]; + const session = sessions[activeSessionUid]; + return { + uid: t.uid, + title: session.title, + isActive: t.uid === activeRootGroup, + hasActivity: activityMarkers[session.uid] + }; + }) ); const mapStateToProps = (state: HyperState) => {