Skip to content

Commit 8134229

Browse files
ci: apply automated fixes
1 parent 96e113b commit 8134229

5 files changed

Lines changed: 15 additions & 13 deletions

File tree

‎examples/react-native/offline-transactions/app/index.tsx‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ export default function HomeScreen() {
2424
} catch (err) {
2525
if (!(disposed as boolean)) {
2626
console.error(`Failed to initialize:`, err)
27-
setError(
28-
err instanceof Error ? err.message : `Failed to initialize`,
29-
)
27+
setError(err instanceof Error ? err.message : `Failed to initialize`)
3028
}
3129
}
3230

‎examples/react-native/offline-transactions/server/index.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ function loadData() {
4141
}
4242

4343
function saveData() {
44-
writeFileSync(DATA_FILE, JSON.stringify(Array.from(todosStore.values()), null, 2))
44+
writeFileSync(
45+
DATA_FILE,
46+
JSON.stringify(Array.from(todosStore.values()), null, 2),
47+
)
4548
}
4649

4750
loadData()

‎examples/react-native/offline-transactions/src/components/TodoList.tsx‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
import NetInfo from '@react-native-community/netinfo'
1212
import { useLiveQuery } from '@tanstack/react-db'
1313
import { createTodoActions } from '../db/todos'
14-
import type { Todo, TodosHandle } from '../db/todos'
14+
import type { Todo, TodosHandle } from '../db/todos'
1515
import type { Collection } from '@tanstack/db'
1616

1717
interface TodoListProps {
@@ -31,9 +31,7 @@ export function TodoList({ collection, executor }: TodoListProps) {
3131
)
3232

3333
const { data: todoList = [] } = useLiveQuery((q) =>
34-
q
35-
.from({ todo: collection })
36-
.orderBy(({ todo }) => todo.createdAt, `desc`),
34+
q.from({ todo: collection }).orderBy(({ todo }) => todo.createdAt, `desc`),
3735
)
3836

3937
// Monitor network status

‎examples/react-native/offline-transactions/src/utils/api.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ export const todoApi = {
4646
return data.map(parseTodo)
4747
},
4848

49-
async create(data: { id?: string; text: string; completed?: boolean }): Promise<Todo> {
49+
async create(data: {
50+
id?: string
51+
text: string
52+
completed?: boolean
53+
}): Promise<Todo> {
5054
const response = await fetch(`${BASE_URL}/api/todos`, {
5155
method: 'POST',
5256
headers: { 'Content-Type': 'application/json' },

‎packages/db-react-native-sqlite-persisted-collection/src/op-sqlite-driver.ts‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,9 @@ async function resolveAsyncLocalStorageCtor(): Promise<AsyncLocalStorageCtor | n
9090
// Use Function constructor to hide the dynamic import from React Native
9191
// bundlers — Metro rejects non-literal dynamic import() at transform time.
9292
// On React Native this code path is never reached (guarded above).
93-
const importFn = new Function(
94-
`s`,
95-
`return import(s)`,
96-
) as (specifier: string) => Promise<{
93+
const importFn = new Function(`s`, `return import(s)`) as (
94+
specifier: string,
95+
) => Promise<{
9796
AsyncLocalStorage?: AsyncLocalStorageCtor
9897
}>
9998
const asyncHooksModule = await importFn(getNodeAsyncHooksSpecifier())

0 commit comments

Comments
 (0)