Skip to content

Commit 0579381

Browse files
refactor: sort tailwind classes with prettier
https://tailwindcss.com/blog/automatic-class-sorting-with-prettier
1 parent ba9090d commit 0579381

File tree

5 files changed

+86
-3
lines changed

5 files changed

+86
-3
lines changed

Diff for: .prettierrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"singleQuote": true
2+
"singleQuote": true,
3+
"plugins": ["prettier-plugin-tailwindcss"]
34
}

Diff for: package-lock.json

+81
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"lint-staged": "15.2.11",
3636
"postcss": "8.4.49",
3737
"prettier": "3.4.2",
38+
"prettier-plugin-tailwindcss": "0.6.9",
3839
"react": "19.0.0",
3940
"react-dom": "19.0.0",
4041
"tailwindcss": "3.4.17",

Diff for: src/components/App.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function App() {
1616
<main>
1717
<Message />
1818

19-
<section className="py-6 px-9">
19+
<section className="px-9 py-6">
2020
<h1>Button Clicker</h1>
2121
<Counter />
2222
<Button />

Diff for: src/components/Message.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default function Message() {
44
const { message } = useMessageStore();
55

66
return (
7-
<header className="py-7 px-9 font-mono bg-neutral-900 text-gray-100">
7+
<header className="bg-neutral-900 px-9 py-7 font-mono text-gray-100">
88
{message}
99
</header>
1010
);

0 commit comments

Comments
 (0)