chore: bump oxlint & enable more supported rules (#14769)

This commit is contained in:
DarkSky
2026-04-03 03:36:52 +08:00
committed by GitHub
parent cdadf8588a
commit 233004f867
285 changed files with 937 additions and 1983 deletions

View File

@@ -22,7 +22,6 @@
"@toeverything/infra": "workspace:*",
"eventemitter2": "^6.4.9",
"graphemer": "^1.4.0",
"lib0": "^0.2.114",
"lodash-es": "^4.17.23",
"nanoid": "^5.1.6",
"rxjs": "^7.8.2",

View File

@@ -102,7 +102,7 @@ export class IntegerInvertedIndex implements InvertedIndex {
return match;
}
// eslint-disable-next-line sonarjs/no-identical-functions
// oxlint-disable-next-line sonarjs/no-identical-functions
async all(trx: DataStructROTransaction): Promise<Match> {
const objs = await trx
.objectStore('invertedIndex')
@@ -149,7 +149,7 @@ export class BooleanInvertedIndex implements InvertedIndex {
readonly fieldKey: string
) {}
// eslint-disable-next-line sonarjs/no-identical-functions
// oxlint-disable-next-line sonarjs/no-identical-functions
async all(trx: DataStructROTransaction): Promise<Match> {
const objs = await trx
.objectStore('invertedIndex')
@@ -350,7 +350,7 @@ export class FullTextInvertedIndex implements InvertedIndex {
return match;
}
// eslint-disable-next-line sonarjs/no-identical-functions
// oxlint-disable-next-line sonarjs/no-identical-functions
async all(trx: DataStructROTransaction): Promise<Match> {
const objs = await trx
.objectStore('invertedIndex')

View File

@@ -26,7 +26,7 @@ export class Lock {
private release: () => void = () => {};
async acquire() {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
// oxlint-disable-next-line @typescript-eslint/no-non-null-assertion
let release: () => void = null!;
const nextLock = new Promise<void>(resolve => {
release = resolve;

View File

@@ -190,7 +190,7 @@ export class BlobSyncImpl implements BlobSync {
): Promise<void> {
return Promise.race([
Promise.all(
// eslint-disable-next-line @typescript-eslint/await-thenable
// oxlint-disable-next-line @typescript-eslint/await-thenable
peerId
? [this.fullDownloadPeer(peerId)]
: this.peers.map(p => this.fullDownloadPeer(p.peerId))

View File

@@ -94,7 +94,7 @@ export class BlobSyncPeer {
Math.pow(2, attempts - 1) * backoffRetry.delay,
backoffRetry.maxDelay
);
// eslint-disable-next-line @typescript-eslint/no-misused-promises
// oxlint-disable-next-line @typescript-eslint/no-misused-promises
setTimeout(attempt, waitTime);
} else {
// reach the max retry times, resolve the promise with false
@@ -107,7 +107,7 @@ export class BlobSyncPeer {
}
};
// eslint-disable-next-line @typescript-eslint/no-floating-promises
// oxlint-disable-next-line @typescript-eslint/no-floating-promises
attempt();
})
.catch(error => {