[refactor] remove 6 floating-promise ignores (#5985)

* Remove trivial floating promise in authMachine

* Add catch statement so LSP promise is considered non-floating

* Remove trivial float in AllSettingsFields

* Add error reporting for ensureWasmInit

* Remove pointless floating promise in Modeling

* Add comment and reportRejection to floating promise in "set selection"

* Read comment, put back await that should be there

* Fix dumb imports rebase botch

* Missed an import

---------

Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
This commit is contained in:
Frank Noirot
2025-04-02 22:53:10 -04:00
committed by GitHub
parent 1fe1cfb397
commit 3e4505e2e3
5 changed files with 26 additions and 19 deletions

View File

@ -20,7 +20,7 @@ import {
import type ModelingAppFile from '@src/lib/modelingAppFile'
import type { DefaultPlaneStr } from '@src/lib/planes'
import { defaultPlaneStrToKey } from '@src/lib/planes'
import { err } from '@src/lib/trap'
import { err, reportRejection } from '@src/lib/trap'
import type { DeepPartial } from '@src/lib/types'
import type { ModuleType } from '@src/lib/wasm_lib_wrapper'
import { getModule } from '@src/lib/wasm_lib_wrapper'
@ -48,10 +48,11 @@ export default class RustContext {
constructor(engineCommandManager: EngineCommandManager) {
this.engineCommandManager = engineCommandManager
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.ensureWasmInit().then(async () => {
this.ctxInstance = await this.create()
})
this.ensureWasmInit()
.then(async () => {
this.ctxInstance = await this.create()
})
.catch(reportRejection)
}
// Create a new context instance