Skip to content

Commit 4a2d4cc

Browse files
committed
chore: apply prettier formatting
1 parent 9e18cf0 commit 4a2d4cc

21 files changed

+187
-147
lines changed

.github/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exemptLabels:
77
- pinned
88
- security
99
# Label to use when marking an issue as stale
10-
staleLabel:
10+
staleLabel:
1111
# Comment to post when marking an issue as stale. Set to `false` to disable
1212
markComment: >
1313
This issue has been automatically marked as stale because it has not had

.github/workflows/lock-issue.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: 'Lock Issues'
1+
name: "Lock Issues"
22

33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '0 0,6,12,18 * * *'
6+
- cron: "0 0,6,12,18 * * *"
77

88
permissions:
99
issues: write

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm-lock.yaml

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
23
"endOfLine": "lf",
34
"semi": false,
45
"singleQuote": false,

CONTRIBUTING.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,52 @@ Here is a quick guide to doing code contributions to the library.
1212

1313
3. Install packages by running:
1414

15-
> yarn
15+
```shellscript
16+
pnpm install
17+
```
1618

1719
4. Startup a local version of the docs
1820

19-
> yarn start
21+
```shellscript
22+
pnpm run dev
23+
```
2024

2125
5. Ensure your code is formatted properly
2226

23-
> yarn format
27+
```shellscript
28+
pnpm run format
29+
```
2430

2531
6. Push your branch: `git push -u origin your-meaningful-branch-name`
2632

2733
7. Submit a pull request to the upstream react-hook-form repository.
2834

2935
8. Choose a descriptive title and describe your changes briefly.
3036

37+
## Testing production build
38+
39+
To test the documentation production site on your local machine,
40+
first execute the build script:
41+
42+
```shellscript
43+
pnpm run build
44+
```
45+
46+
Then start a local server which serves the file created by executing
47+
48+
```shellscript
49+
pnpm run start
50+
```
51+
3152
## Coding style
3253

33-
Please follow the coding style of the project. React Hook Form uses prettier. If possible, enable the prettier plugin in your editor to get real-time feedback. The formatting can be run manually with the following command: `yarn format`
54+
Please follow the coding style of the project.
55+
React Hook Form uses prettier.
56+
If possible, enable the prettier plugin in your editor to get real-time feedback. The formatting can be run manually with the following command:
57+
58+
```shellscript
59+
pnpm run format:fix
60+
```
3461

3562
## License
3663

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"eslint-plugin-react-hooks": "^4.6.0",
4747
"husky": "^8.0.3",
4848
"lint-staged": "^13.2.2",
49-
"prettier": "^2.8.8",
49+
"prettier": "^3.4.2",
5050
"typescript": "^5.1.3"
5151
},
5252
"keywords": [
@@ -58,16 +58,17 @@
5858
"analyze": "cross-env ANALYZE=true next build",
5959
"build": "next build",
6060
"dev": "next dev",
61-
"format": "prettier --write",
61+
"format": "prettier . --check",
62+
"format:fix": "prettier . --write",
6263
"lint": "next lint --fix",
63-
"now-build": "npm run build",
64+
"now-build": "pnpm run build",
6465
"start": "next start",
6566
"typecheck": "tsc --noEmit",
6667
"prepare": "husky install"
6768
},
6869
"lint-staged": {
6970
"*.{ts,tsx,mdx,css,json}": [
70-
"npm run format"
71+
"pnpm run format:fix"
7172
]
7273
}
7374
}

0 commit comments

Comments
 (0)