diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..e679c757 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,4 @@ +app/dist +app/node_modules +build +dist diff --git a/app/.eslintignore b/app/.eslintignore new file mode 100644 index 00000000..1521c8b7 --- /dev/null +++ b/app/.eslintignore @@ -0,0 +1 @@ +dist diff --git a/app/lib/actions/ui.js b/app/lib/actions/ui.js index 901884f0..97ad6904 100644 --- a/app/lib/actions/ui.js +++ b/app/lib/actions/ui.js @@ -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', '' diff --git a/app/lib/containers/hyperterm.js b/app/lib/containers/hyperterm.js index e3d4c9a9..32719bda 100644 --- a/app/lib/containers/hyperterm.js +++ b/app/lib/containers/hyperterm.js @@ -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')); diff --git a/app/lib/hterm.js b/app/lib/hterm.js index f5475e26..27ad71bf 100644 --- a/app/lib/hterm.js +++ b/app/lib/hterm.js @@ -88,23 +88,24 @@ hterm.Terminal.prototype.clearPreserveCursorRow = function () { // fixes a bug in hterm, where the shorthand hex // is not properly converted to rgb -lib.colors.hexToRGB = function(arg) { +lib.colors.hexToRGB = function (arg) { var hex16 = lib.colors.re_.hex16; var hex24 = lib.colors.re_.hex24; - function convert(hex) { - if (hex.length == 4) { - hex = hex.replace(hex16, function(h, r, g, b) { - return "#" + r + r + g + g + b + b; + function convert (hex) { + if (hex.length === 4) { + hex = hex.replace(hex16, function (h, r, g, 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) + ', ' + - parseInt(ary[2], 16) + ', ' + - parseInt(ary[3], 16) + ')'; + return 'rgb(' + + parseInt(ary[1], 16) + ', ' + + parseInt(ary[2], 16) + ', ' + + parseInt(ary[3], 16) + + ')'; } if (arg instanceof Array) { diff --git a/app/package.json b/app/package.json index 2da51a1d..c5da172d 100644 --- a/app/package.json +++ b/app/package.json @@ -72,7 +72,7 @@ }, "scripts": { "dev": "webpack --watch", - "lint": "eslint *.js", + "lint": "eslint .", "build": "NODE_ENV=production webpack" } } diff --git a/package.json b/package.json index 4e216937..07f5f09e 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,6 @@ }, "scripts": { "start": "electron index", - "lint": "eslint *.js" + "lint": "eslint ." } }