Skip to content

Commit f93a008

Browse files
ci: apply automated fixes
1 parent ea173ee commit f93a008

60 files changed

Lines changed: 559 additions & 475 deletions

Some content is hidden

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

scripts/extract-solid-ref.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ const CANONICAL_ROUTES = {
5656
refresh: ["lifecycle-actions/refresh.mdx", "Lifecycle & Actions"],
5757

5858
children: ["components-context/children.mdx", "Components & Context"],
59-
createContext: ["components-context/create-context.mdx", "Components & Context"],
59+
createContext: [
60+
"components-context/create-context.mdx",
61+
"Components & Context",
62+
],
6063
createUniqueId: [
6164
"components-context/create-unique-id.mdx",
6265
"Components & Context",

src/routes/v2/reference/advanced/interop-async/enable-external-source.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ optional wrapper for `untrack` — disables external tracking too.
4949
// change. `untrack` mirrors Solid's `untrack()` into the external library
5050
// so that reads inside `untrack(...)` don't get tracked twice.
5151
enableExternalSource({
52-
factory: (compute, trigger) => {
53-
const sub = externalLib.subscribe(trigger);
54-
return {
55-
track: prev => externalLib.run(() => compute(prev)),
56-
dispose: () => sub.unsubscribe()
57-
};
58-
},
59-
untrack: fn => externalLib.untracked(fn)
52+
factory: (compute, trigger) => {
53+
const sub = externalLib.subscribe(trigger);
54+
return {
55+
track: (prev) => externalLib.run(() => compute(prev)),
56+
dispose: () => sub.unsubscribe(),
57+
};
58+
},
59+
untrack: (fn) => externalLib.untracked(fn),
6060
});
6161
```

src/routes/v2/reference/advanced/interop-async/flatten.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ import { flatten } from "solid-js";
2929

3030
```ts
3131
function flatten(
32-
children: any,
33-
options?: { skipNonRendered?: boolean; doNotUnwrap?: boolean }
32+
children: any,
33+
options?: { skipNonRendered?: boolean; doNotUnwrap?: boolean }
3434
): any;
3535
```
3636

@@ -51,6 +51,6 @@ value or array of values to flatten
5151
// Custom renderer walking a children tree manually. Most authors should
5252
// use `children()` from solid-js, which memoizes the resolved value.
5353
function renderChildren(value: unknown): unknown {
54-
return flatten(value, { skipNonRendered: true });
54+
return flatten(value, { skipNonRendered: true });
5555
}
5656
```

src/routes/v2/reference/advanced/interop-async/not-ready-error.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ import { NotReadyError } from "solid-js";
3232

3333
```ts
3434
class NotReadyError extends Error {
35-
constructor(public source: any) {
36-
super();
37-
}
38-
};
35+
constructor(public source: any) {
36+
super();
37+
}
38+
}
3939
```
4040

4141
## Examples
@@ -44,9 +44,9 @@ class NotReadyError extends Error {
4444
// Advanced: distinguish "not ready yet" from a real error in custom
4545
// boundary plumbing. App code should rely on `<Loading>` / `<Errored>`.
4646
try {
47-
const value = readReactiveSource();
47+
const value = readReactiveSource();
4848
} catch (err) {
49-
if (err instanceof NotReadyError) throw err; // re-throw to suspend
50-
reportError(err);
49+
if (err instanceof NotReadyError) throw err; // re-throw to suspend
50+
reportError(err);
5151
}
5252
```

src/routes/v2/reference/advanced/interop-async/resolve.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Awaits a reactive expression and returns its first fully-settled value as a
1616
waited on; once the expression returns synchronously without `NotReadyError`
1717
the promise resolves with that value.
1818

19-
Must be called *outside* a tracking scope — it doesn't subscribe, it just
19+
Must be called _outside_ a tracking scope — it doesn't subscribe, it just
2020
resolves the current value once.
2121

2222
## Import
@@ -40,7 +40,7 @@ a reactive expression to resolve
4040
## Examples
4141

4242
```ts
43-
const user = createMemo(() => fetch(`/users/${id()}`).then(r => r.json()));
43+
const user = createMemo(() => fetch(`/users/${id()}`).then((r) => r.json()));
4444

4545
// outside any reactive scope
4646
const initial = await resolve(() => user());

src/routes/v2/reference/advanced/jsx-component-primitives/create-error-boundary.mdx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,25 @@ import { createErrorBoundary } from "solid-js";
2929

3030
```ts
3131
function createErrorBoundary<U>(
32-
fn: () => any,
33-
fallback: (error: unknown, reset: () => void) => U
32+
fn: () => any,
33+
fallback: (error: unknown, reset: () => void) => U
3434
);
3535
```
3636

3737
## Examples
3838

3939
```tsx
4040
// Custom boundary that wraps the primitive and adds telemetry.
41-
function TracedErrored(props: { fallback: (e: unknown) => JSX.Element; children: JSX.Element }) {
42-
return createErrorBoundary(
43-
() => props.children,
44-
(err, reset) => {
45-
reportError(err);
46-
return props.fallback(err);
47-
}
48-
) as unknown as JSX.Element;
41+
function TracedErrored(props: {
42+
fallback: (e: unknown) => JSX.Element;
43+
children: JSX.Element;
44+
}) {
45+
return createErrorBoundary(
46+
() => props.children,
47+
(err, reset) => {
48+
reportError(err);
49+
return props.fallback(err);
50+
}
51+
) as unknown as JSX.Element;
4952
}
5053
```

src/routes/v2/reference/advanced/jsx-component-primitives/create-loading-boundary.mdx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ import { createLoadingBoundary } from "solid-js";
2626

2727
```ts
2828
function createLoadingBoundary(
29-
fn: () => any,
30-
fallback: () => any,
31-
options?: { on?: () => any }
29+
fn: () => any,
30+
fallback: () => any,
31+
options?: { on?: () => any }
3232
): () => unknown;
3333
```
3434

@@ -37,10 +37,13 @@ function createLoadingBoundary(
3737
```tsx
3838
// Custom boundary component built on the primitive. App code uses
3939
// `<Loading fallback={…}>` directly.
40-
function MyLoading(props: { fallback: JSX.Element; children: JSX.Element }): JSX.Element {
41-
return createLoadingBoundary(
42-
() => props.children,
43-
() => props.fallback
44-
) as unknown as JSX.Element;
40+
function MyLoading(props: {
41+
fallback: JSX.Element;
42+
children: JSX.Element;
43+
}): JSX.Element {
44+
return createLoadingBoundary(
45+
() => props.children,
46+
() => props.fallback
47+
) as unknown as JSX.Element;
4548
}
4649
```

src/routes/v2/reference/advanced/jsx-component-primitives/create-reveal-order.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ source_path: "packages/solid-signals/src/boundaries.ts"
1414
Coordinate the reveal timing of sibling loading boundaries.
1515

1616
Accepts reactive accessors:
17+
1718
- `order`: `"sequential"` (default) | `"together"` | `"natural"`.
1819
- `"sequential"` — classic frontier reveal: siblings reveal in registration order
1920
as each resolves; later siblings stay hidden until earlier ones complete.
@@ -34,6 +35,7 @@ releases that slot. Once released, the inner controller runs its own order local
3435
over anything still pending. There is no opt-out from an outer hold.
3536

3637
"Minimally ready" is what an order considers its first visible content:
38+
3739
- `sequential` — frontier-0 is minimally ready (leaf: on resolve; nested: via its
3840
own minimal signal).
3941
- `together` — every direct slot is minimally ready.
@@ -50,8 +52,8 @@ import { createRevealOrder } from "solid-js";
5052

5153
```ts
5254
function createRevealOrder<T>(
53-
fn: () => T,
54-
options?: { order?: OrderAccessor; collapsed?: BoolAccessor }
55+
fn: () => T,
56+
options?: { order?: OrderAccessor; collapsed?: BoolAccessor }
5557
): T;
5658
```
5759

@@ -61,8 +63,8 @@ function createRevealOrder<T>(
6163
// Primitive form of `<Reveal>` — coordinate sibling loading boundaries
6264
// programmatically. App code uses the JSX `<Reveal>` component instead.
6365
// Both options are accessors so they can react to state changes.
64-
createRevealOrder(
65-
() => renderSiblings(),
66-
{ order: () => mode(), collapsed: () => true }
67-
);
66+
createRevealOrder(() => renderSiblings(), {
67+
order: () => mode(),
68+
collapsed: () => true,
69+
});
6870
```

src/routes/v2/reference/advanced/jsx-component-primitives/map-array.mdx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,20 @@ import { mapArray } from "solid-js";
3535

3636
```ts
3737
function mapArray<Item, MappedItem>(
38-
list: Accessor<Maybe<readonly Item[]>>,
39-
map: (value: Accessor<Item>, index: Accessor<number>) => MappedItem,
40-
options?: { keyed?: boolean | ((item: Item) => any); fallback?: Accessor<any>; name?: string }
38+
list: Accessor<Maybe<readonly Item[]>>,
39+
map: (value: Accessor<Item>, index: Accessor<number>) => MappedItem,
40+
options?: {
41+
keyed?: boolean | ((item: Item) => any);
42+
fallback?: Accessor<any>;
43+
name?: string;
44+
}
4145
): Accessor<MappedItem[]>;
4246
```
4347

4448
## Examples
4549

4650
```ts
47-
const view = mapArray(
48-
items,
49-
(item, index) => `${index()}: ${item().label}`,
50-
{ fallback: () => "no items" }
51-
);
51+
const view = mapArray(items, (item, index) => `${index()}: ${item().label}`, {
52+
fallback: () => "no items",
53+
});
5254
```

src/routes/v2/reference/advanced/jsx-component-primitives/repeat.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ import { repeat } from "solid-js";
2828

2929
```ts
3030
function repeat(
31-
count: Accessor<number>,
32-
map: (index: number) => any,
33-
options?: {
34-
from?: Accessor<number | undefined>;
35-
fallback?: Accessor<any>;
36-
name?: string;
37-
}
31+
count: Accessor<number>,
32+
map: (index: number) => any,
33+
options?: {
34+
from?: Accessor<number | undefined>;
35+
fallback?: Accessor<any>;
36+
name?: string;
37+
}
3838
): Accessor<any[]>;
3939
```
4040

4141
## Examples
4242

4343
```ts
44-
const view = repeat(count, i => `Item ${i}`, { fallback: () => "empty" });
44+
const view = repeat(count, (i) => `Item ${i}`, { fallback: () => "empty" });
4545
```

0 commit comments

Comments
 (0)