Standardize blog source formatting with Prettier

This commit is contained in:
biss committed 2026-12-01 18:47:17 +08:00
1 parent c14493c00f
commit 7809bf12c7
64 files changed
+2239 -1382

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
{
"plugins": ["prettier-plugin-astro"],
"singleQuote": true,
"printWidth": 100,
"overrides": [
{
"files": "*.astro",
"options": { "parser": "astro" }
}
]
}
+69
View File
@@ -15,8 +15,19 @@
"rehype-mathjax": "^7.1.0",
"remark-math": "^6.0.0",
"typesense": "^3.3.0"
},
"devDependencies": {
"prettier": "3.10.1",
"prettier-plugin-astro": "0.14.1"
}
},
"node_modules/@astrojs/compiler": {
"version": "2.13.1",
"resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-2.13.1.tgz",
"integrity": "sha512-f3FN83d2G/v32ipNClRKgYv30onQlMZX1vCeZMjPsMMPl1mDpmbl0+N5BYo4S/ofzqJyS5hvwacEo0CCVDn/Qg==",
"dev": true,
"license": "MIT"
},
"node_modules/@astrojs/compiler-binding": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/@astrojs/compiler-binding/-/compiler-binding-0.5.3.tgz",
@@ -5517,6 +5528,37 @@
"node": "^10 || ^12 || >=14"
}
},
"node_modules/prettier": {
"version": "3.10.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.10.1.tgz",
"integrity": "sha512-70vp3ZUYoPlFbF9uiTdXHUUCGEIp7d4+6p+8DYbkm2jP7x/3i/paXVF6dopSI3zd/CEitrZN1rc4i85xWmmXlg==",
"dev": true,
"license": "MIT",
"bin": {
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/prettier-plugin-astro": {
"version": "0.14.1",
"resolved": "https://registry.npmjs.org/prettier-plugin-astro/-/prettier-plugin-astro-0.14.1.tgz",
"integrity": "sha512-RiBETaaP9veVstE4vUwSIcdATj6dKmXljouXc/DDNwBSPTp8FRkLGDSGFClKsAFeeg+13SB0Z1JZvbD76bigJw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@astrojs/compiler": "^2.9.1",
"prettier": "^3.0.0",
"sass-formatter": "^0.7.6"
},
"engines": {
"node": "^14.15.0 || >=16.0.0"
}
},
"node_modules/prismjs": {
"version": "1.30.0",
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz",
@@ -5943,6 +5985,23 @@
"@rolldown/binding-win32-x64-msvc": "1.2.16"
}
},
"node_modules/s.color": {
"version": "0.0.15",
"resolved": "https://registry.npmjs.org/s.color/-/s.color-0.0.15.tgz",
"integrity": "sha512-AUNrbEUHeKY8XsYr/DYpl+qk5+aM+DChopnWOPEzn8YKzOhv4l2zH6LzZms3tOZP3wwdOyc0RmTciyi46HLIuA==",
"dev": true,
"license": "MIT"
},
"node_modules/sass-formatter": {
"version": "0.7.9",
"resolved": "https://registry.npmjs.org/sass-formatter/-/sass-formatter-0.7.9.tgz",
"integrity": "sha512-CWZ8XiSim+fJVG0cFLStwDvft1VI7uvXdCNJYXhDvowiv+DsbD1nXLiQ4zrE5UBvj5DWZJ93cwN0NX5PMsr1Pw==",
"dev": true,
"license": "MIT",
"dependencies": {
"suf-log": "^2.5.3"
}
},
"node_modules/satteri": {
"version": "0.11.7",
"resolved": "https://registry.npmjs.org/satteri/-/satteri-0.11.7.tgz",
@@ -6202,6 +6261,16 @@
"inline-style-parser": "0.2.7"
}
},
"node_modules/suf-log": {
"version": "2.5.3",
"resolved": "https://registry.npmjs.org/suf-log/-/suf-log-2.5.3.tgz",
"integrity": "sha512-KvC8OPjzdNOe+xQ4XWJV2whQA0aM1kGVczMQ8+dStAO6KfEB140JEVQ9dE76ONZ0/Ylf67ni4tILPJB41U0eow==",
"dev": true,
"license": "MIT",
"dependencies": {
"s.color": "0.0.15"
}
},
"node_modules/svgo": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/svgo/-/svgo-4.1.0.tgz",
+6
View File
@@ -3,6 +3,8 @@
"version": "3.1.1",
"private": true,
"scripts": {
"format": "prettier --write \"*.mjs\" \"{public,scripts,src,workers}/**/*.{astro,css,js,mjs,ts}\"",
"format:check": "prettier --check \"*.mjs\" \"{public,scripts,src,workers}/**/*.{astro,css,js,mjs,ts}\"",
"prebuild": "node scripts/generate-abbrlinks.mjs",
"build": "astro build",
"postbuild": "node scripts/version-service-worker.mjs",
@@ -19,5 +21,9 @@
"rehype-mathjax": "^7.1.0",
"remark-math": "^6.0.0",
"typesense": "^3.3.0"
},
"devDependencies": {
"prettier": "3.10.1",
"prettier-plugin-astro": "0.14.1"
}
}
Loaded 3 of 64 files, more files were not shown because too many files have changed in this diff. Show more