mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Fix linter issues (#321)
This commit is contained in:
parent
f1facf4a32
commit
6072b4ca90
7 changed files with 20 additions and 14 deletions
4
.eslintignore
Normal file
4
.eslintignore
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
app/dist
|
||||||
|
app/node_modules
|
||||||
|
build
|
||||||
|
dist
|
||||||
1
app/.eslintignore
Normal file
1
app/.eslintignore
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
dist
|
||||||
|
|
@ -143,7 +143,7 @@ export function showPreferences () {
|
||||||
rpc.once('session data', () => {
|
rpc.once('session data', () => {
|
||||||
dispatch(sendSessionData(
|
dispatch(sendSessionData(
|
||||||
uid,
|
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!',
|
'echo If it fails, open it manually with your favorite editor!',
|
||||||
'exec env $EDITOR ~/.hyperterm.js',
|
'exec env $EDITOR ~/.hyperterm.js',
|
||||||
''
|
''
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ class HyperTerm extends Component {
|
||||||
keys.bind('command+alt+left', moveLeft);
|
keys.bind('command+alt+left', moveLeft);
|
||||||
keys.bind('command+alt+right', moveRight);
|
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+left', bound('moveWordLeft'));
|
||||||
keys.bind('alt+right', bound('moveWordRight'));
|
keys.bind('alt+right', bound('moveWordRight'));
|
||||||
keys.bind('alt+backspace', bound('deleteWordLeft'));
|
keys.bind('alt+backspace', bound('deleteWordLeft'));
|
||||||
|
|
|
||||||
|
|
@ -88,23 +88,24 @@ hterm.Terminal.prototype.clearPreserveCursorRow = function () {
|
||||||
|
|
||||||
// fixes a bug in hterm, where the shorthand hex
|
// fixes a bug in hterm, where the shorthand hex
|
||||||
// is not properly converted to rgb
|
// is not properly converted to rgb
|
||||||
lib.colors.hexToRGB = function(arg) {
|
lib.colors.hexToRGB = function (arg) {
|
||||||
var hex16 = lib.colors.re_.hex16;
|
var hex16 = lib.colors.re_.hex16;
|
||||||
var hex24 = lib.colors.re_.hex24;
|
var hex24 = lib.colors.re_.hex24;
|
||||||
|
|
||||||
function convert(hex) {
|
function convert (hex) {
|
||||||
if (hex.length == 4) {
|
if (hex.length === 4) {
|
||||||
hex = hex.replace(hex16, function(h, r, g, b) {
|
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);
|
var ary = hex.match(hex24);
|
||||||
if (!ary)
|
if (!ary) return null;
|
||||||
return null;
|
|
||||||
|
|
||||||
return 'rgb(' + parseInt(ary[1], 16) + ', ' +
|
return 'rgb(' +
|
||||||
parseInt(ary[2], 16) + ', ' +
|
parseInt(ary[1], 16) + ', ' +
|
||||||
parseInt(ary[3], 16) + ')';
|
parseInt(ary[2], 16) + ', ' +
|
||||||
|
parseInt(ary[3], 16) +
|
||||||
|
')';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg instanceof Array) {
|
if (arg instanceof Array) {
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "webpack --watch",
|
"dev": "webpack --watch",
|
||||||
"lint": "eslint *.js",
|
"lint": "eslint .",
|
||||||
"build": "NODE_ENV=production webpack"
|
"build": "NODE_ENV=production webpack"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,6 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron index",
|
"start": "electron index",
|
||||||
"lint": "eslint *.js"
|
"lint": "eslint ."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue