Introduce oxlint, and fix lint warnings

This commit is contained in:
James Babcock committed 2026-09-29 11:54:22 -07:00
1 parent cb6dddd120
commit 06146c2b08
89 files changed
+818 -469

No files matched your search

+2 -2
View File
@@ -1,4 +1,4 @@
import { Application } from "@nativescript/core";
import { Utils } from "@nativescript/core";
export function hmacSha256Base64(secret: string, message: string): string {
const charset = java.nio.charset.StandardCharsets.UTF_8;
@@ -10,7 +10,7 @@ export function hmacSha256Base64(secret: string, message: string): string {
}
export function getPhoneOpenUdid(): string {
const resolver = Application.android.context?.getContentResolver();
const resolver = Utils.android.getApplicationContext()?.getContentResolver();
const id = resolver ? String(android.provider.Settings.Secure.getString(resolver, android.provider.Settings.Secure.ANDROID_ID) ?? "") : "";
if (!id) throw new Error("Android did not provide a device ID for EvenHub authentication.");
return id;
+1 -1
View File
@@ -22,7 +22,7 @@ export type EvenHubPermissionName =
| "album"
| "camera"
| "fs"
| string;
| (string & {});
export type EvenHubPermission = {
name: EvenHubPermissionName;
+1 -1
View File
@@ -1177,7 +1177,7 @@ export class EvenHubSession implements EvenHubMicClient, EvenHubImuClient, EvenH
}
return out;
};
if (requested.length === 0 || requested.every((id) => this.grantedApiKeys.has(id))) {
if (requested.every((id) => this.grantedApiKeys.has(id))) {
return Promise.resolve(buildGrant());
}
if (!this.windowHooks) return Promise.resolve({});
+1 -1
View File
@@ -73,7 +73,7 @@ export async function checkForEvenHubUpdates(
onProgress?: (done: number, total: number) => void,
): Promise<EvenHubAppUpdate[]> {
const installed = getInstalledEvenHubApps();
const results: EvenHubAppUpdate[] = new Array(installed.length);
const results: EvenHubAppUpdate[] = [];
let next = 0;
let done = 0;
const worker = async () => {