Skip to content

Commit 4d50bc4

Browse files
committed
build: switch to oxfmt and oxlint
1 parent eb94d07 commit 4d50bc4

7 files changed

Lines changed: 112 additions & 7 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
node-version: ${{ matrix.node-version }}
1919
- uses: oven-sh/setup-bun@v2
2020
- run: bun install --frozen-lockfile
21+
- run: bun run lint
22+
- run: bun run format:check
2123
- run: bun run typecheck
2224
- run: bun test
2325
- run: bun run build

‎.oxfmtrc.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"printWidth": 80
4+
}

‎.oxlintrc.json‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"categories": {
4+
"correctness": "error"
5+
}
6+
}

‎bun.lock‎

Lines changed: 84 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,30 @@
6161
"build": "rm -rf dist && tsc -p tsconfig.build.json",
6262
"prepack": "bun run build",
6363
"test": "bun test src tests/live/credential.test.ts tests/live/fixtures.test.ts tests/live/oauth.test.ts",
64-
"test:live": "bun test tests/live"
64+
"test:live": "bun test tests/live",
65+
"lint": "oxlint",
66+
"format": "oxfmt",
67+
"format:check": "oxfmt --check"
6568
},
6669
"peerDependencies": {
6770
"@intx/agent": "*",
6871
"@intx/types": "*"
6972
},
7073
"peerDependenciesMeta": {
71-
"@intx/agent": { "optional": true },
72-
"@intx/types": { "optional": true }
74+
"@intx/agent": {
75+
"optional": true
76+
},
77+
"@intx/types": {
78+
"optional": true
79+
}
7380
},
7481
"devDependencies": {
7582
"@intx/agent": "^0.3.0",
7683
"@intx/types": "^0.3.0",
7784
"@types/bun": "1.3.14",
7885
"@types/node": "22.10.5",
86+
"oxfmt": "0.70.0",
87+
"oxlint": "1.85.0",
7988
"typescript": "5.9.3"
8089
},
8190
"dependencies": {

‎src/client/client.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@ import {
99
GmailThreadSchema,
1010
parseGmailResponse,
1111
type GmailDraft,
12-
type GmailHeader,
1312
type GmailListDraftsResponse,
1413
type GmailListLabelsResponse,
1514
type GmailListMessagesResponse,
1615
type GmailListThreadsResponse,
1716
type GmailMessage,
18-
type GmailMessagePart,
1917
type GmailResponseSchema,
2018
type GmailThread,
2119
} from "./schemas.js";

‎src/tools/create-tools.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,12 @@ async function lookupThreads(
190190
view: GmailThreadView,
191191
signal: AbortSignal,
192192
) {
193-
const threads = new Array<{
193+
const threads = Array.from<{
194194
id: string;
195195
messages: ReturnType<typeof toThreadListMessage>[];
196-
}>(threadIds.length);
196+
}>({
197+
length: threadIds.length,
198+
});
197199
let nextIndex = 0;
198200
let failed = false;
199201
const worker = async () => {

0 commit comments

Comments
 (0)