Skip to content

Commit 7e5d219

Browse files
authored
chore: apply prettier formatting (#1101)
* chore: apply prettier formatting * ci: add workflow to check format
1 parent 35b86c2 commit 7e5d219

23 files changed

+198
-144
lines changed

.github/stale.yml

+1-1
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/ci.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
pull_request:
8+
branches:
9+
- "master"
10+
11+
env:
12+
HUSKY: 0
13+
14+
jobs:
15+
ci:
16+
name: CI
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 15
19+
20+
steps:
21+
- name: Checkout repo
22+
uses: actions/checkout@v4
23+
24+
- name: Setup pnpm
25+
uses: pnpm/action-setup@v4
26+
27+
- name: Setup Node
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version-file: ".nvmrc"
31+
cache: "pnpm"
32+
33+
- name: Install Dependencies
34+
shell: bash
35+
run: pnpm install --frozen-lockfile
36+
37+
- name: Format
38+
run: |
39+
pnpm run format

.github/workflows/lock-issue.yml

+2-2
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

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.18.1

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm-lock.yaml

.prettierrc

+1
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ React Hook Form uses prettier.
5656
If possible, enable the prettier plugin in your editor to get real-time feedback. The formatting can be run manually with the following command:
5757

5858
```shellscript
59-
pnpm run format
59+
pnpm run format:fix
6060
```
6161

6262
## License

package.json

+6-4
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,7 +58,8 @@
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",
6364
"now-build": "pnpm run build",
6465
"start": "next start",
@@ -67,7 +68,8 @@
6768
},
6869
"lint-staged": {
6970
"*.{ts,tsx,mdx,css,json}": [
70-
"pnpm run format"
71+
"pnpm run format:fix"
7172
]
72-
}
73+
},
74+
"packageManager": "[email protected]+sha512.76e2379760a4328ec4415815bcd6628dee727af3779aaa4c914e3944156c4299921a89f976381ee107d41f12cfa4b66681ca9c718f0668fa0831ed4c6d8ba56c"
7375
}

0 commit comments

Comments
 (0)