fix: resolve remaining lint errors (max-depth, prettier, blank line)

- Flatten image validation nesting to max 4 levels (eslint max-depth)
- Collapse multi-line ternary to single line (prettier)
- Add missing blank line before statement

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Renato Alcara
2026-02-14 22:01:10 -03:00
parent fcbfbafc06
commit 02e32b4906
2 changed files with 18 additions and 24 deletions
+2 -6
View File
@@ -1536,12 +1536,8 @@ export const makeMessagesSocket = (config: SocketConfig) => {
if (!node) return ''
const pad = ' '.repeat(indent)
const tag = node.tag || '?'
const attrEntries = node.attrs
? Object.entries(node.attrs).filter(([, v]) => v !== undefined && v !== null)
: []
const attrStr = attrEntries.length > 0
? ' ' + attrEntries.map(([k, v]) => `${k}="${v}"`).join(' ')
: ''
const attrEntries = node.attrs ? Object.entries(node.attrs).filter(([, v]) => v != null) : []
const attrStr = attrEntries.length > 0 ? ' ' + attrEntries.map(([k, v]) => `${k}="${v}"`).join(' ') : ''
if (!node.content) return `${pad}<${tag}${attrStr}/>`