Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
fix(harper.js): `just format`
Elijah Potterd5b930c0fa0d
diff --git a/packages/harper.js/src/BinaryModule.ts b/packages/harper.js/src/BinaryModule.tsindex 8a7b96c92..71d59a74b 100644--- a/packages/harper.js/src/BinaryModule.ts+++ b/packages/harper.js/src/BinaryModule.ts@@ -21,8 +21,13 @@ function inferGlueFlavor(binary: string): WasmGlueFlavor {* older/custom BinaryModule-like objects remain structurally compatible. When it is* absent, fall back to inferring the flavor from the binary URL.*/-export function resolveWasmGlueFlavor(binary: Pick<BinaryModule, 'url' | 'glueFlavor'>): WasmGlueFlavor {- return binary.glueFlavor ?? inferGlueFlavor(typeof binary.url === 'string' ? binary.url : binary.url.href);+export function resolveWasmGlueFlavor(+ binary: Pick<BinaryModule, 'url' | 'glueFlavor'>,+): WasmGlueFlavor {+ return (+ binary.glueFlavor ??+ inferGlueFlavor(typeof binary.url === 'string' ? binary.url : binary.url.href)+ );}function loadGlue(glueFlavor: WasmGlueFlavor): WasmModule {diff --git a/packages/harper.js/src/WorkerLinter/index.ts b/packages/harper.js/src/WorkerLinter/index.tsindex 56f989a1e..6df2c0630 100644--- a/packages/harper.js/src/WorkerLinter/index.ts+++ b/packages/harper.js/src/WorkerLinter/index.ts@@ -1,5 +1,5 @@import type { Dialect, Lint, Suggestion } from 'harper-wasm';-import { resolveWasmGlueFlavor, type BinaryModule } from '../BinaryModule';+import { type BinaryModule, resolveWasmGlueFlavor } from '../BinaryModule';import type Linter from '../Linter';import type { LinterInit, WeirpackTestFailures } from '../Linter';import type { LintConfig, LintOptions, StructuredLintConfig } from '../main';@@ -38,11 +38,7 @@ export default class WorkerLinter implements Linter {this.worker.onmessage = () => {this.setupMainEventListeners();- this.worker.postMessage([- this.binary.url,- this.dialect,- resolveWasmGlueFlavor(this.binary),- ]);+ this.worker.postMessage([this.binary.url, this.dialect, resolveWasmGlueFlavor(this.binary)]);this.working = false;this.submitRemainingRequests();