Skip to content

Commit 682220e

Browse files
committed
chore(eslint): implement eslint-tailwind-beta to work with tailwind v4
1 parent aeaa4f1 commit 682220e

File tree

67 files changed

+332
-327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+332
-327
lines changed

eslint.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import react from 'eslint-plugin-react'
44
import reactRefresh from 'eslint-plugin-react-refresh'
55
import reactHooks from 'eslint-plugin-react-hooks'
66
import prettier from 'eslint-config-prettier'
7+
import tailwind from 'eslint-plugin-tailwindcss'
78

89
export default tseslint.config(
910
eslint.configs.recommended,
@@ -33,7 +34,9 @@ export default tseslint.config(
3334
react,
3435
'react-refresh': reactRefresh,
3536
'react-hooks': reactHooks,
37+
tailwindcss: tailwind,
3638
},
39+
3740
rules: {
3841
// ...react.configs.recommended.rules,
3942
// ...react.configs['jsx-runtime'].rules,
@@ -45,7 +48,9 @@ export default tseslint.config(
4548
{ ignoreRestSiblings: true, argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' },
4649
],
4750
'@typescript-eslint/no-empty-object-type': 'off',
51+
'tailwindcss/classnames-order': 'warn',
4852
},
53+
settings: { tailwindcss: { config: false } },
4954
},
5055
prettier
5156
)

src/features/app-interfaces/components/create/app-details.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export function AppDetails({ machine }: Props) {
118118

119119
return (
120120
<Form
121-
className="duration-300 animate-in fade-in-20"
121+
className="animate-in fade-in-20 duration-300"
122122
schema={schema}
123123
onSubmit={next}
124124
defaultValues={defaultValues}

src/features/app-interfaces/components/create/deploy-app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export function DeployApp({ machine }: Props) {
243243
}, [methodDefinitions, appSpec, openDialog])
244244

245245
return (
246-
<div className="duration-300 animate-in fade-in-20">
246+
<div className="animate-in fade-in-20 duration-300">
247247
{transactions.length === 0 && (
248248
<div className="mb-4">
249249
<DescriptionList items={deploymentOptions} dtClassName="self-center" />

src/features/app-interfaces/components/create/deployment-details.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export function DeploymentDetails({ machine }: Props) {
223223

224224
return (
225225
<Form
226-
className="duration-300 animate-in fade-in-20"
226+
className="animate-in fade-in-20 duration-300"
227227
schema={formSchema}
228228
onSubmit={next}
229229
defaultValues={defaultValues}

src/features/app-interfaces/components/create/from-deployment-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function FromDeploymentCard({ machine }: Props) {
3232
<span>Deploy a new app and create an app interface.</span>
3333
</div>
3434
<div className="flex grow flex-col">
35-
<div className="plausible-event-name=app-lab-deploy-new-app ml-auto mt-auto">
35+
<div className="plausible-event-name=app-lab-deploy-new-app mt-auto ml-auto">
3636
<Button onClick={fromDeploymentSelected} {...disabledProps}>
3737
{deployAppLabel}
3838
</Button>

src/features/app-interfaces/components/create/upload-app-spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function UploadAppSpec({ machine, supportedStandards }: Props) {
4444

4545
return (
4646
<Form
47-
className="duration-300 animate-in fade-in-20"
47+
className="animate-in fade-in-20 duration-300"
4848
schema={selectAppSpecFormSchema}
4949
defaultValues={{ file: state.context.file }}
5050
onSubmit={next}

src/features/applications/components/application-local-state.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function ApplicationLocalState({ application }: Props) {
2929

3030
return (
3131
<div className="space-y-4 overflow-hidden">
32-
<div className="max-w-140 rounded-md border border-input bg-popover text-popover-foreground">
32+
<div className="border-input bg-popover text-popover-foreground max-w-140 rounded-md border">
3333
<div className="flex items-center px-3">
3434
<MagnifyingGlassIcon className="mr-2 size-4 shrink-0 opacity-50" />
3535
<input
@@ -39,14 +39,14 @@ export function ApplicationLocalState({ application }: Props) {
3939
id="local-state-address"
4040
value={address}
4141
onChange={handleInput}
42-
className="flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"
42+
className="placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50"
4343
/>
4444
<Button
4545
onClick={handleClear}
4646
variant="no-style"
4747
size="icon"
4848
aria-label="Clear local state address search"
49-
className="size-4 text-muted-foreground"
49+
className="text-muted-foreground size-4"
5050
>
5151
<XIcon />
5252
</Button>

src/features/applications/components/application-method-definitions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ function Argument({ index, argument }: ArgumentProps) {
204204

205205
return (
206206
<div>
207-
<h5 className="mb-1.5 text-primary">{`Argument ${index + 1}`}</h5>
207+
<h5 className="text-primary mb-1.5">{`Argument ${index + 1}`}</h5>
208208
<DescriptionList items={items} dtClassName="w-24 truncate" />
209209
</div>
210210
)

src/features/blocks/components/latest-blocks.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ export function LatestBlocks({ latestBlocks }: Props) {
2121
<ul>
2222
{latestBlocks.map((block) => (
2323
<li key={block.round} className="border-b last:border-0">
24-
<BlockLink round={block.round} className="flex w-full gap-2 p-3.5 text-sm animate-in fade-in-20 hover:bg-accent">
25-
<Box className="hidden text-primary sm:max-lg:block xl:block" />
24+
<BlockLink round={block.round} className="animate-in fade-in-20 hover:bg-accent flex w-full gap-2 p-3.5 text-sm">
25+
<Box className="text-primary hidden sm:max-lg:block xl:block" />
2626
<div>
2727
<h3 className={cn('leading-none mb-2')}>{block.round.toString()}</h3>
2828
<DateFormatted className="truncate" date={new Date(block.timestamp)} />

src/features/common/components/accordion.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const AccordionTrigger = React.forwardRef<
2929
{...props}
3030
>
3131
{children}
32-
<ChevronDownIcon className="size-4 shrink-0 text-muted-foreground transition-transform duration-200" />
32+
<ChevronDownIcon className="text-muted-foreground size-4 shrink-0 transition-transform duration-200" />
3333
</AccordionPrimitive.Trigger>
3434
</AccordionPrimitive.Header>
3535
))
@@ -41,7 +41,7 @@ const AccordionContent = React.forwardRef<
4141
>(({ className, children, ...props }, ref) => (
4242
<AccordionPrimitive.Content
4343
ref={ref}
44-
className="overflow-hidden px-4 text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
44+
className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden px-4 text-sm"
4545
{...props}
4646
>
4747
<div className={cn('pb-4 pt-0', className)}>{children}</div>

0 commit comments

Comments
 (0)