Skip to content

Commit

Permalink
Implement formatting via prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
morr0ne committed Nov 23, 2024
1 parent 7fdb6a1 commit 8731a96
Show file tree
Hide file tree
Showing 11 changed files with 1,139 additions and 989 deletions.
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/dist
**/node_modules
.github
pnpm-lock.yaml
15 changes: 15 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// .prettierrc.mjs
/** @type {import("prettier").Config} */
export default {
semi: true,
singleQuote: true,
plugins: ['prettier-plugin-astro', 'prettier-plugin-tailwindcss'],
overrides: [
{
files: '*.astro',
options: {
parser: 'astro',
},
},
],
};
8 changes: 4 additions & 4 deletions astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import sitemap from "@astrojs/sitemap";
import { defineConfig } from 'astro/config';
import tailwind from '@astrojs/tailwind';
import sitemap from '@astrojs/sitemap';

// https://astro.build/config
export default defineConfig({
site: "https://cake.morrone.dev",
site: 'https://cake.morrone.dev',
integrations: [tailwind(), sitemap()],
});
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro"
"astro": "astro",
"format": "prettier --check .",
"format:fix": "prettier --write --list-different ."
},
"dependencies": {
"@astrojs/check": "^0.9.4",
Expand All @@ -19,5 +21,10 @@
"tailwindcss": "^3.4.15",
"typescript": "^5.7.2"
},
"packageManager": "[email protected]+sha512.6e2baf77d06b9362294152c851c4f278ede37ab1eba3a55fda317a4a17b209f4dbb973fb250a77abc463a341fcb1f17f17cfa24091c4eb319cda0d9b84278387"
"packageManager": "[email protected]+sha512.6e2baf77d06b9362294152c851c4f278ede37ab1eba3a55fda317a4a17b209f4dbb973fb250a77abc463a341fcb1f17f17cfa24091c4eb319cda0d9b84278387",
"devDependencies": {
"prettier": "^3.3.3",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-tailwindcss": "^0.6.9"
}
}
123 changes: 117 additions & 6 deletions pnpm-lock.yaml

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

Loading

0 comments on commit 8731a96

Please sign in to comment.