Disallow snake_case variable names in frontend

This commit is contained in:
Keavon Chambers
2021-08-12 21:43:50 -07:00
parent 35d7fe8860
commit 47af8d9bed
8 changed files with 29 additions and 46 deletions
+1 -2
View File
@@ -13,8 +13,7 @@ const state = reactive({
});
export async function selectDocument(tabIndex: number) {
const { select_document } = await wasm;
select_document(tabIndex);
(await wasm).select_document(tabIndex);
}
export async function closeDocumentWithConfirmation(tabIndex: number) {
+2 -4
View File
@@ -34,9 +34,8 @@ export function shouldRedirectKeyboardEventToBackend(e: KeyboardEvent): boolean
export async function handleKeyDown(e: KeyboardEvent) {
if (shouldRedirectKeyboardEventToBackend(e)) {
e.preventDefault();
const { on_key_down } = await wasm;
const modifiers = makeModifiersBitfield(e.ctrlKey, e.shiftKey, e.altKey);
on_key_down(e.key, modifiers);
(await wasm).on_key_down(e.key, modifiers);
return;
}
@@ -52,9 +51,8 @@ export async function handleKeyDown(e: KeyboardEvent) {
export async function handleKeyUp(e: KeyboardEvent) {
if (shouldRedirectKeyboardEventToBackend(e)) {
e.preventDefault();
const { on_key_up } = await wasm;
const modifiers = makeModifiersBitfield(e.ctrlKey, e.shiftKey, e.altKey);
on_key_up(e.key, modifiers);
(await wasm).on_key_up(e.key, modifiers);
}
}
+3 -2
View File
@@ -1,6 +1,7 @@
import { reactive } from "vue";
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable camelcase */
import { reactive } from "vue";
type ResponseCallback = (responseData: Response) => void;
type ResponseMap = {