Skip to content

Commit 22decc1

Browse files
autofix-ci[bot]JoviDeCroock
authored andcommitted
ci: apply automated fixes and generate docs
1 parent a8dc0ee commit 22decc1

5 files changed

Lines changed: 13 additions & 26 deletions

File tree

packages/preact-form/src/createFormHook.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ import type {
1414
FormOptions,
1515
FormValidateOrFn,
1616
} from '@tanstack/form-core'
17-
import type {
18-
ComponentType,
19-
Context,
20-
FunctionComponent,
21-
} from 'preact'
17+
import type { ComponentType, Context, FunctionComponent } from 'preact'
2218
import type { PropsWithChildren } from './types'
2319
import type { FieldComponent } from './useField'
2420
import type { ReactFormExtendedApi } from './useForm'

packages/preact-form/src/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type {
99
FormState,
1010
FormValidateOrFn,
1111
} from '@tanstack/form-core'
12-
import type { ComponentChildren } from 'preact';
12+
import type { ComponentChildren } from 'preact'
1313

1414
interface FieldOptionsMode {
1515
mode?: 'value' | 'array'
@@ -139,5 +139,5 @@ export type ServerFormState<
139139
>
140140

141141
export type PropsWithChildren<P = unknown> = P & {
142-
children?: ComponentChildren | undefined;
143-
};
142+
children?: ComponentChildren | undefined
143+
}

packages/preact-form/src/useFieldGroup.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@ import type {
1111
FormValidateOrFn,
1212
} from '@tanstack/form-core'
1313
import type { AppFieldExtendedReactFormApi } from './createFormHook'
14-
import type {
15-
ComponentChild,
16-
ComponentType,
17-
FunctionComponent,
18-
} from 'preact'
14+
import type { ComponentChild, ComponentType, FunctionComponent } from 'preact'
1915
import type { LensFieldComponent } from './useField'
2016
import type { PropsWithChildren } from './types'
2117

packages/preact-form/tests/useField.test.tsx

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -719,9 +719,7 @@ describe('useField', () => {
719719
<div>Password</div>
720720
<input
721721
value={field.state.value}
722-
onInput={(e) =>
723-
field.handleChange(e.currentTarget.value)
724-
}
722+
onInput={(e) => field.handleChange(e.currentTarget.value)}
725723
/>
726724
</label>
727725
</div>
@@ -747,9 +745,7 @@ describe('useField', () => {
747745
<div>Confirm Password</div>
748746
<input
749747
value={field.state.value}
750-
onInput={(e) =>
751-
field.handleChange(e.currentTarget.value)
752-
}
748+
onInput={(e) => field.handleChange(e.currentTarget.value)}
753749
/>
754750
</label>
755751
{field.state.meta.errors.map((err) => {
@@ -936,9 +932,7 @@ describe('useField', () => {
936932
)
937933
}
938934

939-
const { getByText, queryByText } = render(
940-
<Comp />
941-
)
935+
const { getByText, queryByText } = render(<Comp />)
942936
expect(getByText('[]')).toBeInTheDocument()
943937
await user.click(getByText('Add person'))
944938
expect(getByText(`["Test"]`)).toBeInTheDocument()
@@ -1144,9 +1138,7 @@ describe('useField', () => {
11441138
)
11451139
}
11461140

1147-
const { getByTestId } = render(
1148-
<Comp />
1149-
)
1141+
const { getByTestId } = render(<Comp />)
11501142

11511143
const arrayFieldInitialRender = renderCount.arrayField
11521144
const childFieldInitialRender = renderCount.childField

scripts/generate-docs.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ await generateReferenceDocs({
4141
{
4242
name: 'preact-form',
4343
entryPoints: [resolve(__dirname, '../packages/preact-form/src/index.ts')],
44-
tsconfig: resolve(__dirname, '../packages/preact-form/tsconfig.docs.json'),
44+
tsconfig: resolve(
45+
__dirname,
46+
'../packages/preact-form/tsconfig.docs.json',
47+
),
4548
outputDir: resolve(__dirname, '../docs/framework/preact/reference'),
4649
exclude: ['packages/form-core/**/*'],
4750
},

0 commit comments

Comments
 (0)