Skip to content

Commit bfa921d

Browse files
authored
Merge pull request #740 from BenjaminLesne/fix/prettier-plugin-tailwindcss-not-used
fix prettier-plugin-tailwindcss not being used
2 parents 89dc81f + 65ee783 commit bfa921d

File tree

7 files changed

+17
-16
lines changed

7 files changed

+17
-16
lines changed

components/Header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ const Header = () => {
2525
</div>
2626
</Link>
2727
</div>
28-
<div className="flex items-center leading-5 space-x-4 sm:space-x-6">
28+
<div className="flex items-center space-x-4 leading-5 sm:space-x-6">
2929
{headerNavLinks
3030
.filter((link) => link.href !== '/')
3131
.map((link) => (
3232
<Link
3333
key={link.title}
3434
href={link.href}
35-
className="hidden sm:block font-medium text-gray-900 dark:text-gray-100"
35+
className="hidden font-medium text-gray-900 dark:text-gray-100 sm:block"
3636
>
3737
{link.title}
3838
</Link>

components/MobileNav.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const MobileNav = () => {
2626
xmlns="http://www.w3.org/2000/svg"
2727
viewBox="0 0 20 20"
2828
fill="currentColor"
29-
className="text-gray-900 dark:text-gray-100 h-8 w-8"
29+
className="h-8 w-8 text-gray-900 dark:text-gray-100"
3030
>
3131
<path
3232
fillRule="evenodd"
@@ -36,7 +36,7 @@ const MobileNav = () => {
3636
</svg>
3737
</button>
3838
<div
39-
className={`fixed left-0 top-0 z-10 h-full w-full transform opacity-95 dark:opacity-[0.98] bg-white duration-300 ease-in-out dark:bg-gray-950 ${
39+
className={`fixed left-0 top-0 z-10 h-full w-full transform bg-white opacity-95 duration-300 ease-in-out dark:bg-gray-950 dark:opacity-[0.98] ${
4040
navShow ? 'translate-x-0' : 'translate-x-full'
4141
}`}
4242
>

components/SearchButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const SearchButton = () => {
1818
viewBox="0 0 24 24"
1919
strokeWidth={1.5}
2020
stroke="currentColor"
21-
className="text-gray-900 dark:text-gray-100 h-6 w-6"
21+
className="h-6 w-6 text-gray-900 dark:text-gray-100"
2222
>
2323
<path
2424
strokeLinecap="round"

components/ThemeSwitch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const ThemeSwitch = () => {
2323
xmlns="http://www.w3.org/2000/svg"
2424
viewBox="0 0 20 20"
2525
fill="currentColor"
26-
className="text-gray-900 dark:text-gray-100 h-6 w-6"
26+
className="h-6 w-6 text-gray-900 dark:text-gray-100"
2727
>
2828
{mounted && (theme === 'dark' || resolvedTheme === 'dark') ? (
2929
<path

layouts/ListLayoutWithTags.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,19 @@ export default function ListLayoutWithTags({
7979
<>
8080
<div>
8181
<div className="pb-6 pt-6">
82-
<h1 className="sm:hidden text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
82+
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:hidden sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
8383
{title}
8484
</h1>
8585
</div>
8686
<div className="flex sm:space-x-24">
87-
<div className="hidden max-h-screen h-full sm:flex flex-wrap bg-gray-50 dark:bg-gray-900/70 shadow-md pt-5 dark:shadow-gray-800/40 rounded min-w-[280px] max-w-[280px] overflow-auto">
88-
<div className="py-4 px-6">
87+
<div className="hidden h-full max-h-screen min-w-[280px] max-w-[280px] flex-wrap overflow-auto rounded bg-gray-50 pt-5 shadow-md dark:bg-gray-900/70 dark:shadow-gray-800/40 sm:flex">
88+
<div className="px-6 py-4">
8989
{pathname.startsWith('/blog') ? (
90-
<h3 className="text-primary-500 font-bold uppercase">All Posts</h3>
90+
<h3 className="font-bold uppercase text-primary-500">All Posts</h3>
9191
) : (
9292
<Link
9393
href={`/blog`}
94-
className="font-bold uppercase text-gray-700 dark:text-gray-300 hover:text-primary-500 dark:hover:text-primary-500"
94+
className="font-bold uppercase text-gray-700 hover:text-primary-500 dark:text-gray-300 dark:hover:text-primary-500"
9595
>
9696
All Posts
9797
</Link>
@@ -101,13 +101,13 @@ export default function ListLayoutWithTags({
101101
return (
102102
<li key={t} className="my-3">
103103
{pathname.split('/tags/')[1] === slug(t) ? (
104-
<h3 className="inline py-2 px-3 uppercase text-sm font-bold text-primary-500">
104+
<h3 className="inline px-3 py-2 text-sm font-bold uppercase text-primary-500">
105105
{`${t} (${tagCounts[t]})`}
106106
</h3>
107107
) : (
108108
<Link
109109
href={`/tags/${slug(t)}`}
110-
className="py-2 px-3 uppercase text-sm font-medium text-gray-500 dark:text-gray-300 hover:text-primary-500 dark:hover:text-primary-500"
110+
className="px-3 py-2 text-sm font-medium uppercase text-gray-500 hover:text-primary-500 dark:text-gray-300 dark:hover:text-primary-500"
111111
aria-label={`View posts tagged ${t}`}
112112
>
113113
{`${t} (${tagCounts[t]})`}
@@ -125,7 +125,7 @@ export default function ListLayoutWithTags({
125125
const { path, date, title, summary, tags } = post
126126
return (
127127
<li key={path} className="py-5">
128-
<article className="space-y-2 flex flex-col xl:space-y-0">
128+
<article className="flex flex-col space-y-2 xl:space-y-0">
129129
<dl>
130130
<dt className="sr-only">Published on</dt>
131131
<dd className="text-base font-medium leading-6 text-gray-500 dark:text-gray-400">

layouts/PostBanner.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ export default function PostMinimal({ content, next, prev, children }: LayoutPro
3030
<div className="space-y-1 pb-10 text-center dark:border-gray-700">
3131
<div className="w-full">
3232
<Bleed>
33-
<div className="aspect-[2/1] w-full relative">
33+
<div className="relative aspect-[2/1] w-full">
3434
<Image src={displayImage} alt={title} fill className="object-cover" />
3535
</div>
3636
</Bleed>
3737
</div>
38-
<div className="pt-10 relative">
38+
<div className="relative pt-10">
3939
<PageTitle>{title}</PageTitle>
4040
</div>
4141
</div>

prettier.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ module.exports = {
66
useTabs: false,
77
trailingComma: 'es5',
88
bracketSpacing: true,
9+
plugins: ['prettier-plugin-tailwindcss'],
910
}

0 commit comments

Comments
 (0)