From 8b3c7d4113b730a84120cf55c5fbdf0b4b33a2ae Mon Sep 17 00:00:00 2001 From: Christian7573 Date: Wed, 25 Aug 2021 10:56:37 -0500 Subject: [PATCH] Fix eslint regressions --- package.json | 2 +- src/assets/xterm_config/xterm_color_theme.js | 2 +- src/assets/xterm_config/xterm_defaults.js | 4 ++-- src/assets/xterm_config/xterm_general_options.js | 2 +- src/client/wetty/term/confiruragtion.ts | 6 +++--- src/client/wetty/term/confiruragtion/editor.ts | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index cdeb875..4ce7542 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,7 @@ "@types/socket.io-client": "^1.4.33", "@types/winston": "^2.4.4", "@types/yargs": "^15.0.5", - "@typescript-eslint/eslint-plugin": "^4.26", + "@typescript-eslint/eslint-plugin": "^2.5.0", "@typescript-eslint/parser": "^4.3.0", "all-contributors-cli": "^6.17.2", "chai": "^4.2.0", diff --git a/src/assets/xterm_config/xterm_color_theme.js b/src/assets/xterm_config/xterm_color_theme.js index 7c1e44f..05ca3b9 100644 --- a/src/assets/xterm_config/xterm_color_theme.js +++ b/src/assets/xterm_config/xterm_color_theme.js @@ -8,7 +8,7 @@ const selectionColorOpacityOption = { type: "number", name: "Selection Color Opacity", description: "Opacity of the selection highlight. A value between 1 (fully opaque) and 0 (fully transparent).", - path: ["wetty_void"], + path: ["wettyVoid"], float: true, min: 0, max: 1, diff --git a/src/assets/xterm_config/xterm_defaults.js b/src/assets/xterm_config/xterm_defaults.js index 5d7dbb7..0d2b2ce 100644 --- a/src/assets/xterm_config/xterm_defaults.js +++ b/src/assets/xterm_config/xterm_defaults.js @@ -1,7 +1,7 @@ const DEFAULT_BELL_SOUND = 'data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq'; window.loadOptions({ - wetty_fit_terminal: true, - wetty_void: 0, + wettyFitTerminal: true, + wettyVoid: 0, xterm: { cols: 80, diff --git a/src/assets/xterm_config/xterm_general_options.js b/src/assets/xterm_config/xterm_general_options.js index c4acd77..c772c27 100644 --- a/src/assets/xterm_config/xterm_general_options.js +++ b/src/assets/xterm_config/xterm_general_options.js @@ -30,7 +30,7 @@ window.inflateOptions([ type: "boolean", name: "Fit Terminal", description: "Automatically fits the terminal to the page, overriding terminal columns and rows.", - path: ["wetty_fit_terminal"], + path: ["wettyFitTerminal"], }, { type: "number", diff --git a/src/client/wetty/term/confiruragtion.ts b/src/client/wetty/term/confiruragtion.ts index 9617a1d..21bad98 100644 --- a/src/client/wetty/term/confiruragtion.ts +++ b/src/client/wetty/term/confiruragtion.ts @@ -8,9 +8,9 @@ import { loadOptions } from './confiruragtion/load'; export function configureTerm(term: Term): void { let options = loadOptions(); - //Convert old options to new options + // Convert old options to new options if (!("xterm" in options)) options = { xterm: options }; - try { setOptions(term, options); } catch {} + try { setOptions(term, options); } catch { /* Do nothing */ }; const toggle = document.querySelector('#options .toggler'); const optionsElem = document.getElementById('options'); @@ -42,5 +42,5 @@ export function configureTerm(term: Term): void { } export function shouldFitTerm(): boolean { - return (loadOptions() as any).wetty_fit_terminal ?? true; + return (loadOptions() as any).wettyFitTerminal ?? true; } diff --git a/src/client/wetty/term/confiruragtion/editor.ts b/src/client/wetty/term/confiruragtion/editor.ts index 8b1e19b..0292cc0 100644 --- a/src/client/wetty/term/confiruragtion/editor.ts +++ b/src/client/wetty/term/confiruragtion/editor.ts @@ -6,7 +6,7 @@ export const onInput = (term: Term, updated: any) => { const updatedConf = JSON.stringify(updated, null, 2); if (localStorage.options === updatedConf) return; setOptions(term, updated); - if (!updated.wetty_fit_terminal && updated.xterm.cols != null && updated.xterm.rows != null) term.resize(updated.xterm.cols, updated.xterm.rows); + if (!updated.wettyFitTerminal && updated.xterm.cols != null && updated.xterm.rows != null) term.resize(updated.xterm.cols, updated.xterm.rows); term.resizeTerm(); editor.classList.remove('error'); localStorage.options = updatedConf;