Skip to content

Commit b41410d

Browse files
committed
Merge branch 'main' of https://github.com/TanStack/form
2 parents 0d40001 + 449f5ee commit b41410d

File tree

12 files changed

+1339
-424
lines changed

12 files changed

+1339
-424
lines changed

.github/workflows/pr.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
node-version: 16.14.2
2323
cache: 'pnpm'
2424
- name: Install dependencies
25-
run: pnpm --filter "./packages/**" --filter form --prefer-offline install
25+
run: pnpm --filter "./packages/**" --filter form --prefer-offline install --no-frozen-lockfile
2626
- name: Run Tests
2727
uses: nick-fields/retry@v2.8.3
2828
with:
@@ -48,7 +48,7 @@ jobs:
4848
node-version: 16.14.2
4949
cache: 'pnpm'
5050
- name: Install dependencies
51-
run: pnpm --filter "./packages/**" --filter form --prefer-offline install
51+
run: pnpm --filter "./packages/**" --filter form --prefer-offline install --no-frozen-lockfile
5252
- run: pnpm run test:eslint --base=${{ github.event.pull_request.base.sha }}
5353
typecheck:
5454
name: 'Typecheck'
@@ -67,7 +67,7 @@ jobs:
6767
node-version: 16.14.2
6868
cache: 'pnpm'
6969
- name: Install dependencies
70-
run: pnpm --filter "./packages/**" --filter form --prefer-offline install
70+
run: pnpm --filter "./packages/**" --filter form --prefer-offline install --no-frozen-lockfile
7171
- run: pnpm run test:types --base=${{ github.event.pull_request.base.sha }}
7272
format:
7373
name: 'Format'
@@ -86,7 +86,7 @@ jobs:
8686
node-version: 16.14.2
8787
cache: 'pnpm'
8888
- name: Install dependencies
89-
run: pnpm --filter "./packages/**" --filter form --prefer-offline install
89+
run: pnpm --filter "./packages/**" --filter form --prefer-offline install --no-frozen-lockfile
9090
- run: pnpm run test:format --base=${{ github.event.pull_request.base.sha }}
9191
test-react-17:
9292
name: 'Test React 17'
@@ -105,7 +105,7 @@ jobs:
105105
node-version: 16.14.2
106106
cache: 'pnpm'
107107
- name: Install dependencies
108-
run: pnpm --filter "./packages/**" --filter form --prefer-offline install
108+
run: pnpm --filter "./packages/**" --filter form --prefer-offline install --no-frozen-lockfile
109109
- name: Run Tests
110110
uses: nick-fields/retry@v2.8.3
111111
with:
@@ -127,7 +127,7 @@ jobs:
127127
node-version: 16.14.2
128128
cache: 'pnpm'
129129
- name: Install dependencies
130-
run: pnpm --filter "./packages/**" --filter form --prefer-offline install
130+
run: pnpm --filter "./packages/**" --filter form --prefer-offline install --no-frozen-lockfile
131131
- run: pnpm run test:build
132132
env:
133133
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/packages/svelte-form/.svelte-kit
2+
/packages/*/build

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"nx-reset": "nx reset",
77
"clean": "pnpm --filter \"./packages/**\" run clean",
88
"preinstall": "node -e \"if(process.env.CI == 'true') {console.log('Skipping preinstall...'); process.exit(1)}\" || npx -y only-allow pnpm",
9-
"install:csb": "pnpm install --frozen-lockfile",
9+
"install:csb": "pnpm --filter \"./packages/**\" --prefer-offline install --no-frozen-lockfile",
1010
"test": "pnpm run test:ci",
1111
"test:ci": "nx affected --targets=test:lib,test:types,test:eslint,test:format --parallel=5",
1212
"test:react:17": "nx affected --target=test:lib --parallel=5",
@@ -66,21 +66,21 @@
6666
"chalk": "^4.1.2",
6767
"concurrently": "^7.1.0",
6868
"current-git-branch": "^1.1.0",
69-
"eslint": "7.x",
70-
"eslint-config-prettier": "^6.11.0",
71-
"eslint-config-react-app": "^5.2.1",
72-
"eslint-config-standard": "^14.1.1",
73-
"eslint-config-standard-react": "^9.2.0",
74-
"eslint-import-resolver-typescript": "^2.7.1",
75-
"eslint-plugin-flowtype": "5.x",
76-
"eslint-plugin-import": "^2.22.1",
77-
"eslint-plugin-jsx-a11y": "6.x",
69+
"eslint": "8.34.0",
70+
"eslint-config-prettier": "^8.6.0",
71+
"eslint-config-react-app": "^7.0.1",
72+
"eslint-config-standard": "^17.0.0",
73+
"eslint-config-standard-react": "^13.0.0",
74+
"eslint-import-resolver-typescript": "^3.5.3",
75+
"eslint-plugin-flowtype": "8.0.3",
76+
"eslint-plugin-import": "^2.27.5",
77+
"eslint-plugin-jsx-a11y": "^6.7.1",
7878
"eslint-plugin-node": "^11.1.0",
79-
"eslint-plugin-prettier": "^3.1.3",
80-
"eslint-plugin-promise": "^4.2.1",
81-
"eslint-plugin-react": "7.20.0",
82-
"eslint-plugin-react-hooks": "^4.3.0",
83-
"eslint-plugin-standard": "^4.0.1",
79+
"eslint-plugin-prettier": "^4.2.1",
80+
"eslint-plugin-promise": "^6.1.1",
81+
"eslint-plugin-react": "7.32.2",
82+
"eslint-plugin-react-hooks": "^4.6.0",
83+
"eslint-plugin-standard": "^5.0.0",
8484
"git-log-parser": "^1.2.0",
8585
"jest": "^27.5.1",
8686
"jsonfile": "^6.1.0",

packages/react-form/.eslintrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/react-form/.eslintrc.cjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// @ts-check
2+
3+
/** @type {import('eslint').Linter.Config} */
4+
const config = {
5+
parser: '@typescript-eslint/parser',
6+
parserOptions: {
7+
tsconfigRootDir: __dirname,
8+
project: './tsconfig.eslint.json',
9+
sourceType: 'module',
10+
},
11+
}
12+
13+
module.exports = config

packages/react-form/jest.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
export default {
22
displayName: 'react-form',
33
preset: '../../jest-preset.js',
4-
setupFilesAfterEnv: ['./jest.setup.ts'],
54
testMatch: ['<rootDir>/src/**/*.test.tsx', '<rootDir>/codemods/**/*.test.js'],
65
}

packages/react-form/src/formContext.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { FormApi } from '@tanstack/form-core'
1+
import type { FormApi } from '@tanstack/form-core'
22
import * as React from 'react'
33

4-
export const formContext = React.createContext<FormApi<any>>(null!)
4+
export const formContext = React.createContext<FormApi<any> | null>(null)
55

66
export function useFormContext(customFormApi?: FormApi<any>) {
77
const formApi = React.useContext(formContext)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"noEmit": true
5+
},
6+
"include": ["**/*.ts", "**/*.tsx", "./.eslintrc.cjs"]
7+
}

0 commit comments

Comments
 (0)