Skip to content

Commit c8b91e6

Browse files
committed
chore: consistent tailwind class order
1 parent 4aee6fc commit c8b91e6

File tree

245 files changed

+483
-484
lines changed

Some content is hidden

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

245 files changed

+483
-484
lines changed

eslint.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ export default [
148148
eqeqeq: 'error',
149149
...eslintPluginBetterTailwindcss.configs['recommended-warn'].rules,
150150
...eslintPluginBetterTailwindcss.configs['recommended-error'].rules,
151-
'better-tailwindcss/enforce-consistent-class-order': 'off',
152151
'better-tailwindcss/enforce-consistent-line-wrapping': 'off',
153152
'better-tailwindcss/no-unregistered-classes': ['error', { ignore: ['dark', 'changelog', 'waveform'] }],
154153
'lingui/no-unlocalized-strings': [

src/ui/analyses/analysis-logs.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,23 +155,23 @@ export function AnalysisLogs() {
155155
};
156156

157157
return (
158-
<div className="h-[420px] p-16 w-full border-t border-t-gray-300 mt-auto overflow-y-auto">
158+
<div className="mt-auto h-[420px] w-full overflow-y-auto border-t border-t-gray-300 p-16">
159159
<div className="flex flex-col justify-end">
160160
{logs.map((log, index) => {
161161
return <p key={`${log}${index}`}>{log}</p>;
162162
})}
163163
{isAnalysisErrorStatus(selectedAnalysis.status) && renderError()}
164164
</div>
165165
{selectedAnalysis.output && (
166-
<div className="flex flex-col gap-y-4 w-full mt-12">
166+
<div className="mt-12 flex w-full flex-col gap-y-4">
167167
<div className="flex items-center gap-x-8">
168168
<p className="text-body-strong">
169169
<Trans>Logs:</Trans>
170170
</p>
171171
<CopyButton data={selectedAnalysis.output} />
172172
</div>
173-
<div className="overflow-auto bg-gray-100 max-h-[600px] rounded-8">
174-
<pre className="select-text p-8">{selectedAnalysis.output}</pre>
173+
<div className="max-h-[600px] overflow-auto rounded-8 bg-gray-100">
174+
<pre className="p-8 select-text">{selectedAnalysis.output}</pre>
175175
</div>
176176
</div>
177177
)}

src/ui/ban/stats/ban-per-competitive-rank-chart.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ export function BanPerCompetitiveRankChart({ bannedAccounts }: Props) {
3333
const maxBannedCount = Math.max(...banCountPerRank.values());
3434

3535
return (
36-
<div className="flex gap-x-4 w-max mx-auto">
36+
<div className="mx-auto flex w-max gap-x-4">
3737
{Object.values(CompetitiveRank).map((rankNumber) => {
3838
const bannedCount = banCountPerRank.get(rankNumber) ?? 0;
3939
const rankName = getRankName(rankNumber);
4040

4141
return (
4242
<div key={rankNumber} className="flex">
43-
<div className="flex flex-col items-center h-[324px] justify-end">
43+
<div className="flex h-[324px] flex-col items-center justify-end">
4444
{bannedCount > 0 && (
4545
<Tooltip content={`${rankName}: ${bannedCount}`} placement="top">
4646
<div
47-
className="w-40 bg-blue-700 flex justify-center animate-grow-height"
47+
className="flex w-40 animate-grow-height justify-center bg-blue-700"
4848
style={{
4949
height: `${(bannedCount / maxBannedCount) * 100}%`,
5050
}}
@@ -54,7 +54,7 @@ export function BanPerCompetitiveRankChart({ bannedAccounts }: Props) {
5454
</Tooltip>
5555
)}
5656
<img
57-
className="w-[64px] mt-4"
57+
className="mt-4 w-[64px]"
5858
src={window.csdm.getRankImageSrc(rankNumber)}
5959
alt={rankName}
6060
title={rankName}

src/ui/ban/stats/ban-per-premier-rank-chart.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ export function BanPerPremierRankChart({ bannedAccounts }: Props) {
3232
const maxBannedCount = Math.max(...banCountPerTier.values());
3333

3434
return (
35-
<div className="flex gap-x-4 w-max mx-auto">
35+
<div className="mx-auto flex w-max gap-x-4">
3636
{[0, 1, 2, 3, 4, 5, 6].map((tier) => {
3737
const bannedCount = banCountPerTier.get(tier) ?? 0;
3838

3939
return (
4040
<div key={tier} className="flex">
41-
<div className="flex flex-col items-center h-[324px] justify-end">
41+
<div className="flex h-[324px] flex-col items-center justify-end">
4242
{bannedCount > 0 && (
4343
<Tooltip
4444
content={
@@ -49,7 +49,7 @@ export function BanPerPremierRankChart({ bannedAccounts }: Props) {
4949
placement="top"
5050
>
5151
<div
52-
className="w-40 bg-blue-700 flex justify-center animate-grow-height"
52+
className="flex w-40 animate-grow-height justify-center bg-blue-700"
5353
style={{
5454
height: `${(bannedCount / maxBannedCount) * 100}%`,
5555
}}
@@ -58,7 +58,7 @@ export function BanPerPremierRankChart({ bannedAccounts }: Props) {
5858
</div>
5959
</Tooltip>
6060
)}
61-
<div className="w-[64px] mt-4">
61+
<div className="mt-4 w-[64px]">
6262
<PremierRankLogo rank={tier * 1000 * 5} />
6363
</div>
6464
</div>

src/ui/ban/stats/ban-stats.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export function BanStats() {
105105
return (
106106
<Content>
107107
<div className="flex flex-col gap-y-12">
108-
<div className="flex gap-12 flex-wrap">
108+
<div className="flex flex-wrap gap-12">
109109
<Panel
110110
header={
111111
<>

src/ui/ban/stats/last-bans.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ export function LastBans({ bannedAccounts }: Props) {
3131
return (
3232
<Link
3333
key={account.steamId}
34-
className="flex gap-x-4 flex-none hover:bg-gray-100 p-8 rounded"
34+
className="flex flex-none gap-x-4 rounded p-8 hover:bg-gray-100"
3535
to={buildPlayerPath(account.steamId)}
3636
viewTransition={true}
3737
>
3838
<Avatar avatarUrl={account.avatar} playerName={account.name} size={48} />
39-
<div className="flex justify-center flex-col">
39+
<div className="flex flex-col justify-center">
4040
<p className="text-body-strong">{account.name}</p>
4141
<p>
4242
{formatDate(account.lastBanDate, {

src/ui/bootstrap/app-content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ type Props = {
66
};
77

88
export function AppContent({ children }: Props) {
9-
return <div className="flex flex-col flex-1 w-full bg-gray-50 overflow-hidden">{children}</div>;
9+
return <div className="flex w-full flex-1 flex-col overflow-hidden bg-gray-50">{children}</div>;
1010
}

src/ui/bootstrap/app-wrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ type Props = {
66
};
77

88
export function AppWrapper({ children }: Props) {
9-
return <div className="flex overflow-hidden h-[calc(100vh-var(--title-bar-height))]">{children}</div>;
9+
return <div className="flex h-[calc(100vh-var(--title-bar-height))] overflow-hidden">{children}</div>;
1010
}

src/ui/bootstrap/connect-database/connect-database.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ export function ConnectDatabase() {
180180

181181
const hint = getHintFromError(error);
182182
return (
183-
<div className="flex flex-col mt-8 max-w-[600px] m-auto">
183+
<div className="m-auto mt-8 flex max-w-[600px] flex-col">
184184
<ErrorMessage message={<Trans>The connection to the database failed with the following error:</Trans>} />
185-
<p className="text-body-strong select-text my-8">{error.message}</p>
185+
<p className="my-8 text-body-strong select-text">{error.message}</p>
186186
{hint}
187187
</div>
188188
);
@@ -191,15 +191,15 @@ export function ConnectDatabase() {
191191
return (
192192
<AppWrapper>
193193
<AppContent>
194-
<div className="flex flex-col m-auto">
195-
<div className="flex flex-col w-[400px] m-auto">
194+
<div className="m-auto flex flex-col">
195+
<div className="m-auto flex w-[400px] flex-col">
196196
<div>
197197
<p>
198198
<Trans>CS Demo Manager requires a PostgreSQL database.</Trans>
199199
</p>
200200
<HelpLink />
201201
</div>
202-
<div className="flex flex-col mt-12 gap-12">
202+
<div className="mt-12 flex flex-col gap-12">
203203
<div className="flex gap-x-8">
204204
<div className="w-full">
205205
<HostnameInput

src/ui/bootstrap/loading-error.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ type Props = {
88

99
export function LoadingError({ title, error }: Props) {
1010
return (
11-
<div className="flex flex-col h-screen items-center justify-center">
11+
<div className="flex h-screen flex-col items-center justify-center">
1212
<div>
1313
<div className="flex items-center gap-x-8">
1414
<ExclamationTriangleIcon className="size-24 text-red-700" />
1515
<p className="text-title">{title}</p>
1616
</div>
17-
<p className="select-text mt-8 text-body-strong">{error}</p>
17+
<p className="mt-8 text-body-strong select-text">{error}</p>
1818
</div>
1919
</div>
2020
);

0 commit comments

Comments
 (0)