chore: bump oxlint & enable more supported rules (#14769)
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user