Restore ESLint and Prettier auto-formatting and CI linting (#1457)

* Restore ESLint and Prettier autoformatting

* Fix formatting and lints in web files

* Hacky fix to eslint crash

* Fix remaining lints

* Add lint-fix script

---------

Co-authored-by: 0hypercube <0hypercube@gmail.com>
This commit is contained in:
Keavon Chambers
2023-11-16 13:12:47 -08:00
committed by GitHub
co-authored by 0hypercube
parent 9784d31edb
commit a6ca43bb2d
63 changed files with 5869 additions and 351 deletions
+5 -5
View File
@@ -1,4 +1,4 @@
import {writable} from "svelte/store";
import { writable } from "svelte/store";
import { type IconName } from "@graphite/utility-functions/icons";
import { type Editor } from "@graphite/wasm-communication/editor";
@@ -17,18 +17,18 @@ export function createDialogState(editor: Editor) {
panicDetails: "",
});
function dismissDialog(): void {
function dismissDialog() {
update((state) => {
// Disallow dismissing the crash dialog since it can confuse users why the app stopped responding if they dismiss it without realizing what it means
if (state.panicDetails === "") state.visible = false;
return state;
});
}
// Creates a crash dialog from JS once the editor has panicked.
// Normal dialogs are created in the Rust backend, but for the crash dialog, the editor instance has panicked so it cannot respond to widget callbacks.
function createCrashDialog(panicDetails: string): void {
function createCrashDialog(panicDetails: string) {
update((state) => {
state.visible = true;
@@ -51,7 +51,7 @@ export function createDialogState(editor: Editor) {
state.title = displayDialog.title;
state.icon = displayDialog.icon;
return state;
});
});