Skip to content

Commit f709820

Browse files
authored
add prettier-plugin-astro (#156)
2 parents 97d07b5 + 129447e commit f709820

File tree

7 files changed

+71
-14
lines changed

7 files changed

+71
-14
lines changed

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"tabWidth": 2,
55
"useTabs": true,
66
"trailingComma": "es5",
7+
"plugins": ["prettier-plugin-astro"],
78
"overrides": [
89
{
910
"files": "package.json",
@@ -17,6 +18,12 @@
1718
"useTabs": false,
1819
"singleQuote": false
1920
}
21+
},
22+
{
23+
"files": "*.astro",
24+
"options": {
25+
"parser": "astro"
26+
}
2027
}
2128
]
2229
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@
7676
"eslint-plugin-react-refresh": "^0.4.9",
7777
"eslint-plugin-simple-import-sort": "^12.1.1",
7878
"eslint-plugin-typescript-sort-keys": "^3.2.0",
79-
"prettier": "^3.3.3",
79+
"prettier": "^3.4.2",
80+
"prettier-plugin-astro": "^0.14.1",
8081
"prettier-plugin-tailwindcss": "^0.6.6",
8182
"tailwindcss": "^3.3.3",
8283
"typescript": "^5.5.4",

src/components/landing/faq.astro

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,14 @@ import Layout from '../../layouts/Layout.astro';
127127
background-color: #f6f6f6;
128128
}
129129
code {
130-
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
131-
Bitstream Vera Sans Mono, Courier New, monospace;
130+
font-family:
131+
Menlo,
132+
Monaco,
133+
Lucida Console,
134+
Liberation Mono,
135+
DejaVu Sans Mono,
136+
Bitstream Vera Sans Mono,
137+
Courier New,
138+
monospace;
132139
}
133140
</style>

src/layouts/Layout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export type Props = Simplify<SeoProps>;
1212
const props = Astro.props;
1313
---
1414

15-
<!DOCTYPE html>
15+
<!doctype html>
1616
<html lang="en">
1717
<head>
1818
<meta charset="UTF-8" />

src/pages/eject/index.astro

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,14 @@ for (const slug of checksOrder) {
9696
background-color: #f6f6f6;
9797
}
9898
code {
99-
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
100-
Bitstream Vera Sans Mono, Courier New, monospace;
99+
font-family:
100+
Menlo,
101+
Monaco,
102+
Lucida Console,
103+
Liberation Mono,
104+
DejaVu Sans Mono,
105+
Bitstream Vera Sans Mono,
106+
Courier New,
107+
monospace;
101108
}
102109
</style>

src/pages/setup/index.astro

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
import { type CollectionEntry, getEntry} from 'astro:content';
2+
import { type CollectionEntry, getEntry } from 'astro:content';
33
44
import SetupStep from '../../components/setup/SetupStep.astro';
55
import { websiteTitle } from '../../constants';
@@ -104,7 +104,14 @@ for (const slug of checksOrder) {
104104
background-color: #f6f6f6;
105105
}
106106
code {
107-
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
108-
Bitstream Vera Sans Mono, Courier New, monospace;
107+
font-family:
108+
Menlo,
109+
Monaco,
110+
Lucida Console,
111+
Liberation Mono,
112+
DejaVu Sans Mono,
113+
Bitstream Vera Sans Mono,
114+
Courier New,
115+
monospace;
109116
}
110117
</style>

yarn.lock

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
resolved "https://registry.yarnpkg.com/@astrojs/compiler/-/compiler-2.10.2.tgz#74d06c4316cb9fe16364b23a8fc90cb456018091"
3636
integrity sha512-bvH+v8AirwpRWCkYJEyWYdc5Cs/BjG2ZTxIJzttHilXgfKJAdW2496KsUQKzf5j2tOHtaHXKKn9hb9WZiBGpEg==
3737

38-
"@astrojs/compiler@^2.10.3":
38+
"@astrojs/compiler@^2.10.3", "@astrojs/compiler@^2.9.1":
3939
version "2.10.3"
4040
resolved "https://registry.yarnpkg.com/@astrojs/compiler/-/compiler-2.10.3.tgz#852386445029f7765a70b4c1d1140e175e1d8c27"
4141
integrity sha512-bL/O7YBxsFt55YHU021oL+xz+B/9HvGNId3F9xURN16aeqDK9juHGktdkCSXz+U4nqFACq6ZFvWomOzhV+zfPw==
@@ -5332,6 +5332,15 @@ prelude-ls@^1.2.1:
53325332
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
53335333
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
53345334

5335+
prettier-plugin-astro@^0.14.1:
5336+
version "0.14.1"
5337+
resolved "https://registry.yarnpkg.com/prettier-plugin-astro/-/prettier-plugin-astro-0.14.1.tgz#50bff8a659f2a6a4ff3b1d7ea73f2de93c95b213"
5338+
integrity sha512-RiBETaaP9veVstE4vUwSIcdATj6dKmXljouXc/DDNwBSPTp8FRkLGDSGFClKsAFeeg+13SB0Z1JZvbD76bigJw==
5339+
dependencies:
5340+
"@astrojs/compiler" "^2.9.1"
5341+
prettier "^3.0.0"
5342+
sass-formatter "^0.7.6"
5343+
53355344
prettier-plugin-tailwindcss@^0.6.6:
53365345
version "0.6.6"
53375346
resolved "https://registry.yarnpkg.com/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.6.tgz#93e524d3c30f3fb45dc9e99de985b2a584ff063f"
@@ -5342,10 +5351,10 @@ [email protected]:
53425351
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.7.tgz#bb79fc8729308549d28fe3a98fce73d2c0656450"
53435352
integrity sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==
53445353

5345-
prettier@^3.3.3:
5346-
version "3.3.3"
5347-
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105"
5348-
integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==
5354+
prettier@^3.0.0, prettier@^3.4.2:
5355+
version "3.4.2"
5356+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.4.2.tgz#a5ce1fb522a588bf2b78ca44c6e6fe5aa5a2b13f"
5357+
integrity sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==
53495358

53505359
prismjs@^1.29.0:
53515360
version "1.29.0"
@@ -5707,6 +5716,11 @@ rusha@^0.8.14:
57075716
resolved "https://registry.yarnpkg.com/rusha/-/rusha-0.8.14.tgz#a977d0de9428406138b7bb90d3de5dcd024e2f68"
57085717
integrity sha512-cLgakCUf6PedEu15t8kbsjnwIFFR2D4RfL+W3iWFJ4iac7z4B0ZI8fxy4R3J956kAI68HclCFGL8MPoUVC3qVA==
57095718

5719+
5720+
version "0.0.15"
5721+
resolved "https://registry.yarnpkg.com/s.color/-/s.color-0.0.15.tgz#6b32cd22d8dba95703a5122ddede2020a1560186"
5722+
integrity sha512-AUNrbEUHeKY8XsYr/DYpl+qk5+aM+DChopnWOPEzn8YKzOhv4l2zH6LzZms3tOZP3wwdOyc0RmTciyi46HLIuA==
5723+
57105724
57115725
version "5.1.2"
57125726
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
@@ -5717,6 +5731,13 @@ safe-buffer@^5.0.1:
57175731
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
57185732
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
57195733

5734+
sass-formatter@^0.7.6:
5735+
version "0.7.9"
5736+
resolved "https://registry.yarnpkg.com/sass-formatter/-/sass-formatter-0.7.9.tgz#cf77e02e98f81daabd91b185192144d29fc04ca5"
5737+
integrity sha512-CWZ8XiSim+fJVG0cFLStwDvft1VI7uvXdCNJYXhDvowiv+DsbD1nXLiQ4zrE5UBvj5DWZJ93cwN0NX5PMsr1Pw==
5738+
dependencies:
5739+
suf-log "^2.5.3"
5740+
57205741
satori@^0.10.1:
57215742
version "0.10.1"
57225743
resolved "https://registry.yarnpkg.com/satori/-/satori-0.10.1.tgz#41d4f86acd5b67ab00580766ea7a09523850b2f3"
@@ -5991,6 +6012,13 @@ sucrase@^3.32.0:
59916012
pirates "^4.0.1"
59926013
ts-interface-checker "^0.1.9"
59936014

6015+
suf-log@^2.5.3:
6016+
version "2.5.3"
6017+
resolved "https://registry.yarnpkg.com/suf-log/-/suf-log-2.5.3.tgz#0919a7fceea532a99b578c97814c4e335b2d64d1"
6018+
integrity sha512-KvC8OPjzdNOe+xQ4XWJV2whQA0aM1kGVczMQ8+dStAO6KfEB140JEVQ9dE76ONZ0/Ylf67ni4tILPJB41U0eow==
6019+
dependencies:
6020+
s.color "0.0.15"
6021+
59946022
superjson@^1.10.0:
59956023
version "1.12.4"
59966024
resolved "https://registry.yarnpkg.com/superjson/-/superjson-1.12.4.tgz#cfea35b0d1eb0f12d8b185f1d871272555f5a61f"

0 commit comments

Comments
 (0)