Skip to content

Commit

Permalink
chore: update prettier config support for .astro file
Browse files Browse the repository at this point in the history
  • Loading branch information
lxchapu committed May 12, 2024
1 parent 55398f6 commit 9604deb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
"printWidth": 100,
"semi": false,
"singleQuote": true
"singleQuote": true,
"plugins": ["prettier-plugin-astro"],
"overrides": [
{
"files": "*.astro",
"options": {
"parser": "astro"
}
}
]
}
4 changes: 3 additions & 1 deletion src/components/FrinedList.astro
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ const { friends } = Astro.props
loading="lazy"
/>
<div class="min-w-0 grow">
<div class="truncate font-bold text-xl group-hover:text-accent">{friend.data.title}</div>
<div class="truncate font-bold text-xl group-hover:text-accent">
{friend.data.title}
</div>
<div class="text-sm line-clamp-2">{friend.data.description}</div>
</div>
<i class="shrink-0 iconfont icon-external-link group-hover:text-accent" />
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const { title, description, image } = Astro.props
console.log(
`%c Gyoza ${version} %c https://gyoza.lxchapu.com `,
'color: #fff; margin: 1em 0; padding: 5px 0; background: #ef8f99;',
'margin: 1em 0; padding: 5px 0; background: #efefef;'
'margin: 1em 0; padding: 5px 0; background: #efefef;',
)
</script>
</head>
Expand Down

0 comments on commit 9604deb

Please sign in to comment.