Fix theme editor lint warnings
Local Build and Deploy / deploy (push) Successful in 59s

- Remove unused eslint-disable directive in preset swatches
- Add safe eslint-disable for controlled bgKey lookup in ColorField renderer
This commit is contained in:
openhands committed 2026-07-13 20:06:48 +02:00
1 parent acc820284b
commit cb4a6a8f3e
1 file changed
+1 -1
+1 -1
View File
@@ -87,6 +87,7 @@ function colorFields(
{fields.map((f) => {
const val = toHex(current[f.key], f.def);
const bgKey = f.bgKey ? `${f.bgKey}${suffix}` : undefined;
// eslint-disable-next-line security/detect-object-injection -- bgKey derived from hardcoded field list
const bgValue = bgKey ? toHex(current[bgKey], "") : undefined;
return (
<ColorField
@@ -178,7 +179,6 @@ export default async function AdminTheme({
width: 14,
height: 14,
borderRadius: 3,
// eslint-disable-next-line security/detect-object-injection -- k from hardcoded array
background: palette.light[k as keyof typeof palette.light],
boxShadow: "inset 0 0 0 1px rgba(0,0,0,0.15)",
marginLeft: -3,