mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-23 20:18:42 +08:00
chore: disable rules in oxlint (#9154)
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
"@affine-test/kit": "workspace:*",
|
||||
"@affine/component": "workspace:*",
|
||||
"@affine/core": "workspace:*",
|
||||
"@affine/electron-api": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@affine/native": "workspace:*",
|
||||
"@affine/nbstore": "workspace:*",
|
||||
@@ -48,9 +49,12 @@
|
||||
"@toeverything/infra": "workspace:*",
|
||||
"@types/set-cookie-parser": "^2.4.10",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"@vanilla-extract/css": "^1.16.1",
|
||||
"@vitejs/plugin-react-swc": "^3.7.2",
|
||||
"app-builder-lib": "^25.1.8",
|
||||
"builder-util-runtime": "^9.2.10",
|
||||
"cross-env": "^7.0.3",
|
||||
"debug": "^4.4.0",
|
||||
"electron": "^33.3.0",
|
||||
"electron-log": "^5.2.4",
|
||||
"electron-squirrel-startup": "1.0.1",
|
||||
@@ -59,6 +63,7 @@
|
||||
"fs-extra": "^11.2.0",
|
||||
"glob": "^11.0.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
"msw": "^2.6.8",
|
||||
"nanoid": "^5.0.9",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0",
|
||||
|
||||
@@ -80,7 +80,9 @@ async function watchLayers() {
|
||||
console.log(`[layers] has changed, [re]launching electron...`);
|
||||
spawnOrReloadElectron();
|
||||
} else {
|
||||
buildContextPromise.then(resolve);
|
||||
buildContextPromise.then(resolve).catch(e => {
|
||||
console.error(e);
|
||||
});
|
||||
initialBuild = true;
|
||||
}
|
||||
});
|
||||
@@ -88,9 +90,13 @@ async function watchLayers() {
|
||||
},
|
||||
],
|
||||
});
|
||||
buildContextPromise.then(async buildContext => {
|
||||
await buildContext.watch();
|
||||
});
|
||||
buildContextPromise
|
||||
.then(buildContext => {
|
||||
return buildContext.watch();
|
||||
})
|
||||
.catch(e => {
|
||||
console.error(e);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -89,4 +89,6 @@ async function make() {
|
||||
await fs.remove(tmpPath);
|
||||
}
|
||||
|
||||
make();
|
||||
make().catch(e => {
|
||||
console.error(e);
|
||||
});
|
||||
|
||||
@@ -79,4 +79,6 @@ async function make() {
|
||||
return artifacts;
|
||||
}
|
||||
|
||||
make();
|
||||
make().catch(e => {
|
||||
console.error(e);
|
||||
});
|
||||
|
||||
@@ -33,6 +33,7 @@ if (overrideSession) {
|
||||
app.setPath('sessionData', userDataPath);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
if (require('electron-squirrel-startup')) app.quit();
|
||||
|
||||
if (process.env.SKIP_ONBOARDING) {
|
||||
|
||||
@@ -50,6 +50,6 @@ export const SpellCheckStateSchema = z.object({
|
||||
enabled: z.boolean().optional(),
|
||||
});
|
||||
|
||||
export const SpellCheckStateKey = 'spellCheckState';
|
||||
export type SpellCheckStateKey = typeof SpellCheckStateKey;
|
||||
export const SpellCheckStateKey = 'spellCheckState' as const;
|
||||
// eslint-disable-next-line no-redeclare
|
||||
export type SpellCheckStateSchema = z.infer<typeof SpellCheckStateSchema>;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user