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

@@ -90,7 +90,7 @@ test.skip('use keyboard copy inside code block copy', async ({
await type(page, 'use');
await page.keyboard.down('Shift');
// eslint-disable-next-line @typescript-eslint/prefer-for-of
// oxlint-disable-next-line @typescript-eslint/prefer-for-of
for (let i = 0; i < 'use'.length; i++) {
await page.keyboard.press('ArrowLeft');
}

View File

@@ -1376,7 +1376,7 @@ test('scroll should update dragging area and select blocks when dragging', async
await initParagraphsByCount(page, 20);
await page.mouse.click(0, 0);
// eslint-disable-next-line sonarjs/no-identical-functions
// oxlint-disable-next-line sonarjs/no-identical-functions
async function getViewportScrollTop() {
return page.evaluate(() => {
const viewport = document.querySelector('.affine-page-viewport');

View File

@@ -240,7 +240,7 @@ export async function enterPlaygroundWithList(
title: new window.$blocksuite.store.Text(),
});
const noteId = doc.addBlock('affine:note', {}, rootId);
// eslint-disable-next-line @typescript-eslint/prefer-for-of
// oxlint-disable-next-line @typescript-eslint/prefer-for-of
for (let i = 0; i < contents.length; i++) {
doc.addBlock(
'affine:list',
@@ -799,7 +799,7 @@ export async function getClipboardHTML(page: Page) {
const indentAfter = ' '.repeat(level >= 2 ? level - 2 : 0);
let textNode;
// eslint-disable-next-line @typescript-eslint/prefer-for-of
// oxlint-disable-next-line @typescript-eslint/prefer-for-of
for (let i = 0; i < node.children.length; i++) {
textNode = document.createTextNode('\n' + indentBefore);
node.insertBefore(textNode, node.children[i]);