Skip to content

Commit 5796a87

Browse files
committed
chore: remove ESLint in favor of TypeScript + Prettier
1 parent 2b38634 commit 5796a87

File tree

25 files changed

+94
-2898
lines changed

25 files changed

+94
-2898
lines changed

.eslintrc.cjs

Lines changed: 0 additions & 19 deletions
This file was deleted.

.husky/pre-commit

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
4-
# Run lint-staged to lint and format staged files
1+
# Run lint-staged to format staged files
52
pnpm lint-staged

apps/web/.eslintrc.cjs

Lines changed: 0 additions & 12 deletions
This file was deleted.

apps/web/app/api/projects/[id]/events/route.ts renamed to apps/web/app/api/projects/[name]/events/route.ts

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Project Events API Endpoint
3-
*
3+
*
44
* GET /api/projects/[id]/events - Get project events with filters
55
*/
66

@@ -12,7 +12,7 @@ export const dynamic = 'force-dynamic';
1212

1313
/**
1414
* GET /api/projects/:id/events - Get project events with filters
15-
*
15+
*
1616
* Supports filtering by:
1717
* - machineId: Filter by specific machine
1818
* - workspaceId: Filter by specific workspace
@@ -22,18 +22,12 @@ export const dynamic = 'force-dynamic';
2222
* - severity: Filter by severity level
2323
* - limit: Maximum number of results (default: 100, max: 1000)
2424
*/
25-
export async function GET(
26-
request: NextRequest,
27-
{ params }: { params: { id: string } }
28-
) {
25+
export async function GET(request: NextRequest, { params }: { params: { id: string } }) {
2926
try {
3027
const projectId = parseInt(params.id, 10);
3128

3229
if (isNaN(projectId)) {
33-
return NextResponse.json(
34-
{ error: 'Invalid project ID' },
35-
{ status: 400 }
36-
);
30+
return NextResponse.json({ error: 'Invalid project ID' }, { status: 400 });
3731
}
3832

3933
// Parse query parameters
@@ -45,10 +39,7 @@ export async function GET(
4539
const eventType = searchParams.get('eventType');
4640
const agentId = searchParams.get('agentId');
4741
const severity = searchParams.get('severity');
48-
const limit = Math.min(
49-
parseInt(searchParams.get('limit') || '100', 10),
50-
1000
51-
);
42+
const limit = Math.min(parseInt(searchParams.get('limit') || '100', 10), 1000);
5243

5344
// Build where clause
5445
const where: any = {
@@ -79,20 +70,14 @@ export async function GET(
7970
try {
8071
where.timestamp.gte = new Date(from);
8172
} catch (error) {
82-
return NextResponse.json(
83-
{ error: 'Invalid from date' },
84-
{ status: 400 }
85-
);
73+
return NextResponse.json({ error: 'Invalid from date' }, { status: 400 });
8674
}
8775
}
8876
if (to) {
8977
try {
9078
where.timestamp.lte = new Date(to);
9179
} catch (error) {
92-
return NextResponse.json(
93-
{ error: 'Invalid to date' },
94-
{ status: 400 }
95-
);
80+
return NextResponse.json({ error: 'Invalid to date' }, { status: 400 });
9681
}
9782
}
9883
}
@@ -112,7 +97,7 @@ export async function GET(
11297
if (!['info', 'warning', 'error'].includes(severity)) {
11398
return NextResponse.json(
11499
{ error: 'Invalid severity. Must be: info, warning, or error' },
115-
{ status: 400 }
100+
{ status: 400 },
116101
);
117102
}
118103
where.severity = severity;
@@ -160,7 +145,7 @@ export async function GET(
160145
{
161146
error: error instanceof Error ? error.message : 'Failed to get project events',
162147
},
163-
{ status: 500 }
148+
{ status: 500 },
164149
);
165150
}
166151
}
Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Project Hierarchy API Endpoint
3-
*
3+
*
44
* GET /api/projects/[id]/hierarchy - Get full project hierarchy tree
55
*/
66

@@ -12,22 +12,16 @@ export const dynamic = 'force-dynamic';
1212

1313
/**
1414
* GET /api/projects/:id/hierarchy - Get full hierarchy tree
15-
*
15+
*
1616
* Returns the complete project hierarchy including all machines,
1717
* workspaces, and session information organized in a tree structure.
1818
*/
19-
export async function GET(
20-
request: NextRequest,
21-
{ params }: { params: { id: string } }
22-
) {
19+
export async function GET(request: NextRequest, { params }: { params: { id: string } }) {
2320
try {
2421
const projectId = parseInt(params.id, 10);
2522

2623
if (isNaN(projectId)) {
27-
return NextResponse.json(
28-
{ error: 'Invalid project ID' },
29-
{ status: 400 }
30-
);
24+
return NextResponse.json({ error: 'Invalid project ID' }, { status: 400 });
3125
}
3226

3327
// Get hierarchy service
@@ -43,17 +37,14 @@ export async function GET(
4337

4438
// Handle specific error for project not found
4539
if (error instanceof Error && error.message.includes('Project not found')) {
46-
return NextResponse.json(
47-
{ error: error.message },
48-
{ status: 404 }
49-
);
40+
return NextResponse.json({ error: error.message }, { status: 404 });
5041
}
5142

5243
return NextResponse.json(
5344
{
5445
error: error instanceof Error ? error.message : 'Failed to get project hierarchy',
5546
},
56-
{ status: 500 }
47+
{ status: 500 },
5748
);
5849
}
5950
}

apps/web/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
"build": "next build",
99
"start": "pnpm run build && next start --port 3010",
1010
"preview": "next start --port 3010",
11-
"lint": "eslint . --ext .ts,.tsx",
12-
"lint:fix": "eslint . --ext .ts,.tsx --fix",
1311
"clean": "rimraf .next out *.tsbuildinfo",
1412
"clean:dev": "rimraf .next",
1513
"test": "vitest run",

package.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
"description": "Monorepo for development logging tools and MCP server",
55
"scripts": {
66
"build": "turbo build",
7-
"lint": "turbo lint",
8-
"lint:fix": "turbo lint -- --fix",
97
"test": "vitest run",
108
"test:watch": "vitest",
119
"test:ui": "vitest --ui",
@@ -40,12 +38,10 @@
4038
},
4139
"license": "Apache-2.0",
4240
"devDependencies": {
43-
"@codervisor/eslint-config": "workspace:^",
4441
"@types/node": "^20.0.0",
4542
"@types/semver": "^7.5.8",
4643
"@vitest/coverage-v8": "2.1.9",
4744
"concurrently": "9.2.0",
48-
"eslint": "9.39.0",
4945
"husky": "9.1.7",
5046
"lint-staged": "16.1.2",
5147
"prettier": "3.6.1",
@@ -60,11 +56,9 @@
6056
},
6157
"lint-staged": {
6258
"packages/**/*.{ts,tsx}": [
63-
"eslint --fix",
6459
"prettier --write"
6560
],
6661
"apps/**/*.{ts,tsx}": [
67-
"eslint --fix",
6862
"prettier --write"
6963
],
7064
"**/*.{js,jsx,json,md}": [

packages/ai/.eslintrc.cjs

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/ai/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
"build": "tsc",
1919
"clean": "rimraf build",
2020
"dev": "tsc --watch",
21-
"lint": "eslint src --ext .ts",
22-
"lint:fix": "eslint src --ext .ts --fix",
2321
"test": "vitest run",
2422
"test:ui": "vitest --ui",
2523
"test:watch": "vitest --watch"

packages/core/.eslintrc.cjs

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)