Skip to content

Commit

Permalink
Merge pull request #46 from OUCC/fix-prettier
Browse files Browse the repository at this point in the history
Prettierの設定を修正
  • Loading branch information
ciffelia authored Dec 5, 2023
2 parents e74e857 + 4940cc0 commit 694a16a
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
src/content/blogs/
/src/content/blogs
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"typescript": "^5.2.2"
},
"devDependencies": {
"prettier": "^3.0.3",
"prettier-plugin-astro": "^0.12.1",
"prettier": "^3.1.0",
"prettier-plugin-astro": "^0.12.2",
"schema-dts": "^1.1.2",
"ts-node": "^10.9.1"
}
Expand Down
5 changes: 3 additions & 2 deletions prettier.config.cjs → prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module.exports = {
/** @type {import("prettier").Config} */
export default {
semi: false,
singleQuote: true,
plugins: [require.resolve('prettier-plugin-astro')],
plugins: ['prettier-plugin-astro'],
overrides: [
{
files: '*.astro',
Expand Down
8 changes: 4 additions & 4 deletions src/pages/blog/authors/[slug]/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ const ogpPath =
author.data.github
? `https://github.com/${author.data.github}.png`
: author.data.image.type === 'svg'
? `/authors/${author.id}/ogp.png`
: author.data.image.type === 'external-url'
? author.data.image.url
: unreachable(author.data.image)
? `/authors/${author.id}/ogp.png`
: author.data.image.type === 'external-url'
? author.data.image.url
: unreachable(author.data.image)
const isShowAboutSection = author.data.description || author.data.github
---
Expand Down
4 changes: 2 additions & 2 deletions src/pages/blog/tags/[slug]/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const isShowAbout = tag.description || tag.site || tag.document || tag.github
image={tag.image.type === 'svg'
? `/blog/tags/${id}/ogp.png`
: tag.image.type === 'external-url'
? tag.image.url
: unreachable(tag.image)}
? tag.image.url
: unreachable(tag.image)}
summarySize="summary"
>
<BlogTitle title={tag.name} background="white">
Expand Down

0 comments on commit 694a16a

Please sign in to comment.