Skip to content

Commit 245c7a3

Browse files
committed
build: add TypeScript/Bun project configuration
- package.json: Dependencies (@opencode-ai/sdk, commander), scripts - tsconfig.json: TypeScript compiler options for Bun - biome.json: Linting and formatting configuration - bun.lock: Dependency lock file Signed-off-by: leocavalcante <[email protected]>
1 parent 2c68607 commit 245c7a3

File tree

4 files changed

+142
-0
lines changed

4 files changed

+142
-0
lines changed

biome.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
3+
"linter": {
4+
"enabled": true,
5+
"rules": {
6+
"recommended": true,
7+
"correctness": {
8+
"noUnusedImports": "warn",
9+
"noUnusedVariables": "warn"
10+
}
11+
}
12+
},
13+
"formatter": {
14+
"enabled": true,
15+
"indentStyle": "tab",
16+
"indentWidth": 2,
17+
"lineWidth": 100
18+
},
19+
"javascript": {
20+
"formatter": {
21+
"quoteStyle": "double",
22+
"semicolons": "asNeeded"
23+
}
24+
},
25+
"files": {
26+
"includes": ["src/**/*.ts", "tests/**/*.ts"]
27+
}
28+
}

bun.lock

Lines changed: 53 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: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "opencoder",
3+
"version": "1.0.0",
4+
"description": "Autonomous development loop powered by OpenCode",
5+
"type": "module",
6+
"main": "src/index.ts",
7+
"bin": {
8+
"opencoder": "src/index.ts"
9+
},
10+
"scripts": {
11+
"start": "bun run src/index.ts",
12+
"dev": "bun run src/index.ts",
13+
"build": "bun build --compile --minify --sourcemap src/index.ts --outfile opencoder",
14+
"build:linux": "bun build --compile --minify --sourcemap --target=bun-linux-x64 src/index.ts --outfile opencoder-linux-x64",
15+
"build:darwin": "bun build --compile --minify --sourcemap --target=bun-darwin-arm64 src/index.ts --outfile opencoder-darwin-arm64",
16+
"build:windows": "bun build --compile --minify --sourcemap --target=bun-windows-x64 src/index.ts --outfile opencoder.exe",
17+
"test": "bun test",
18+
"lint": "bunx biome check src/ tests/",
19+
"lint:fix": "bunx biome check --write src/ tests/",
20+
"format": "bunx biome format --write src/ tests/"
21+
},
22+
"dependencies": {
23+
"@opencode-ai/sdk": "^1.1.25",
24+
"commander": "^14.0.2"
25+
},
26+
"devDependencies": {
27+
"@biomejs/biome": "^2.3.11",
28+
"@types/bun": "latest"
29+
},
30+
"peerDependencies": {
31+
"typescript": "^5"
32+
}
33+
}

tsconfig.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"compilerOptions": {
3+
"lib": ["ESNext"],
4+
"target": "ESNext",
5+
"module": "ESNext",
6+
"moduleDetection": "force",
7+
"moduleResolution": "bundler",
8+
"allowImportingTsExtensions": true,
9+
"verbatimModuleSyntax": true,
10+
"noEmit": true,
11+
"strict": true,
12+
"skipLibCheck": true,
13+
"noFallthroughCasesInSwitch": true,
14+
"noUncheckedIndexedAccess": true,
15+
"noImplicitOverride": true,
16+
"noUnusedLocals": true,
17+
"noUnusedParameters": true,
18+
"esModuleInterop": true,
19+
"allowSyntheticDefaultImports": true,
20+
"resolveJsonModule": true,
21+
"isolatedModules": true,
22+
"types": ["bun"],
23+
"rootDir": ".",
24+
"baseUrl": "."
25+
},
26+
"include": ["src/**/*", "tests/**/*"],
27+
"exclude": ["node_modules"]
28+
}

0 commit comments

Comments
 (0)