This PR: - fixes the prettier config (the `-astro` plugin must be explicitly registered with pnpm) - adds [`pretty-quick`](https://github.com/azz/pretty-quick) to be able to format the staged changes - add [ `husky`](https://typicode.github.io/husky/) to easily add a pre-commit hook which calls `pretty-quick` on commit I updated the README to document the added commands: - `pnpm run prepare` to add the pre-commit hook - `pnpm run format-staged` to format the staged files Co-authored-by: oliverpool <git@olivier.pfad.fr> Reviewed-on: https://codeberg.org/forgejo/website/pulls/80
17 lines
311 B
Text
17 lines
311 B
Text
{
|
|
"printWidth": 120,
|
|
"semi": true,
|
|
"singleQuote": true,
|
|
"tabWidth": 2,
|
|
"trailingComma": "es5",
|
|
"useTabs": true,
|
|
"overrides": [
|
|
{
|
|
"files": [".*", "*.json", "*.md", "*.toml", "*.yml"],
|
|
"options": {
|
|
"useTabs": false
|
|
}
|
|
}
|
|
],
|
|
"plugins": ["prettier-plugin-astro"]
|
|
}
|