mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 11:06:25 +08:00
chore: bump oxlint & enable more supported rules (#14769)
This commit is contained in:
@@ -110,7 +110,7 @@ export class RangeControl {
|
||||
if (current === start) {
|
||||
startRecorded = true;
|
||||
}
|
||||
// eslint-disable-next-line sonarjs/no-collapsible-if
|
||||
// oxlint-disable-next-line sonarjs/no-collapsible-if
|
||||
if (startRecorded) {
|
||||
if (
|
||||
current.nodeType === Node.TEXT_NODE ||
|
||||
|
||||
@@ -123,7 +123,7 @@ export class DeltaService<TextAttributes extends BaseTextAttributes> {
|
||||
const deltas = this.editor.embedDeltas;
|
||||
const result: Result[] = [];
|
||||
|
||||
// eslint-disable-next-line sonarjs/no-ignored-return
|
||||
// oxlint-disable-next-line sonarjs/no-ignored-return
|
||||
deltas.reduce((rangeIndex, delta, deltaIndex) => {
|
||||
const length = delta.insert.length;
|
||||
const from = inlineRange.index - length;
|
||||
|
||||
@@ -260,7 +260,7 @@ export function inlineRangeToDomRange(
|
||||
let focusOffset = 0;
|
||||
let index = 0;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
||||
// oxlint-disable-next-line @typescript-eslint/prefer-for-of
|
||||
for (let i = 0; i < lineElements.length; i++) {
|
||||
if (startText && endText) {
|
||||
break;
|
||||
|
||||
@@ -248,7 +248,7 @@ export function toGfxBlockComponent<
|
||||
return GfxBlockComponent.prototype.getCSSTransform.call(this);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line sonarjs/no-identical-functions
|
||||
// oxlint-disable-next-line sonarjs/no-identical-functions
|
||||
getRenderingRect(): {
|
||||
x: number;
|
||||
y: number;
|
||||
@@ -290,7 +290,7 @@ export function toGfxBlockComponent<
|
||||
return super.renderBlock();
|
||||
}
|
||||
|
||||
// eslint-disable-next-line sonarjs/no-identical-functions
|
||||
// oxlint-disable-next-line sonarjs/no-identical-functions
|
||||
override async scheduleUpdate() {
|
||||
const parent = this.parentElement;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user