Fix xo 0.17 errors and use root xo config for app (#859)
* Use parent xo config in app/ * lint: Fix xo 0.17 errors * app: add missing semver dependency
This commit is contained in:
parent
ec9787fda4
commit
7a08b1dc3e
15 changed files with 65 additions and 61 deletions
|
|
@ -88,7 +88,7 @@ function createExitAction(type) {
|
|||
}
|
||||
|
||||
const sessions = keys(getState().sessions.sessions);
|
||||
if (!sessions.length) {
|
||||
if (sessions.length === 0) {
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable quote-props */
|
||||
import React from 'react';
|
||||
import Component from '../component';
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class TermGroup_ extends Component {
|
|||
|
||||
renderSplit(groups) {
|
||||
const [first, ...rest] = groups;
|
||||
if (!rest.length) {
|
||||
if (rest.length === 0) {
|
||||
return first;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -299,11 +299,11 @@ export default class Term extends Component {
|
|||
height: '100%'
|
||||
}}
|
||||
/> :
|
||||
<div
|
||||
className={css('scrollbarShim')}
|
||||
onMouseEnter={this.handleScrollEnter}
|
||||
onMouseLeave={this.handleScrollLeave}
|
||||
/>
|
||||
<div
|
||||
className={css('scrollbarShim')}
|
||||
onMouseEnter={this.handleScrollEnter}
|
||||
onMouseLeave={this.handleScrollLeave}
|
||||
/>
|
||||
}
|
||||
{ this.props.customChildren }
|
||||
</div>);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import {webFrame} from 'electron';
|
||||
import forceUpdate from 'react-deep-force-update';
|
||||
import {Provider} from 'react-redux';
|
||||
import React from 'react';
|
||||
import {render} from 'react-dom';
|
||||
import {webFrame} from 'electron';
|
||||
|
||||
import rpc from './rpc';
|
||||
import {init} from './actions/index';
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ export function isExecutable(fileStat) {
|
|||
}
|
||||
|
||||
return Boolean(
|
||||
(fileStat.mode & parseInt('0001', 8)) ||
|
||||
(fileStat.mode & parseInt('0010', 8)) ||
|
||||
(fileStat.mode & parseInt('0100', 8))
|
||||
(fileStat.mode & 0o0001) ||
|
||||
(fileStat.mode & 0o0010) ||
|
||||
(fileStat.mode & 0o0100)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,50 +5,50 @@
|
|||
*/
|
||||
|
||||
const _toAscii = {
|
||||
'188': '44',
|
||||
'109': '45',
|
||||
'190': '46',
|
||||
'191': '47',
|
||||
'192': '96',
|
||||
'220': '92',
|
||||
'222': '39',
|
||||
'221': '93',
|
||||
'219': '91',
|
||||
'173': '45',
|
||||
'187': '61', // IE Key codes
|
||||
'186': '59', // IE Key codes
|
||||
'189': '45' // IE Key codes
|
||||
188: '44',
|
||||
109: '45',
|
||||
190: '46',
|
||||
191: '47',
|
||||
192: '96',
|
||||
220: '92',
|
||||
222: '39',
|
||||
221: '93',
|
||||
219: '91',
|
||||
173: '45',
|
||||
187: '61', // IE Key codes
|
||||
186: '59', // IE Key codes
|
||||
189: '45' // IE Key codes
|
||||
};
|
||||
|
||||
const _shiftUps = {
|
||||
'96': '~',
|
||||
'49': '!',
|
||||
'50': '@',
|
||||
'51': '#',
|
||||
'52': '$',
|
||||
'53': '%',
|
||||
'54': '^',
|
||||
'55': '&',
|
||||
'56': '*',
|
||||
'57': '(',
|
||||
'48': ')',
|
||||
'45': '_',
|
||||
'61': '+',
|
||||
'91': '{',
|
||||
'93': '}',
|
||||
'92': '|',
|
||||
'59': ':',
|
||||
'39': '\'',
|
||||
'44': '<',
|
||||
'46': '>',
|
||||
'47': '?'
|
||||
96: '~',
|
||||
49: '!',
|
||||
50: '@',
|
||||
51: '#',
|
||||
52: '$',
|
||||
53: '%',
|
||||
54: '^',
|
||||
55: '&',
|
||||
56: '*',
|
||||
57: '(',
|
||||
48: ')',
|
||||
45: '_',
|
||||
61: '+',
|
||||
91: '{',
|
||||
93: '}',
|
||||
92: '|',
|
||||
59: ':',
|
||||
39: '\'',
|
||||
44: '<',
|
||||
46: '>',
|
||||
47: '?'
|
||||
};
|
||||
|
||||
const _arrowKeys = {
|
||||
'38': '[A',
|
||||
'40': '[B',
|
||||
'39': '[C',
|
||||
'37': '[D'
|
||||
38: '[A',
|
||||
40: '[B',
|
||||
39: '[C',
|
||||
37: '[D'
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue