Skip to content

Commit 512eb2b

Browse files
committed
Point Prettier to our Tailwind config
1 parent 4cbea3d commit 512eb2b

File tree

3 files changed

+33
-23
lines changed

3 files changed

+33
-23
lines changed

.prettierrc

Lines changed: 0 additions & 22 deletions
This file was deleted.

prettier.config.mjs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { dirname, resolve } from "path"
2+
import { fileURLToPath } from "url"
3+
4+
const __dirname = dirname(fileURLToPath(import.meta.url))
5+
6+
/**
7+
* @type {import("prettier").Config}
8+
*/
9+
export default {
10+
arrowParens: "avoid",
11+
semi: false,
12+
singleQuote: false,
13+
useTabs: false,
14+
tabWidth: 2,
15+
overrides: [
16+
{
17+
files: "*.svg",
18+
options: { parser: "html" },
19+
},
20+
{
21+
files: "*.mdx",
22+
options: {
23+
proseWrap: "always",
24+
semi: false,
25+
trailingComma: "none",
26+
},
27+
},
28+
],
29+
plugins: ["prettier-plugin-pkg", "prettier-plugin-tailwindcss"],
30+
// We need this to ensure classes format the same across CI and editors.
31+
tailwindConfig: resolve(__dirname, "./tailwind.config.ts"),
32+
}

src/components/blog-page/blog-card-picture.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export function BlogCardPicture({
133133
<canvas
134134
ref={canvasRef}
135135
aria-hidden="true"
136-
className="data-[visible]:animate-fade-in pointer-events-none absolute inset-0 !size-full"
136+
className="pointer-events-none absolute inset-0 !size-full data-[visible]:animate-fade-in"
137137
/>
138138
{children ? <div className="relative z-10 p-4">{children}</div> : null}
139139
</div>

0 commit comments

Comments
 (0)