Skip to content

Commit

Permalink
fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
butlerx committed Aug 2, 2022
1 parent 1e4f173 commit 6f46649
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/assets/xterm_config/functionality.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ function optionNumberSet(value) {
}

const allOptions = [];
/* eslint-disable @typescript-eslint/no-unused-vars */

function inflateOptions(optionsSchema) {
const booleanOption = document.querySelector('#boolean_option.templ');
const enumOption = document.querySelector('#enum_option.templ');
Expand Down Expand Up @@ -132,8 +134,9 @@ window.loadOptions = config => {
};

if (window.top === window)
// eslint-disable-next-line no-alert
alert(
'Error: Page is top level. This page is supposed to be accessed from inside Wetty.',
'Error: Page is top level. This page is supposed to be accessed from inside WeTTY.',
);

function saveConfig() {
Expand Down
4 changes: 2 additions & 2 deletions src/assets/xterm_config/xterm_color_theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@ window.inflateOptions([
},
]);

selectionColorOption.get = function () {
selectionColorOption.get = function getInput() {
return (
this.el.querySelector('input').value +
Math.round(
selectionColorOpacityOption.el.querySelector('input').value * 255,
).toString(16)
);
};
selectionColorOption.set = function (value) {
selectionColorOption.set = function setInput(value) {
this.el.querySelector('input').value = value.substring(0, 7);
selectionColorOpacityOption.el.querySelector('input').value =
Math.round((parseInt(value.substring(7), 16) / 255) * 100) / 100;
Expand Down
2 changes: 2 additions & 0 deletions src/client/wetty/term/confiruragtion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ export function configureTerm(term: Term): void {

function editorOnLoad() {
editor?.contentWindow?.loadOptions(loadOptions());
/* eslint-disable @typescript-eslint/no-non-null-assertion */
editor.contentWindow!.wetty_close_config = () => {
optionsElem?.classList.toggle('opened');
};
editor.contentWindow!.wetty_save_config = (newConfig: Options) => {
onInput(term, newConfig);
};
/* eslint-enable @typescript-eslint/no-non-null-assertion */
}
if (
(
Expand Down
2 changes: 1 addition & 1 deletion src/client/wetty/term/confiruragtion/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const onInput = (term: Term, updated: Options) => {
editor.classList.remove('error');
localStorage.options = updatedConf;
} catch (e) {
console.error('Configuration Error', e);
console.error('Configuration Error', e); // eslint-disable-line no-console
editor.classList.add('error');
}
};
Expand Down

0 comments on commit 6f46649

Please sign in to comment.