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:
Martin Ek 2016-10-12 21:35:44 -04:00 committed by Guillermo Rauch
parent ec9787fda4
commit 7a08b1dc3e
15 changed files with 65 additions and 61 deletions

View file

@ -88,7 +88,7 @@ function createExitAction(type) {
}
const sessions = keys(getState().sessions.sessions);
if (!sessions.length) {
if (sessions.length === 0) {
window.close();
}
}

View file

@ -1,3 +1,4 @@
/* eslint-disable quote-props */
import React from 'react';
import Component from '../component';

View file

@ -29,7 +29,7 @@ class TermGroup_ extends Component {
renderSplit(groups) {
const [first, ...rest] = groups;
if (!rest.length) {
if (rest.length === 0) {
return first;
}

View file

@ -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>);

View file

@ -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';

View file

@ -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)
);
}

View file

@ -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': '',
'40': '',
'39': '',
'37': ''
38: '',
40: '',
39: '',
37: ''
};
/**