mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-13 17:10:06 +00:00
fix: enable no-deprecated-classes tailwind lint rule (#9417)
## Summary Enable `better-tailwindcss/no-deprecated-classes` lint rule and auto-fix all 103 violations across 65 files. First PR in a stacked series for #9300. ## Changes - **What**: Replace deprecated Tailwind v3 classes with v4 equivalents: - `rounded` → `rounded-sm` (85) - `flex-shrink-0` → `shrink-0` (16) - `flex-grow` → `grow` (2) - Enable `no-deprecated-classes` as `'error'` in eslint config - Update one test asserting on `'rounded'` class string ## Review Focus Mechanical auto-fix PR — all changes produced by `eslint --fix`. No visual or behavioral changes (Tailwind v4 aliases these classes identically). Fixes #9300 (partial — 1 of 3 rules) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9417-fix-enable-no-deprecated-classes-tailwind-lint-rule-31a6d73d3650819eaef4cf8ad84fb186) by [Unito](https://www.unito.io) Co-authored-by: Alexander Brown <drjkl@comfy.org>
This commit is contained in:
@@ -33,7 +33,7 @@ const { hasOutputs } = storeToRefs(appModeStore)
|
||||
<i18n-t keypath="linearMode.welcome.getStarted" tag="span">
|
||||
<template #runButton>
|
||||
<span
|
||||
class="inline-flex items-center px-3.5 py-0.5 mx-0.5 transform -translate-y-0.5 rounded bg-primary-background text-base-foreground text-xxs font-medium cursor-default"
|
||||
class="inline-flex items-center px-3.5 py-0.5 mx-0.5 transform -translate-y-0.5 rounded-sm bg-primary-background text-base-foreground text-xxs font-medium cursor-default"
|
||||
>
|
||||
{{ t('menu.run') }}
|
||||
</span>
|
||||
|
||||
@@ -76,7 +76,7 @@ const controlMode = defineModel<ControlOptions>()
|
||||
>
|
||||
<div class="flex items-center gap-2 flex-1 min-w-0 text-wrap">
|
||||
<div
|
||||
class="flex items-center justify-center w-8 h-8 rounded-lg flex-shrink-0 bg-secondary-background border border-border-subtle"
|
||||
class="flex items-center justify-center w-8 h-8 rounded-lg shrink-0 bg-secondary-background border border-border-subtle"
|
||||
>
|
||||
<i
|
||||
v-if="option.icon"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="flex flex-col gap-1">
|
||||
<div class="max-h-[48rem] rounded border p-4">
|
||||
<div class="max-h-[48rem] rounded-sm border p-4">
|
||||
<Chart
|
||||
:type="chartType"
|
||||
:data="chartData"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<Slider
|
||||
:model-value="[modelValue]"
|
||||
v-bind="filteredProps"
|
||||
class="flex-grow text-xs"
|
||||
class="grow text-xs"
|
||||
:step="stepValue"
|
||||
:aria-label="widget.name"
|
||||
@update:model-value="updateLocalValue"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
variant="textonly"
|
||||
size="unset"
|
||||
:aria-label="$t('g.playPause')"
|
||||
class="size-6 rounded"
|
||||
class="size-6 rounded-sm"
|
||||
@click="togglePlayPause"
|
||||
>
|
||||
<i
|
||||
@@ -61,7 +61,7 @@
|
||||
variant="textonly"
|
||||
size="unset"
|
||||
:aria-label="$t('g.volume')"
|
||||
class="size-6 rounded"
|
||||
class="size-6 rounded-sm"
|
||||
@click="toggleMute"
|
||||
>
|
||||
<i
|
||||
@@ -94,7 +94,7 @@
|
||||
variant="textonly"
|
||||
size="unset"
|
||||
:aria-label="$t('g.moreOptions')"
|
||||
class="size-6 rounded"
|
||||
class="size-6 rounded-sm"
|
||||
@click="toggleOptionsMenu"
|
||||
>
|
||||
<i class="text-secondary icon-[lucide--more-vertical] size-4" />
|
||||
|
||||
@@ -93,7 +93,7 @@ describe('FormSelectButton Core Component', () => {
|
||||
expect(button.classes()).toContain('h-6')
|
||||
expect(button.classes()).toContain('px-5')
|
||||
expect(button.classes()).toContain('py-[5px]')
|
||||
expect(button.classes()).toContain('rounded')
|
||||
expect(button.classes()).toContain('rounded-sm')
|
||||
expect(button.classes()).toContain('text-center')
|
||||
expect(button.classes()).toContain('text-xs')
|
||||
expect(button.classes()).toContain('font-normal')
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
:key="getOptionValue(option, index)"
|
||||
:class="
|
||||
cn(
|
||||
'flex-1 min-w-0 h-6 px-5 py-[5px] rounded flex justify-center items-center gap-1 transition-all duration-150 ease-in-out truncate',
|
||||
'flex-1 min-w-0 h-6 px-5 py-[5px] rounded-sm flex justify-center items-center gap-1 transition-all duration-150 ease-in-out truncate',
|
||||
'bg-transparent border-none',
|
||||
'text-center text-xs font-normal',
|
||||
{
|
||||
|
||||
@@ -85,7 +85,7 @@ const theButtonStyle = computed(() =>
|
||||
class="icon-[lucide--chevron-down]"
|
||||
:class="
|
||||
cn(
|
||||
'mr-2 size-4 transition-transform duration-200 flex-shrink-0 text-component-node-foreground-secondary',
|
||||
'mr-2 size-4 transition-transform duration-200 shrink-0 text-component-node-foreground-secondary',
|
||||
isOpen && 'rotate-180'
|
||||
)
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user