Skip to content

Commit c0b695f

Browse files
ci: apply automated fixes
1 parent 8211b64 commit c0b695f

File tree

118 files changed

+79
-253
lines changed

Some content is hidden

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

118 files changed

+79
-253
lines changed

examples/react/start-basic/src/routes/_pathlessLayout/_nested-layout/route-a.tsx

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
2-
3-
export const Route = createFileRoute(
4-
{
5-
component: LayoutAComponent,
6-
},
7-
)
1+
export const Route = createFileRoute({
2+
component: LayoutAComponent,
3+
})
84

95
function LayoutAComponent() {
106
return <div>I'm A!</div>

examples/react/start-basic/src/routes/_pathlessLayout/_nested-layout/route-b.tsx

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
2-
3-
export const Route = createFileRoute(
4-
{
5-
component: LayoutBComponent,
6-
},
7-
)
1+
export const Route = createFileRoute({
2+
component: LayoutBComponent,
3+
})
84

95
function LayoutBComponent() {
106
return <div>I'm B!</div>

examples/react/start-basic/src/routes/index.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: Home,
53
})

examples/react/start-basic/src/routes/posts.index.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: PostsIndexComponent,
53
})

examples/react/start-basic/src/routes/redirect.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { redirect } from '@tanstack/react-router'
1+
import { redirect } from '@tanstack/react-router'
22

33
export const Route = createFileRoute({
44
beforeLoad: async () => {

examples/react/start-basic/src/routes/users.index.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: UsersIndexComponent,
53
})

examples/react/start-large/src/routes/index.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from 'react'
22

3-
43
export const Route = createFileRoute({
54
component: Home,
65
})
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from 'react'
22

3-
43
export const Route = createFileRoute({
54
component: () => <div>Hello /params!</div>,
65
})

examples/react/start-large/src/routes/search/route.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import * as v from 'valibot'
32

43
const search = v.object({

examples/solid/start-bare/src/routes/about.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: RouteComponent,
53
})

examples/solid/start-bare/src/routes/index.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import Counter from '~/components/Counter'
32
export const Route = createFileRoute({
43
component: RouteComponent,

examples/solid/start-bare/vite.config.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ export default defineConfig({
1111
tsConfigPaths({
1212
projects: ['./tsconfig.json'],
1313
}),
14-
TanStackStartVitePlugin({
15-
16-
}),
14+
TanStackStartVitePlugin({}),
1715
tailwindcss(),
1816
],
1917
})

examples/solid/start-basic/src/routes/_pathlessLayout/_nested-layout/route-a.tsx

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
2-
3-
export const Route = createFileRoute(
4-
{
5-
component: LayoutAComponent,
6-
},
7-
)
1+
export const Route = createFileRoute({
2+
component: LayoutAComponent,
3+
})
84

95
function LayoutAComponent() {
106
return <div>I'm A!</div>

examples/solid/start-basic/src/routes/_pathlessLayout/_nested-layout/route-b.tsx

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
2-
3-
export const Route = createFileRoute(
4-
{
5-
component: LayoutBComponent,
6-
},
7-
)
1+
export const Route = createFileRoute({
2+
component: LayoutBComponent,
3+
})
84

95
function LayoutBComponent() {
106
return <div>I'm B!</div>

examples/solid/start-basic/src/routes/index.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: Home,
53
})

examples/solid/start-basic/src/routes/posts.index.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: PostsIndexComponent,
53
})

examples/solid/start-basic/src/routes/posts_.$postId.deep.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ function PostDeepComponent() {
1616

1717
return (
1818
<div class="p-2 space-y-2">
19-
<Link
20-
to="/posts"
21-
class="block py-1 text-blue-800 hover:text-blue-600"
22-
>
19+
<Link to="/posts" class="block py-1 text-blue-800 hover:text-blue-600">
2320
← All Posts
2421
</Link>
2522
<h4 class="text-xl font-bold underline">{post().title}</h4>

examples/solid/start-basic/src/routes/redirect.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { redirect } from '@tanstack/solid-router'
1+
import { redirect } from '@tanstack/solid-router'
22

33
export const Route = createFileRoute({
44
beforeLoad: async () => {

examples/solid/start-basic/src/routes/users.index.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: UsersIndexComponent,
53
})

examples/solid/start-basic/vite.config.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ export default defineConfig({
1010
tsConfigPaths({
1111
projects: ['./tsconfig.json'],
1212
}),
13-
TanStackStartVitePlugin({
14-
15-
}),
13+
TanStackStartVitePlugin({}),
1614
],
1715
})
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import { compileStartOutputFactory } from '@tanstack/start-plugin-core'
22

3-
export const compileStartOutput = compileStartOutputFactory('react');
3+
export const compileStartOutput = compileStartOutputFactory('react')

packages/react-start-plugin/src/index.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ export const clientDistDir = 'node_modules/.tanstack-start/client-dist'
2121
export function TanStackStartVitePlugin(
2222
opts?: TanStackStartInputConfig & WithReactPlugin,
2323
): Array<PluginOption> {
24-
type OptionsWithReact = ReturnType<typeof getTanStackStartOptions> & WithReactPlugin;
25-
const options: OptionsWithReact = getTanStackStartOptions(opts);
24+
type OptionsWithReact = ReturnType<typeof getTanStackStartOptions> &
25+
WithReactPlugin
26+
const options: OptionsWithReact = getTanStackStartOptions(opts)
2627

2728
return [
2829
{
@@ -180,4 +181,4 @@ function injectDefineEnv<TKey extends string, TValue extends string>(
180181
// return !options.server.prerender?.routes
181182
// }
182183

183-
export { compileStartOutput } from './compilers'
184+
export { compileStartOutput } from './compilers'

packages/react-start-plugin/src/prerender.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { getRollupConfig } from 'nitropack/rollup'
55
import { createNitro } from 'nitropack'
66
import { joinURL, withBase, withoutBase } from 'ufo'
77
import { Queue, buildNitroEnvironment } from '@tanstack/start-plugin-core'
8-
import type { Page} from '@tanstack/start-plugin-core';
8+
import type { Page } from '@tanstack/start-plugin-core'
99
import type { ViteBuilder } from 'vite'
1010
import type { $Fetch, Nitro } from 'nitropack'
1111
import type { TanStackStartOutputConfig } from './schema.js'

packages/react-start-plugin/src/schema.ts

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
import { z } from 'zod'
2-
import { createTanStackConfig, createTanStackStartOptionsSchema } from '@tanstack/start-plugin-core'
2+
import {
3+
createTanStackConfig,
4+
createTanStackStartOptionsSchema,
5+
} from '@tanstack/start-plugin-core'
36
import type { Options as ViteReactOptions } from '@vitejs/plugin-react'
47

58
export type WithReactPlugin = {
69
react?: ViteReactOptions
710
}
811

912
const frameworkPlugin = {
10-
react: z.custom<ViteReactOptions>().optional()
13+
react: z.custom<ViteReactOptions>().optional(),
1114
}
1215

1316
// eslint-disable-next-line unused-imports/no-unused-vars
14-
const TanStackStartOptionsSchema = createTanStackStartOptionsSchema(frameworkPlugin)
17+
const TanStackStartOptionsSchema =
18+
createTanStackStartOptionsSchema(frameworkPlugin)
1519

1620
const defaultConfig = createTanStackConfig(frameworkPlugin)
1721

@@ -25,4 +29,3 @@ export type TanStackStartInputConfig = z.input<
2529
export type TanStackStartOutputConfig = ReturnType<
2630
typeof getTanStackStartOptions
2731
>
28-

packages/router-generator/tests/generator/append-and-prepend/routes/index.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from 'react'
22

3-
43
export const Route = createFileRoute({
54
component: Home,
65
validateSearch: () => ({
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: () => <div>Hello /!</div>,
53
})
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: () => <div>Hello /blog/$slug!</div>,
53
})
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: () => <div>Hello /blog/!</div>,
53
})
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: () => <div>Hello /blog!</div>,
53
})
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: () => <div>Hello /posts/$postId/!</div>,
53
})
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: () => <div>Hello /posts/$postId/deep!</div>,
53
})
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: () => <div>Hello /posts/!</div>,
53
})
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: () => <div>Hello /posts!</div>,
53
})
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: () => <div>Hello /_auth/!</div>,
53
})
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: () => <div>Hello /!</div>,
53
})

packages/router-generator/tests/generator/file-modification/snapshot/bar.lazy.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// @ts-nocheck
22

33
import * as React from 'react'
4-
import { ErrorComponent,
4+
import {
5+
ErrorComponent,
56
ErrorComponentProps,
6-
Link } from '@tanstack/react-router'
7+
Link,
8+
} from '@tanstack/react-router'
79

810
export const Route = createFileRoute({
911
loader: async ({ params: { postId } }) => ({

packages/router-generator/tests/generator/file-modification/snapshot/foo.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// @ts-nocheck
22

33
import * as React from 'react'
4-
import { ErrorComponent,
4+
import {
5+
ErrorComponent,
56
ErrorComponentProps,
6-
Link } from '@tanstack/react-router'
7+
Link,
8+
} from '@tanstack/react-router'
79

810
export const Route = createFileRoute({
911
loader: async ({ params: { postId } }) => ({

packages/router-generator/tests/generator/file-modification/snapshot/initiallyEmpty.lazy.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// @ts-nocheck
22

33
import * as React from 'react'
4-
import { ErrorComponent,
4+
import {
5+
ErrorComponent,
56
ErrorComponentProps,
6-
Link } from '@tanstack/react-router'
7+
Link,
8+
} from '@tanstack/react-router'
79

810
export const Route = createFileRoute({
911
loader: async ({ params: { postId } }) => ({

packages/router-generator/tests/generator/file-modification/snapshot/initiallyEmpty.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// @ts-nocheck
22

33
import * as React from 'react'
4-
import { ErrorComponent,
4+
import {
5+
ErrorComponent,
56
ErrorComponentProps,
6-
Link } from '@tanstack/react-router'
7+
Link,
8+
} from '@tanstack/react-router'
79

810
export const Route = createFileRoute({
911
loader: async ({ params: { postId } }) => ({

packages/router-generator/tests/generator/file-modification/snapshot/initiallyLazy.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// @ts-nocheck
22

33
import * as React from 'react'
4-
import { ErrorComponent,
4+
import {
5+
ErrorComponent,
56
ErrorComponentProps,
6-
Link } from '@tanstack/react-router'
7+
Link,
8+
} from '@tanstack/react-router'
79

810
export const Route = createFileRoute({
911
loader: async ({ params: { postId } }) => ({

packages/router-generator/tests/generator/nested-route-groups-with-layouts-before-physical/routes/(group-a)/_layout-a.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: RouteComponent,
53
})

packages/router-generator/tests/generator/nested-route-groups-with-layouts-before-physical/routes/(group-a)/_layout-a/login.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: RouteComponent,
53
})

packages/router-generator/tests/generator/nested-route-groups-with-layouts-before-physical/routes/(group-a)/_layout-a/signup.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: RouteComponent,
53
})

packages/router-generator/tests/generator/nested-route-groups-with-layouts-before-physical/routes/(group-b)/_layout-b.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: RouteComponent,
53
})

packages/router-generator/tests/generator/nested-route-groups-with-layouts-before-physical/routes/(group-b)/_layout-b/dashboard.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
export const Route = createFileRoute({
42
component: RouteComponent,
53
})

0 commit comments

Comments
 (0)