chore: disable rules in oxlint (#9154)

This commit is contained in:
Brooooooklyn
2024-12-13 10:49:35 +00:00
parent 2452ccd1e5
commit ea746e3d77
53 changed files with 621 additions and 269 deletions

View File

@@ -86,10 +86,14 @@ framework.impl(ValidatorProvider, {
});
framework.impl(VirtualKeyboardProvider, {
addEventListener: (event, callback) => {
Keyboard.addListener(event as any, callback as any);
Keyboard.addListener(event as any, callback as any).catch(e => {
console.error(e);
});
},
removeAllListeners: () => {
Keyboard.removeAllListeners();
Keyboard.removeAllListeners().catch(e => {
console.error(e);
});
},
});
framework.impl(NavigationGestureProvider, {
@@ -145,6 +149,8 @@ CapacitorApp.addListener('appUrlOpen', ({ url }) => {
.catch(console.error);
}
}
}).catch(e => {
console.error(e);
});
export function App() {

View File

@@ -115,7 +115,7 @@ const convertBody = async (body: unknown, contentType: string) => {
};
function base64ToUint8Array(base64: string) {
const binaryString = atob(base64);
const binaryArray = binaryString.split('').map(function (char) {
const binaryArray = [...binaryString].map(function (char) {
return char.charCodeAt(0);
});
return new Uint8Array(binaryArray);

View File

@@ -13,7 +13,7 @@ class NavigatorVirtualKeyboard implements VirtualKeyboard {
private readonly _overlaysContent = false;
private _listeners = new Map<
private readonly _listeners = new Map<
string,
Set<{
cb: VirtualKeyboardCallback;
@@ -53,11 +53,17 @@ class NavigatorVirtualKeyboard implements VirtualKeyboard {
};
constructor() {
this._bindListener();
this._bindListener().catch(e => {
console.error(e);
});
}
destroy() {
this._capacitorListenerHandles.forEach(handle => handle.remove());
this._capacitorListenerHandles.forEach(handle => {
handle.remove().catch(e => {
console.error(e);
});
});
}
get boundingRect(): DOMRect {
@@ -75,11 +81,15 @@ class NavigatorVirtualKeyboard implements VirtualKeyboard {
}
hide() {
Keyboard.hide();
Keyboard.hide().catch(e => {
console.error(e);
});
}
show() {
Keyboard.show();
Keyboard.show().catch(e => {
console.error(e);
});
}
ongeometrychange: ((this: VirtualKeyboard, ev: Event) => any) | null = null;