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
@@ -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;