Skip to content

Commit d9f14d9

Browse files
nbsplukasIO
andcommitted
Use org-wide tsconfig and eslint
Co-authored-by: lukasIO <[email protected]>
1 parent 92fe0a0 commit d9f14d9

File tree

8 files changed

+69
-54
lines changed

8 files changed

+69
-54
lines changed

Diff for: .eslintrc

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"plugins": ["@typescript-eslint/eslint-plugin", "eslint-plugin-tsdoc"],
3+
"extends": [
4+
"turbo",
5+
"prettier",
6+
"plugin:prettier/recommended",
7+
"plugin:@typescript-eslint/recommended",
8+
],
9+
"env": {
10+
"node": true,
11+
},
12+
"parserOptions": {
13+
"ecmaVersion": 2022,
14+
"ecmaFeatures": {},
15+
},
16+
"settings": {},
17+
"rules": {
18+
"tsdoc/syntax": "warn",
19+
"space-before-function-parens": 0,
20+
"@typescript-eslint/no-unused-vars": "error",
21+
"import/export": 0,
22+
"@typescript-eslint/ban-ts-comment": "warn",
23+
"@typescript-eslint/no-empty-interface": "warn",
24+
"@typescript-eslint/consistent-type-imports": "warn",
25+
"@typescript-eslint/no-explicit-any": "warn",
26+
},
27+
}

Diff for: .prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist
2+
node_modules
3+
pnpm-lock.yaml

Diff for: .prettierrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
"importOrder": ["<THIRD_PARTY_MODULES>", "^[./]"],
88
"importOrderSeparation": false,
99
"importOrderSortSpecifiers": true,
10-
"importOrderParserPlugins": ["typescript"]
10+
"importOrderParserPlugins": ["typescript"],
11+
"plugins": ["@trivago/prettier-plugin-sort-imports"]
1112
}

Diff for: agents/tsconfig.json

+7-16
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
{
2+
"extends": "../tsconfig.json",
3+
"include": ["./src"],
24
"compilerOptions": {
3-
"lib": ["ESNext"],
4-
"target": "ESNext",
5-
"module": "ESNext",
6-
"moduleDetection": "force",
7-
"moduleResolution": "Node16",
8-
"declaration": true,
9-
"declarationMap": true,
10-
"declarationDir": "dist",
11-
"allowJs": true,
12-
"strict": true,
13-
"skipLibCheck": true,
14-
"esModuleInterop": true,
15-
"sourceMap": true,
16-
"outDir": "dist"
17-
},
18-
"include": ["**/*.ts"]
5+
// match output dir to input dir. e.g. dist/index instead of dist/src/index
6+
"rootDir": "./src",
7+
"declarationDir": "./dist",
8+
"outDir": "./dist"
9+
}
1910
}

Diff for: eslint.config.mjs

-11
This file was deleted.

Diff for: examples/tsconfig.json

+7-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
{
2+
"extends": "../tsconfig.json",
3+
"include": ["./src"],
24
"compilerOptions": {
3-
"lib": ["ESNext"],
4-
"target": "ESNext",
5-
"module": "ESNext",
6-
"moduleDetection": "force",
7-
"moduleResolution": "Node16",
8-
"allowJs": true,
9-
"strict": true,
10-
"skipLibCheck": true,
11-
"esModuleInterop": true,
12-
"outDir": "dist"
13-
},
14-
"include": ["**/*.ts"]
5+
// match output dir to input dir. e.g. dist/index instead of dist/src/index
6+
"rootDir": "./src",
7+
"declarationDir": "./dist",
8+
"outDir": "./dist"
9+
}
1510
}

Diff for: plugins/elevenlabs/tsconfig.json

+7-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
{
2+
"extends": "../../tsconfig.json",
3+
"include": ["./src"],
24
"compilerOptions": {
3-
"lib": ["ESNext"],
4-
"target": "ESNext",
5-
"module": "ESNext",
6-
"moduleDetection": "force",
7-
"moduleResolution": "Node16",
8-
"declaration": true,
9-
"allowJs": true,
10-
"strict": true,
11-
"skipLibCheck": true,
12-
"esModuleInterop": true,
13-
"sourceMap": true,
14-
"outDir": "dist"
15-
},
16-
"include": ["**/*.ts"]
5+
// match output dir to input dir. e.g. dist/index instead of dist/src/index
6+
"rootDir": "./src",
7+
"declarationDir": "./dist",
8+
"outDir": "./dist"
9+
}
1710
}

Diff for: tsconfig.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"compilerOptions": {
3+
"lib": ["ES2022"],
4+
"target": "ES2022",
5+
"module": "Node16",
6+
"moduleDetection": "force",
7+
"moduleResolution": "Node16",
8+
"declaration": true,
9+
"declarationMap": true,
10+
"allowJs": false,
11+
"strict": true,
12+
"skipLibCheck": true,
13+
"esModuleInterop": true,
14+
"sourceMap": true
15+
}
16+
}

0 commit comments

Comments
 (0)