forked from Blendman974/faceclaw
Introduce oxlint, and fix lint warnings
This commit is contained in:
1 parent
cb6dddd120
commit
06146c2b08
89 files changed
+818
-469
No files matched your search
@@ -57,7 +57,7 @@ export function loadMicConfig(): MicConfig {
|
||||
return {
|
||||
...defaults,
|
||||
...parsed,
|
||||
hostMics: { ...defaults.hostMics, ...(parsed.hostMics ?? {}) },
|
||||
hostMics: { ...defaults.hostMics, ...parsed.hostMics },
|
||||
};
|
||||
} catch {
|
||||
return defaultMicConfig();
|
||||
@@ -72,8 +72,8 @@ class MicArrayController {
|
||||
private readonly statusListeners = new Set<(statuses: MicArrayStatuses) => void>();
|
||||
private statuses: MicArrayStatuses = { left: null, right: null };
|
||||
// The Java listener proxy must stay referenced or it gets GC'd.
|
||||
private statusProxy: any | null = null;
|
||||
private proxyCommunicator: any | null = null;
|
||||
private statusProxy: any = null;
|
||||
private proxyCommunicator: any = null;
|
||||
private leaseTimer: ReturnType<typeof setInterval> | null = null;
|
||||
private armed = false;
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ import {
|
||||
type HeadOrientation,
|
||||
} from "./dsp";
|
||||
import { micArrayController, micControlSupported, loadMicConfig, saveMicConfig } from "./mic-control";
|
||||
import type { MicConfig } from "./mic-protocol";
|
||||
import { micModelPath } from "./mic-models";
|
||||
import {
|
||||
MIC_CHANNEL_KEYS,
|
||||
@@ -27,6 +26,7 @@ import {
|
||||
splitConcatenatedPcm16,
|
||||
templeActive,
|
||||
type MicChannelKey,
|
||||
type MicConfig,
|
||||
type MicSide,
|
||||
} from "./mic-protocol";
|
||||
import {
|
||||
@@ -158,8 +158,8 @@ class MicSession {
|
||||
|
||||
// Captions state.
|
||||
private captionLines: CaptionLine[] = [];
|
||||
private captionEngine: any | null = null;
|
||||
private captionListenerProxy: any | null = null;
|
||||
private captionEngine: any = null;
|
||||
private captionListenerProxy: any = null;
|
||||
private captionsActive = false;
|
||||
private engineStartWallMs = 0;
|
||||
private sessionRowId = -1;
|
||||
@@ -168,7 +168,7 @@ class MicSession {
|
||||
private conversationLang = "und";
|
||||
|
||||
// Recording state.
|
||||
private recorder: any | null = null;
|
||||
private recorder: any = null;
|
||||
private recordingPath = "";
|
||||
|
||||
// Stock path subscriptions.
|
||||
@@ -177,7 +177,7 @@ class MicSession {
|
||||
private offCompass: (() => void) | null = null;
|
||||
|
||||
// Extended path.
|
||||
private forwardingProxy: any | null = null;
|
||||
private forwardingProxy: any = null;
|
||||
private temples = new Map<MicSide, TempleAudioPipeline>();
|
||||
private templeAngles: { left: number | null; right: number | null } = { left: null, right: null };
|
||||
private templeSsr: { left: number; right: number } = { left: 0, right: 0 };
|
||||
@@ -193,7 +193,7 @@ class MicSession {
|
||||
private offVoiceActivity: (() => void) | null = null;
|
||||
|
||||
// Phone-side spectral noise suppressor (FaceclawNoiseSuppressor).
|
||||
private suppressor: any | null = null;
|
||||
private suppressor: any = null;
|
||||
private suppressorEngine = "";
|
||||
|
||||
// True between the caption engine's speech-start event and the utterance
|
||||
|
||||
@@ -8,7 +8,7 @@ declare const java: any;
|
||||
* translation to the phone's default language beneath it.
|
||||
*/
|
||||
|
||||
let languageIdentifier: any | null = null;
|
||||
let languageIdentifier: any = null;
|
||||
// Translators are expensive to build (model download on first use); cache by
|
||||
// "src>dst" and keep the proxies referenced so they aren't GC'd mid-flight.
|
||||
const translators = new Map<string, any>();
|
||||
@@ -59,7 +59,7 @@ export function identifyLanguage(text: string): Promise<string> {
|
||||
});
|
||||
}
|
||||
|
||||
function translatorFor(sourceLang: string, targetLang: string): any | null {
|
||||
function translatorFor(sourceLang: string, targetLang: string): any {
|
||||
const key = `${sourceLang}>${targetLang}`;
|
||||
const cached = translators.get(key);
|
||||
if (cached) return cached;
|
||||
|
||||
Reference in new issue
Block a user