mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-27 01:39:47 +00:00
fix: enable enforce-canonical-classes tailwind lint rule (#9427)
## Summary Enable `better-tailwindcss/enforce-canonical-classes` lint rule and auto-fix all 611 violations across 173 files. Stacked on #9417. ## Changes - **What**: Simplify Tailwind classes to canonical forms via `eslint --fix`: - `h-X w-X` → `size-X` - `overflow-x-hidden overflow-y-hidden` → `overflow-hidden` - and other canonical simplifications - Enable `enforce-canonical-classes` as `'error'` in eslint config ## Review Focus Mechanical auto-fix PR — all changes produced by `eslint --fix`. No visual or behavioral changes; canonical forms are functionally identical. **Stack:** #9417 → **this PR** → PR 3 (class order) Fixes #9300 (partial — 2 of 3 rules) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9427-fix-enable-enforce-canonical-classes-tailwind-lint-rule-31a6d73d365081a49340d7d4640ede45) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
<!-- Error Message -->
|
||||
<p
|
||||
v-if="error.message"
|
||||
class="m-0 text-sm break-words whitespace-pre-wrap leading-relaxed px-0.5 max-h-[4lh] overflow-y-auto"
|
||||
class="m-0 text-sm/relaxed wrap-break-word whitespace-pre-wrap px-0.5 max-h-[4lh] overflow-y-auto"
|
||||
>
|
||||
{{ error.message }}
|
||||
</p>
|
||||
@@ -66,7 +66,7 @@
|
||||
"
|
||||
>
|
||||
<p
|
||||
class="m-0 text-xs text-muted-foreground break-words whitespace-pre-wrap font-mono leading-relaxed"
|
||||
class="m-0 text-xs/relaxed text-muted-foreground wrap-break-word whitespace-pre-wrap font-mono"
|
||||
>
|
||||
{{ error.details }}
|
||||
</p>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="px-4 pb-2">
|
||||
<!-- Sub-label: cloud or OSS message shown above all pack groups -->
|
||||
<p
|
||||
class="m-0 text-sm text-muted-foreground leading-relaxed"
|
||||
class="m-0 text-sm/relaxed text-muted-foreground"
|
||||
:class="showManagerHint ? 'pb-3' : 'pb-5'"
|
||||
>
|
||||
{{
|
||||
@@ -17,7 +17,7 @@
|
||||
v-if="showManagerHint"
|
||||
keypath="rightSidePanel.missingNodePacks.ossManagerDisabledHint"
|
||||
tag="p"
|
||||
class="m-0 pb-5 text-sm text-muted-foreground leading-relaxed"
|
||||
class="m-0 pb-5 text-sm/relaxed text-muted-foreground"
|
||||
>
|
||||
<template #pipCmd>
|
||||
<code
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
class="icon-[lucide--triangle-alert] size-4 text-warning-background shrink-0 mr-1.5"
|
||||
/>
|
||||
<p
|
||||
class="flex-1 min-w-0 text-sm font-medium overflow-hidden text-ellipsis whitespace-nowrap"
|
||||
class="flex-1 min-w-0 text-sm font-medium truncate"
|
||||
:class="
|
||||
group.packId === null && !group.isResolving
|
||||
? 'text-warning-background'
|
||||
@@ -101,7 +101,7 @@
|
||||
group.packId !== null &&
|
||||
(nodePack || comfyManagerStore.isPackInstalled(group.packId))
|
||||
"
|
||||
class="flex items-start w-full pt-1 pb-1"
|
||||
class="flex items-start w-full py-1"
|
||||
>
|
||||
<Button
|
||||
variant="secondary"
|
||||
@@ -141,7 +141,7 @@
|
||||
<!-- Registry still loading: packId known but result not yet available -->
|
||||
<div
|
||||
v-else-if="group.packId !== null && shouldShowManagerButtons && isLoading"
|
||||
class="flex items-start w-full pt-1 pb-1"
|
||||
class="flex items-start w-full py-1"
|
||||
>
|
||||
<div
|
||||
class="flex flex-1 h-8 items-center justify-center overflow-hidden p-2 rounded-lg min-w-0 bg-secondary-background opacity-60 cursor-not-allowed select-none"
|
||||
@@ -156,7 +156,7 @@
|
||||
<!-- Search in Manager: fetch done but pack not found in registry -->
|
||||
<div
|
||||
v-else-if="group.packId !== null && shouldShowManagerButtons"
|
||||
class="flex items-start w-full pt-1 pb-1"
|
||||
class="flex items-start w-full py-1"
|
||||
>
|
||||
<Button
|
||||
variant="secondary"
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
<i18n-t
|
||||
keypath="rightSidePanel.errorHelp"
|
||||
tag="p"
|
||||
class="m-0 text-sm text-muted-foreground leading-tight break-words"
|
||||
class="m-0 text-sm/tight text-muted-foreground wrap-break-word"
|
||||
>
|
||||
<template #github>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user