Skip to content

Commit

Permalink
Fixed linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
evg4b committed Dec 8, 2024
1 parent 239ca63 commit 89a1b3e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/content-script/ui/query-input/query-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const brackets: Record<string, string> = {
'[': ']',
'(': ')',
'{': '}',
"'": "'",
'\'': '\'',
'"': '"',
'`': '`',
};
Expand Down Expand Up @@ -91,7 +91,7 @@ export class QueryInputElement extends StyledComponentElement {
input.addEventListener('keydown', event => {
this.setErrorMessage(null);
if (isSubmitEvent(event)) {
this.onSubmitEvent(event);
this.onSubmitEvent();
}
if (isWrapEvent(event, brackets)) {
this.onWrapEvent(event);
Expand All @@ -107,7 +107,7 @@ export class QueryInputElement extends StyledComponentElement {
input.addEventListener('input', this.saveState.bind(this));
}

private onSubmitEvent(_: KeyboardEvent) {
private onSubmitEvent() {
this.onSubmitCallback?.(this.input.value);
}

Expand All @@ -118,7 +118,7 @@ export class QueryInputElement extends StyledComponentElement {
event.preventDefault();
this.saveState();
const selectedText = this.input.value.substring(start, end);
this.input.setRangeText(`${event.key}${selectedText}${brackets[event.key]}`);
this.input.setRangeText(`${ event.key }${ selectedText }${ brackets[event.key] }`);
this.input.setSelectionRange(start + 1, end + 1);
}
}
Expand Down

0 comments on commit 89a1b3e

Please sign in to comment.