Fix linter issues (#321)

This commit is contained in:
Darin Morrison 2016-07-20 16:21:29 -06:00 committed by Guillermo Rauch
parent f1facf4a32
commit 6072b4ca90
7 changed files with 20 additions and 14 deletions

4
.eslintignore Normal file
View file

@ -0,0 +1,4 @@
app/dist
app/node_modules
build
dist

1
app/.eslintignore Normal file
View file

@ -0,0 +1 @@
dist

View file

@ -143,7 +143,7 @@ export function showPreferences () {
rpc.once('session data', () => {
dispatch(sendSessionData(
uid,
['echo Attempting to open ~/.hyperterm.js with your \$EDITOR',
['echo Attempting to open ~/.hyperterm.js with your \$EDITOR', // eslint-disable-line no-useless-escape
'echo If it fails, open it manually with your favorite editor!',
'exec env $EDITOR ~/.hyperterm.js',
''

View file

@ -50,7 +50,7 @@ class HyperTerm extends Component {
keys.bind('command+alt+left', moveLeft);
keys.bind('command+alt+right', moveRight);
const bound = method => { return term[method].bind(term) }
const bound = method => { return term[method].bind(term); };
keys.bind('alt+left', bound('moveWordLeft'));
keys.bind('alt+right', bound('moveWordRight'));
keys.bind('alt+backspace', bound('deleteWordLeft'));

View file

@ -93,18 +93,19 @@ lib.colors.hexToRGB = function(arg) {
var hex24 = lib.colors.re_.hex24;
function convert (hex) {
if (hex.length == 4) {
if (hex.length === 4) {
hex = hex.replace(hex16, function (h, r, g, b) {
return "#" + r + r + g + g + b + b;
return '#' + r + r + g + g + b + b;
});
}
var ary = hex.match(hex24);
if (!ary)
return null;
if (!ary) return null;
return 'rgb(' + parseInt(ary[1], 16) + ', ' +
return 'rgb(' +
parseInt(ary[1], 16) + ', ' +
parseInt(ary[2], 16) + ', ' +
parseInt(ary[3], 16) + ')';
parseInt(ary[3], 16) +
')';
}
if (arg instanceof Array) {

View file

@ -72,7 +72,7 @@
},
"scripts": {
"dev": "webpack --watch",
"lint": "eslint *.js",
"lint": "eslint .",
"build": "NODE_ENV=production webpack"
}
}

View file

@ -46,6 +46,6 @@
},
"scripts": {
"start": "electron index",
"lint": "eslint *.js"
"lint": "eslint ."
}
}