Skip to content

Commit 8a10d56

Browse files
authored
Merge pull request #32 from objectstack-ai/copilot/fix-ci-lint-build-test
2 parents 14fb6a3 + 63f3793 commit 8a10d56

39 files changed

Lines changed: 95 additions & 78 deletions

.eslintrc.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@ module.exports = {
2222
rules: {
2323
"react/react-in-jsx-scope": "off",
2424
"react/prop-types": "off",
25+
"@typescript-eslint/no-unused-vars": [
26+
"error",
27+
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
28+
],
2529
},
30+
overrides: [
31+
{
32+
files: ["__tests__/**", "jest.setup.ts"],
33+
rules: {
34+
"@typescript-eslint/no-explicit-any": "off",
35+
"@typescript-eslint/no-var-requires": "off",
36+
},
37+
},
38+
],
2639
ignorePatterns: ["node_modules/", ".expo/", "dist/", "*.config.js", "babel.config.js"],
2740
};

__tests__/hooks/useAI.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Tests for useAI – validates AI integration hooks wrapping client.ai.*.
33
*/
4-
import { renderHook, act, waitFor } from "@testing-library/react-native";
4+
import { renderHook, act } from "@testing-library/react-native";
55

66
/* ---- Mock useClient from SDK ---- */
77
const mockNlq = jest.fn();

__tests__/hooks/useOfflineSync.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ describe("useOfflineSync", () => {
134134
mockGetPendingEntries.mockReturnValue([entry]);
135135
mockCreate.mockResolvedValue({ id: "created-1" });
136136

137-
const { result } = renderHook(() => useOfflineSync());
137+
renderHook(() => useOfflineSync());
138138

139139
// The hook auto-syncs on mount when online
140140
await waitFor(() => {

__tests__/lib/objectstack.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import { createObjectStackClient, objectStackClient } from "~/lib/objectstack";
66

77
describe("createObjectStackClient", () => {
88
it("creates a client with token", () => {
9-
const client = createObjectStackClient("test-token");
9+
createObjectStackClient("test-token");
1010
expect(ObjectStackClient).toHaveBeenCalledWith(
1111
expect.objectContaining({ token: "test-token" }),
1212
);
1313
});
1414

1515
it("creates a client without token", () => {
16-
const client = createObjectStackClient();
16+
createObjectStackClient();
1717
expect(ObjectStackClient).toHaveBeenCalledWith(
1818
expect.objectContaining({ token: undefined }),
1919
);

__tests__/lib/offline-storage.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
applySchemaVersion,
1717
} from "~/lib/offline-storage";
1818

19-
const mockDb = (SQLite.openDatabaseSync as jest.Mock).mock.results[0]?.value ??
19+
const _mockDb = (SQLite.openDatabaseSync as jest.Mock).mock.results[0]?.value ??
2020
(SQLite.openDatabaseSync as jest.Mock)("test");
2121

2222
beforeEach(() => {

__tests__/lib/security-audit.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import {
55
createSecurityAudit,
66
getDefaultSecurityChecks,
7-
type AuditCheckDefinition,
87
} from "~/lib/security-audit";
98

109
describe("createSecurityAudit", () => {

__tests__/msw/handlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const sampleApps = [
3030

3131
export const handlers = [
3232
/* ---- Query records ---- */
33-
http.get(`${API_BASE}/objects/:objectName/records`, ({ params }) => {
33+
http.get(`${API_BASE}/objects/:objectName/records`, () => {
3434
return HttpResponse.json({
3535
records: sampleRecords,
3636
count: sampleRecords.length,

__tests__/snapshots/action-components.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ describe("executeAction", () => {
105105
type: "url",
106106
target: "https://example.com/{id}",
107107
};
108-
const result = await executeAction(action, {
108+
await executeAction(action, {
109109
client: mockClient,
110110
record: { id: "123" },
111111
});

__tests__/snapshots/batch-components.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Snapshot tests for batch and action components.
33
*/
44
import React from "react";
5-
import { render, fireEvent } from "@testing-library/react-native";
5+
import { render } from "@testing-library/react-native";
66

77
import { BatchActionBar } from "~/components/batch/BatchActionBar";
88
import { BatchProgressIndicator } from "~/components/batch/BatchProgressIndicator";

__tests__/snapshots/common-components-extended.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Snapshot and behavior tests for more common components.
33
*/
44
import React from "react";
5-
import { render, fireEvent } from "@testing-library/react-native";
5+
import { render } from "@testing-library/react-native";
66
import { Text, View } from "react-native";
77

88
import { OfflineIndicator } from "~/components/common/OfflineIndicator";

0 commit comments

Comments
 (0)