Skip to content

Commit c5fc676

Browse files
committed
Add linter and dist/
1 parent 7a2ca65 commit c5fc676

File tree

6 files changed

+35
-22
lines changed

6 files changed

+35
-22
lines changed

.reuse/dep5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ Copyright: 2024 LiveKit, Inc.
99
License: Apache-2.0
1010

1111
# node project files
12-
Files: package.json tsconfig.json bun.lockb .prettierrc
12+
Files: package.json tsconfig.json bun.lockb .prettierrc eslint.config.js
1313
Copyright: 2024 LiveKit, Inc.
1414
License: Apache-2.0

bun.lockb

50.1 KB
Binary file not shown.

eslint.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// @ts-check
2+
3+
import eslint from '@eslint/js';
4+
import tseslint from 'typescript-eslint';
5+
import prettier from 'eslint-plugin-prettier/recommended';
6+
7+
export default tseslint.config(
8+
eslint.configs.recommended,
9+
prettier,
10+
...tseslint.configs.recommended,
11+
);

package.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
{
22
"name": "@livekit/agents",
3-
"module": "src/index.ts",
43
"version": "0.1.0",
4+
"description": "LiveKit Node Agents",
5+
"main": "dist/index.js",
6+
"types": "dist/index.d.ts",
7+
"author": "aoife cassidy <[email protected]>",
58
"type": "module",
9+
"scripts": {
10+
"build": "tsc",
11+
"lint": "eslint src"
12+
},
613
"devDependencies": {
7-
"@types/bun": "latest"
14+
"@types/bun": "latest",
15+
"eslint": "^8.57.0",
16+
"eslint-config-prettier": "^9.1.0",
17+
"eslint-plugin-prettier": "^5.1.3",
18+
"typescript-eslint": "^7.4.0"
819
},
920
"peerDependencies": {
1021
"typescript": "^5.0.0"

src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5-
import { version } from '../package.json';
65
import { VAD, VADEventType, VADStream } from './vad';
76
import { Plugin } from './plugin';
87

9-
module.exports = {
8+
const version = '0.1.0';
9+
10+
export {
1011
version,
1112
VAD,
1213
VADEventType,

tsconfig.json

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
11
{
22
"compilerOptions": {
3-
// Enable latest features
43
"lib": ["ESNext"],
54
"target": "ESNext",
65
"module": "ESNext",
76
"moduleDetection": "force",
8-
"jsx": "react-jsx",
7+
"moduleResolution": "node",
8+
"declaration": true,
99
"allowJs": true,
10-
11-
// Bundler mode
12-
"moduleResolution": "bundler",
13-
"allowImportingTsExtensions": true,
14-
"verbatimModuleSyntax": true,
15-
"noEmit": true,
16-
17-
// Best practices
1810
"strict": true,
1911
"skipLibCheck": true,
20-
"noFallthroughCasesInSwitch": true,
21-
22-
// Some stricter flags (disabled by default)
23-
"noUnusedLocals": false,
24-
"noUnusedParameters": false,
25-
"noPropertyAccessFromIndexSignature": false
26-
}
12+
"esModuleInterop": true,
13+
"sourceMap": true,
14+
"outDir": "dist"
15+
},
16+
"include": ["src/**/*.ts"]
2717
}

0 commit comments

Comments
 (0)