Skip to content

Commit fed07b8

Browse files
Merge pull request #59 from geoadmin/task-PB-1908-add-prettier-formatting
PB-1908 : Add prettier formatting
2 parents dadfd61 + 3f3eeb0 commit fed07b8

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pnpm-lock.yaml
2+
.github/
3+
4+
node_modules/
5+
**/node_modules

.prettierrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true,
4+
"semi": false,
5+
"trailingComma": "es5",
6+
"tabWidth": 4,
7+
"jsxSingleQuote": false,
8+
"overrides": [
9+
{
10+
"files": "*.md",
11+
"options": {
12+
"tabWidth": 2
13+
}
14+
}
15+
],
16+
"singleAttributePerLine": true
17+
}

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,21 @@ Technical documentation for services made available by geo.admin.ch.
77
To build and run the site locally:
88

99
1. Make sure Node.js v18 or higher is installed (`node -v`)
10-
2. Install VitePress following [the setup guide](https://vitepress.dev/guide/getting-started).
10+
2. Install VitePress following [the setup guide](https://vitepress.dev/guide/getting-started). Do not use the setup wizard, only install the package.
1111
3. Optional: Activate a suitable Node version, e.g. with `nvm use stable`
1212
ℹ️ Use `nvm list` to see all available Node versions
1313
4. Run `npm install` to locally install all the necessary packages
1414
5. Run `npm run docs:dev` and visit http://localhost:5173/ in your web browser
1515

16+
## Development
17+
18+
This project uses the [prettier](https://prettier.io/) package for formatting.
19+
20+
You can automatically run prettier with these commands:
21+
22+
1. `npm run format`
23+
2. `npm run format:check`
24+
1625
## How to Add a Release Note
1726

1827
To add a release note, follow these steps:
@@ -49,7 +58,6 @@ To add a release note, follow these steps:
4958
previewContent: "Our systems are experiencing issues"
5059
```
5160
2. Update the `previewType` variable (`info` or `warning`) to control the color and the position in the page :
52-
5361
- `info`: bottom of the page, just text without backgound color
5462
- `warning`: top of the page, yellow banner
5563
- `danger`: top of the page, red banner

0 commit comments

Comments
 (0)