From df0ccbca48d3ea6e865a7489fd61df8b297993da Mon Sep 17 00:00:00 2001 From: Danila Poyarkov Date: Mon, 9 Mar 2026 09:48:38 +0300 Subject: [PATCH] Fix no-inline-named-types to match required members only Ignore optional members instead of skipping the entire type. { x: number; y: number; label?: string } now correctly flags as Vector, while { x?: number; y?: number } is still ignored. --- lint/plugin.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lint/plugin.ts b/lint/plugin.ts index 22653b2ee..1e11d74aa 100644 --- a/lint/plugin.ts +++ b/lint/plugin.ts @@ -28,9 +28,10 @@ const noInlineNamedTypes = { ) if (!props || props.length < 2) return - if (props.some((m) => m.optional)) return + const required = props.filter((m) => !m.optional) + if (required.length < 2) return - const shape = props + const shape = required .map((m) => { const typeNode = m.typeAnnotation?.typeAnnotation let typeName = 'unknown'