fix: enforce no-leaked-conditional-rendering as error and fix violations (#31262)

Co-authored-by: Stephen Zhou <38493346+hyoban@users.noreply.github.com>
This commit is contained in:
byteforge
2026-01-20 10:08:59 -05:00
committed by GitHub
parent 8f949d503a
commit 8056768106
59 changed files with 80 additions and 80 deletions

View File

@ -275,7 +275,7 @@ const BaseNode: FC<BaseNodeProps> = ({
}
</div>
{
data._iterationLength && data._iterationIndex && data._runningStatus === NodeRunningStatus.Running && (
!!(data._iterationLength && data._iterationIndex && data._runningStatus === NodeRunningStatus.Running) && (
<div className="mr-1.5 text-xs font-medium text-text-accent">
{data._iterationIndex > data._iterationLength ? data._iterationLength : data._iterationIndex}
/
@ -284,7 +284,7 @@ const BaseNode: FC<BaseNodeProps> = ({
)
}
{
data.type === BlockEnum.Loop && data._loopIndex && LoopIndex
!!(data.type === BlockEnum.Loop && data._loopIndex) && LoopIndex
}
{
isLoading
@ -327,7 +327,7 @@ const BaseNode: FC<BaseNodeProps> = ({
)
}
{
data.desc && data.type !== BlockEnum.Iteration && data.type !== BlockEnum.Loop && (
!!(data.desc && data.type !== BlockEnum.Iteration && data.type !== BlockEnum.Loop) && (
<div className="system-xs-regular whitespace-pre-line break-words px-3 pb-2 pt-1 text-text-tertiary">
{data.desc}
</div>