AI-native design editor. Open-source Figma alternative.
chore(tests): narrow no-empty-function exceptions
Danila Poyarkov432f945da6b5
diff --git a/oxlint.json b/oxlint.jsonindex 2a3c7edc4..127dcf098 100644--- a/oxlint.json+++ b/oxlint.json@@ -204,16 +204,9 @@},{"files": [- "tests/e2e/autosave.spec.ts",- "tests/e2e/stroke-picker/basic.spec.ts",- "tests/engine/app/font-settings.test.ts",- "tests/engine/pen/var-padding.test.ts","tests/engine/render/canvas/effects.test.ts","tests/engine/render/canvas/text.test.ts",- "tests/engine/tauri/document-io.test.ts",- "tests/engine/text/edit-undo.test.ts",- "tests/engine/tools/ai-adapter.test.ts",- "tests/helpers/undo.ts"+ "tests/engine/text/edit-undo.test.ts"],"rules": {"no-empty-function": "off"@@ -244,32 +237,6 @@"max-lines": "off"}},- {- "files": [- "tests/engine/copy.test.ts",- "tests/engine/editor/selection/**/*.test.ts",- "tests/engine/fig/export/text.test.ts",- "tests/engine/fig/heavy/fixtures.test.ts",- "tests/engine/fig/import/basic.test.ts",- "tests/engine/fig/import/edge-cases.test.ts",- "tests/engine/fig/import/instance-regressions.test.ts",- "tests/engine/fig/import/property-integrity.test.ts",- "tests/engine/fig/roundtrip/basic.test.ts",- "tests/engine/fig/roundtrip/variables.test.ts",- "tests/engine/fonts/normalize-export.test.ts",- "tests/engine/matrix.test.ts",- "tests/engine/mcp/stdio.test.ts",- "tests/engine/editor/nudge.test.ts",- "tests/engine/color/okhcl/**/*.test.ts",- "tests/engine/scene-graph/plugin-data.test.ts",- "tests/engine/render/canvas/cache.test.ts",- "tests/engine/render/jsx/**/*.test.ts",- "tests/engine/text/edit-undo.test.ts"- ],- "rules": {- "typescript/no-non-null-assertion": "error"- }- },{"files": ["scripts/**/*.ts"],"rules": {diff --git a/tests/e2e/autosave.spec.ts b/tests/e2e/autosave.spec.tsindex be2248f6b..873bd2096 100644--- a/tests/e2e/autosave.spec.ts+++ b/tests/e2e/autosave.spec.ts@@ -25,7 +25,7 @@ test('autosave triggers after scene changes with a file handle', async () => {write: async () => {writes++},- close: async () => {}+ close: async () => undefined}const mockHandle = {createWritable: async () => mockWritable@@ -46,8 +46,8 @@ test('autosave triggers after scene changes with a file handle', async () => {// Since fileHandle is a closure variable, we need to trigger the save path// The cleanest way: mock showSaveFilePicker to return our handleconst mockWritable = {- write: async () => {},- close: async () => {}+ write: async () => undefined,+ close: async () => undefined}const mockHandle = {createWritable: async () => mockWritablediff --git a/tests/e2e/stroke-picker/basic.spec.ts b/tests/e2e/stroke-picker/basic.spec.tsindex f8a63d210..33ec30c5e 100644--- a/tests/e2e/stroke-picker/basic.spec.ts+++ b/tests/e2e/stroke-picker/basic.spec.ts@@ -20,7 +20,7 @@ async function openStrokePicker(page: Page) {await page.locator('[data-test-id="stroke-item"] [data-test-id="color-picker-popover"]').waitFor({ state: 'detached' })- .catch(() => {})+ .catch(() => undefined)await page.locator('[data-test-id="stroke-item"] button').first().click()await expect(page.locator('[data-test-id="color-picker-popover"]')).toBeVisible()}diff --git a/tests/engine/app/font-settings.test.ts b/tests/engine/app/font-settings.test.tsindex 1661ab024..e7c89b7b4 100644--- a/tests/engine/app/font-settings.test.ts+++ b/tests/engine/app/font-settings.test.ts@@ -5,14 +5,18 @@ import { useFontSettings, type FontSettingsActions } from '@/components/FontSettfunction actions(overrides: Partial<FontSettingsActions> = {}): FontSettingsActions {let accessState: ReturnType<FontSettingsActions['localFontAccessState']> = 'prompt'return {- async clearDownloadedFontCache() {},+ async clearDownloadedFontCache() {+ return undefined+ },async downloadedFontCacheSummary() {return { count: 2, byteLength: 1_572_864, updatedAt: 1_700_000_000_000 }},localFontAccessState() {return accessState},- async predownloadFallbackFonts() {},+ async predownloadFallbackFonts() {+ return undefined+ },async requestLocalFontAccess() {accessState = 'granted'return ['Inter']diff --git a/tests/engine/pen/var-padding.test.ts b/tests/engine/pen/var-padding.test.tsindex d069ed116..5495d37f0 100644--- a/tests/engine/pen/var-padding.test.ts+++ b/tests/engine/pen/var-padding.test.ts@@ -43,7 +43,7 @@ function makeVarContext(vars: Record<string, number>): VarContext {return typeof val === 'number' ? val : 0},resolveString: () => '',- setActiveTheme: () => {}+ setActiveTheme: () => undefined} as VarContext}diff --git a/tests/engine/tauri/document-io.test.ts b/tests/engine/tauri/document-io.test.tsindex de50d6b42..2c325305c 100644--- a/tests/engine/tauri/document-io.test.ts+++ b/tests/engine/tauri/document-io.test.ts@@ -41,7 +41,7 @@ describe('Tauri document IO helpers', () => {getFilePath: () => '/tmp/document.fig',getFileHandle: () => null,setSavedVersion: (version) => savedVersions.push(version),- setLastWriteTime: () => {}+ setLastWriteTime: () => undefined})await write(new Uint8Array([1, 2, 3]))diff --git a/tests/engine/tools/ai-adapter.test.ts b/tests/engine/tools/ai-adapter.test.tsindex 9020f68ab..0249dbc99 100644--- a/tests/engine/tools/ai-adapter.test.ts+++ b/tests/engine/tools/ai-adapter.test.ts@@ -22,7 +22,7 @@ function setup() {ALL_TOOLS,{getFigma: () => figma,- onAfterExecute: () => {}+ onAfterExecute: () => undefined},{ v, valibotSchema, tool })diff --git a/tests/helpers/undo.ts b/tests/helpers/undo.tsindex 49bd828e1..86b736a6d 100644--- a/tests/helpers/undo.ts+++ b/tests/helpers/undo.ts@@ -1,6 +1,8 @@import { UndoManager } from '@open-pencil/core'-export function noop() {}+export function noop() {+ return undefined+}export function createUndoManager(options?: ConstructorParameters<typeof UndoManager>[0]) {return new UndoManager(options)