Skip to content

Commit b93689b

Browse files
authored
Merge branch 'master' into docs/useForm-reset
2 parents 9575bfe + 8d97b6b commit b93689b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+2235
-6733
lines changed

.eslintrc.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const ERROR = 2
55
/* eslint-enable @typescript-eslint/no-unused-vars */
66

77
module.exports = {
8+
reportUnusedDisableDirectives: true,
89
parser: "@typescript-eslint/parser",
910
parserOptions: {
1011
ecmaVersion: 2020,
@@ -19,7 +20,6 @@ module.exports = {
1920
},
2021
extends: [
2122
"plugin:react/recommended",
22-
"plugin:react-hooks/recommended",
2323
"plugin:@typescript-eslint/recommended",
2424
"plugin:jsx-a11y/recommended",
2525
"next",
@@ -38,9 +38,12 @@ module.exports = {
3838
// react
3939
"react/prop-types": OFF,
4040
"react/no-unescaped-entities": OFF,
41-
"react/jsx-curly-brace-presence": "warn",
41+
"react/jsx-curly-brace-presence": WARN,
4242
// jsx-ally
4343
"jsx-a11y/no-onchange": WARN,
44+
// import
4445
"import/no-anonymous-default-export": OFF,
46+
// next
47+
"@next/next/no-img-element": OFF,
4548
},
4649
}

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

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
check:
16+
name: Run ${{ matrix.script }} code check
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 15
19+
20+
strategy:
21+
fail-fast: true
22+
matrix:
23+
script: ["format", "lint", "typecheck:ci"]
24+
25+
steps:
26+
- name: Checkout repo
27+
uses: actions/checkout@v4
28+
29+
- name: Setup pnpm
30+
uses: pnpm/action-setup@v4
31+
32+
- name: Setup Node
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version-file: ".nvmrc"
36+
cache: "pnpm"
37+
38+
- name: Install Dependencies
39+
shell: bash
40+
run: pnpm install --frozen-lockfile
41+
42+
- name: Run ${{ matrix.script }}
43+
run: |
44+
pnpm run ${{ matrix.script }}

.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

.gitignore

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
# dependencies
44
/node_modules
55
/.pnp
6-
.yarn/*
7-
!.yarn/patches
8-
!.yarn/releases
9-
!.yarn/plugins
10-
!.yarn/sdks
11-
!.yarn/versions
126
.pnp.*
137

148
# testing

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.18.1

.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

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
## Install
1212

13-
yarn && yarn start
13+
```shellscript
14+
pnpm install && pnpm dev
15+
```
1416

1517
## Backers
1618

0 commit comments

Comments
 (0)