From 74367fcb16610b4ea51b4a2e44cb3087893aae21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20=C5=BBuraw?= <9116238+krzysztofzuraw@users.noreply.github.com> Date: Sun, 28 Jul 2024 17:31:17 +0200 Subject: [PATCH] Updates after prettier upgrade --- .prettierrc.cjs | 16 ---------------- package.json | 5 +++-- pnpm-lock.yaml | 10 +++++----- prettier.config.js | 15 +++++++++++++++ src/layouts/Base.astro | 2 +- src/layouts/Post.astro | 2 +- src/pages/404.astro | 2 +- src/pages/blogroll.astro | 2 +- 8 files changed, 27 insertions(+), 27 deletions(-) delete mode 100644 .prettierrc.cjs create mode 100644 prettier.config.js diff --git a/.prettierrc.cjs b/.prettierrc.cjs deleted file mode 100644 index 7a38fd42..00000000 --- a/.prettierrc.cjs +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - plugins: [ - require.resolve("prettier-plugin-astro"), - require.resolve("prettier-plugin-pkg"), - require.resolve("prettier-plugin-tailwindcss"), - ], - overrides: [ - { - files: "*.astro", - options: { - parser: "astro", - }, - }, - ], - pluginSearchDirs: false, -}; diff --git a/package.json b/package.json index 914a8db3..160fa8e9 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,9 @@ }, "scripts": { "astro": "astro", - "build": "astro build", + "build": "pnpm lint && astro build", "dev": "astro dev", + "format:all": "prettier . --write", "lint": "astro check", "post:new": "./scripts/post.sh", "prepare": "husky", @@ -48,7 +49,7 @@ "prettier": "3.3.3", "prettier-plugin-astro": "0.14.1", "prettier-plugin-pkg": "0.18.1", - "prettier-plugin-tailwindcss": "0.6.5", + "prettier-plugin-tailwindcss": "0.6.1", "typescript": "5.5.4" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e542a2f4..2f082aa7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -84,8 +84,8 @@ importers: specifier: 0.18.1 version: 0.18.1(prettier@3.3.3) prettier-plugin-tailwindcss: - specifier: 0.6.5 - version: 0.6.5(prettier-plugin-astro@0.14.1)(prettier@3.3.3) + specifier: 0.6.1 + version: 0.6.1(prettier-plugin-astro@0.14.1)(prettier@3.3.3) typescript: specifier: 5.5.4 version: 5.5.4 @@ -4253,10 +4253,10 @@ packages: peerDependencies: prettier: ^3.0.3 - prettier-plugin-tailwindcss@0.6.5: + prettier-plugin-tailwindcss@0.6.1: resolution: { - integrity: sha512-axfeOArc/RiGHjOIy9HytehlC0ZLeMaqY09mm8YCkMzznKiDkwFzOpBvtuhuv3xG5qB73+Mj7OCe2j/L1ryfuQ==, + integrity: sha512-AnbeYZu0WGj+QgKciUgdMnRxrqcxltleZPgdwfA5104BHM3siBLONN/HLW1yS2HvzSNkzpQ/JAj+LN0jcJO+0w==, } engines: { node: ">=14.21.3" } peerDependencies: @@ -8376,7 +8376,7 @@ snapshots: dependencies: prettier: 3.3.3 - prettier-plugin-tailwindcss@0.6.5(prettier-plugin-astro@0.14.1)(prettier@3.3.3): + prettier-plugin-tailwindcss@0.6.1(prettier-plugin-astro@0.14.1)(prettier@3.3.3): dependencies: prettier: 3.3.3 optionalDependencies: diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 00000000..c2ba79e3 --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,15 @@ +export default { + plugins: [ + "prettier-plugin-astro", + "prettier-plugin-pkg", + "prettier-plugin-tailwindcss", + ], + overrides: [ + { + files: "*.astro", + options: { + parser: "astro", + }, + }, + ], +}; diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index 5dcb91e3..744e23b8 100644 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -12,7 +12,7 @@ import Meta from "@/components/Meta.astro";
diff --git a/src/layouts/Post.astro b/src/layouts/Post.astro index 12bcc5f5..ff71582a 100644 --- a/src/layouts/Post.astro +++ b/src/layouts/Post.astro @@ -16,7 +16,7 @@ const { frontmatter } = Astro.props; -
+

{frontmatter.title}

Last updated: diff --git a/src/pages/404.astro b/src/pages/404.astro index 4860edb5..a3c9e14b 100644 --- a/src/pages/404.astro +++ b/src/pages/404.astro @@ -3,7 +3,7 @@ import BaseLayout from "@/layouts/Base.astro"; --- -

+

Page not found

Oops! The page you are looking for has been removed or relocated

Go back diff --git a/src/pages/blogroll.astro b/src/pages/blogroll.astro index d0a9aaf0..225cf79e 100644 --- a/src/pages/blogroll.astro +++ b/src/pages/blogroll.astro @@ -4,7 +4,7 @@ import BaseLayout from "@/layouts/Base.astro"; --- -
+

Blogroll

Here are some blogs I like to read.