diff --git a/.prettierrc b/.prettierrc
index 3d1f5e5cb..5712ab994 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -2,5 +2,6 @@
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
- "arrowParens": "avoid"
+ "arrowParens": "avoid",
+ "plugins": ["prettier-plugin-tailwindcss"]
}
diff --git a/package-lock.json b/package-lock.json
index 527614cb6..cd6f5b71e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -63,6 +63,9 @@
"workbox-routing": "7.0.0",
"workbox-strategies": "7.0.0",
"workbox-streams": "7.0.0"
+ },
+ "devDependencies": {
+ "prettier-plugin-tailwindcss": "^0.5.11"
}
},
"node_modules/@aashutoshrathi/word-wrap": {
@@ -12337,6 +12340,75 @@
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
+ "node_modules/prettier-plugin-tailwindcss": {
+ "version": "0.5.11",
+ "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.11.tgz",
+ "integrity": "sha512-AvI/DNyMctyyxGOjyePgi/gqj5hJYClZ1avtQvLlqMT3uDZkRbi4HhGUpok3DRzv9z7Lti85Kdj3s3/1CeNI0w==",
+ "dev": true,
+ "engines": {
+ "node": ">=14.21.3"
+ },
+ "peerDependencies": {
+ "@ianvs/prettier-plugin-sort-imports": "*",
+ "@prettier/plugin-pug": "*",
+ "@shopify/prettier-plugin-liquid": "*",
+ "@trivago/prettier-plugin-sort-imports": "*",
+ "prettier": "^3.0",
+ "prettier-plugin-astro": "*",
+ "prettier-plugin-css-order": "*",
+ "prettier-plugin-import-sort": "*",
+ "prettier-plugin-jsdoc": "*",
+ "prettier-plugin-marko": "*",
+ "prettier-plugin-organize-attributes": "*",
+ "prettier-plugin-organize-imports": "*",
+ "prettier-plugin-style-order": "*",
+ "prettier-plugin-svelte": "*"
+ },
+ "peerDependenciesMeta": {
+ "@ianvs/prettier-plugin-sort-imports": {
+ "optional": true
+ },
+ "@prettier/plugin-pug": {
+ "optional": true
+ },
+ "@shopify/prettier-plugin-liquid": {
+ "optional": true
+ },
+ "@trivago/prettier-plugin-sort-imports": {
+ "optional": true
+ },
+ "prettier-plugin-astro": {
+ "optional": true
+ },
+ "prettier-plugin-css-order": {
+ "optional": true
+ },
+ "prettier-plugin-import-sort": {
+ "optional": true
+ },
+ "prettier-plugin-jsdoc": {
+ "optional": true
+ },
+ "prettier-plugin-marko": {
+ "optional": true
+ },
+ "prettier-plugin-organize-attributes": {
+ "optional": true
+ },
+ "prettier-plugin-organize-imports": {
+ "optional": true
+ },
+ "prettier-plugin-style-order": {
+ "optional": true
+ },
+ "prettier-plugin-svelte": {
+ "optional": true
+ },
+ "prettier-plugin-twig-melody": {
+ "optional": true
+ }
+ }
+ },
"node_modules/pretty-bytes": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz",
diff --git a/package.json b/package.json
index aa2f04a50..d8095f8a5 100644
--- a/package.json
+++ b/package.json
@@ -83,5 +83,8 @@
"last 1 firefox version",
"last 1 safari version"
]
+ },
+ "devDependencies": {
+ "prettier-plugin-tailwindcss": "^0.5.11"
}
}
diff --git a/src/App.scss b/src/App.scss
index 96fa7ed52..35218574e 100644
--- a/src/App.scss
+++ b/src/App.scss
@@ -28,30 +28,30 @@
}
h1 {
- @apply text-xl leading-6 font-black text-gray-900 dark:text-gray-100 tracking-wide;
+ @apply text-xl font-black leading-6 tracking-wide text-gray-900 dark:text-gray-100;
}
h2 {
- @apply text-lg leading-6 font-bold text-gray-900 dark:text-gray-100;
+ @apply text-lg font-bold leading-6 text-gray-900 dark:text-gray-100;
}
h3 {
- @apply text-lg leading-6 font-medium text-gray-900 dark:text-gray-100;
+ @apply text-lg font-medium leading-6 text-gray-900 dark:text-gray-100;
}
.header {
- @apply fixed top-[1.625rem] left-0 right-0 m-auto text-center md:relative md:top-0 z-10 flex justify-center items-center md:h-12;
+ @apply fixed left-0 right-0 top-[1.625rem] z-10 m-auto flex items-center justify-center text-center md:relative md:top-0 md:h-12;
@media (max-width: 767px) {
width: calc(100% - 9rem);
}
h1 {
- @apply whitespace-nowrap overflow-hidden text-ellipsis max-w-full;
+ @apply max-w-full overflow-hidden text-ellipsis whitespace-nowrap;
max-width: calc(100% - 1.5rem);
}
.header--action {
- @apply fixed md:absolute right-6 md:right-0 text-red-800 dark:text-red-600 flex gap-x-2;
+ @apply fixed right-6 flex gap-x-2 text-red-800 dark:text-red-600 md:absolute md:right-0;
.header--action__secondary {
@apply text-gray-600 dark:text-gray-400;
@@ -88,31 +88,31 @@
}
.box {
- @apply shadow-sm rounded-md bg-gray-100 dark:bg-slate-700;
+ @apply rounded-md bg-gray-100 shadow-sm dark:bg-slate-700;
}
.card {
- @apply bg-white dark:bg-slate-800 shadow-lg overflow-hidden rounded-lg p-4 md:p-8;
+ @apply overflow-hidden rounded-lg bg-white p-4 shadow-lg dark:bg-slate-800 md:p-8;
}
.error {
- @apply bg-red-100 p-2 rounded-md text-red-800 dark:text-red-600;
+ @apply rounded-md bg-red-100 p-2 text-red-800 dark:text-red-600;
}
.button-group {
- @apply gap-4 flex flex-col md:flex-row-reverse md:justify-start;
+ @apply flex flex-col gap-4 md:flex-row-reverse md:justify-start;
}
.btn-primary {
- @apply w-full min-w-32 md:w-auto shadow-sm rounded-md full-centered bg-blue-800 hover:bg-blue-900 dark:hover:bg-blue-700 text-white py-3 px-4 text-sm font-bold;
+ @apply full-centered w-full min-w-32 rounded-md bg-blue-800 px-4 py-3 text-sm font-bold text-white shadow-sm hover:bg-blue-900 dark:hover:bg-blue-700 md:w-auto;
}
.btn-secondary {
- @apply w-full min-w-32 md:w-auto shadow-sm rounded-md full-centered text-blue-800 hover:text-blue-900 dark:text-gray-300 dark:hover:text-gray-200 py-2 px-4 text-sm font-medium hover:bg-gray-50 dark:hover:bg-slate-700 border border-blue-800 dark:border-gray-300;
+ @apply full-centered w-full min-w-32 rounded-md border border-blue-800 px-4 py-2 text-sm font-medium text-blue-800 shadow-sm hover:bg-gray-50 hover:text-blue-900 dark:border-gray-300 dark:text-gray-300 dark:hover:bg-slate-700 dark:hover:text-gray-200 md:w-auto;
}
.btn-secondary-red {
- @apply btn-secondary text-red-800 hover:text-red-900 border-red-800 dark:text-red-600 dark:hover:text-red-600 dark:border-red-600;
+ @apply btn-secondary border-red-800 text-red-800 hover:text-red-900 dark:border-red-600 dark:text-red-600 dark:hover:text-red-600;
}
.link-blue {
@@ -131,11 +131,11 @@
}
.input--outer {
- @apply mt-2 relative;
+ @apply relative mt-2;
}
.input {
- @apply flex-1 block w-full min-w-0 sm:text-sm border-gray-300 rounded-md dark:text-gray-100 dark:border-slate-700 dark:bg-slate-700 dark:focus:bg-slate-700 focus:outline-transparent focus:border-transparent focus:ring-2 focus:ring-inset focus:ring-blue-800 dark:focus:ring-blue-700;
+ @apply block w-full min-w-0 flex-1 rounded-md border-gray-300 focus:border-transparent focus:outline-transparent focus:ring-2 focus:ring-inset focus:ring-blue-800 dark:border-slate-700 dark:bg-slate-700 dark:text-gray-100 dark:focus:bg-slate-700 dark:focus:ring-blue-700 sm:text-sm;
}
.dashboard {
@@ -143,7 +143,7 @@
@apply grid grid-cols-12;
a {
- @apply text-gray-500 dark:text-gray-400 text-sm font-medium col-span-3 text-center flex justify-center items-center border-gray-300 dark:border-gray-500;
+ @apply col-span-3 flex items-center justify-center border-gray-300 text-center text-sm font-medium text-gray-500 dark:border-gray-500 dark:text-gray-400;
}
> div {
@@ -152,7 +152,7 @@
> div,
a {
- @apply pb-1 border-b-2;
+ @apply border-b-2 pb-1;
}
}
}
@@ -168,7 +168,7 @@
.trans {
font-size: 0;
& > span {
- @apply text-xl /* h1 */;
+ @apply /* h1 */ text-xl;
}
}
diff --git a/src/components/AccountForm.tsx b/src/components/AccountForm.tsx
index 4b0beee68..534d5bd80 100644
--- a/src/components/AccountForm.tsx
+++ b/src/components/AccountForm.tsx
@@ -113,14 +113,14 @@ const AccountForm = ({ budget, type }: Props) => {
{t('transactions.latest')}
+
{' '} – {t('or')} –{' '}
diff --git a/src/components/ArchiveButton.tsx b/src/components/ArchiveButton.tsx index 3b1c0f339..68efdf048 100644 --- a/src/components/ArchiveButton.tsx +++ b/src/components/ArchiveButton.tsx @@ -30,7 +30,7 @@ const ArchiveButton = ({ }} className="btn-secondary" > -diff --git a/src/components/CategoryMonth.tsx b/src/components/CategoryMonth.tsx index 061f82e65..5e61ba8bd 100644 --- a/src/components/CategoryMonth.tsx +++ b/src/components/CategoryMonth.tsx @@ -42,7 +42,7 @@ const CategoryMonth = ({
{t('dashboard.allocation')} | {t('dashboard.spent')} | {t('dashboard.balance')} | @@ -213,7 +213,7 @@ const Dashboard = ({ budget }: DashboardProps) => {|
---|---|---|---|
{ )} | 0 ? 'positive' : 'text-gray-500 dark:text-gray-400' @@ -237,7 +237,7 @@ const Dashboard = ({ budget }: DashboardProps) => { {formatMoney(budgetMonth.spent, budget.currency)} | {
{t('transactions.latest')}
-
+ |