Skip to content

Commit e50bcc9

Browse files
authored
Merge pull request #56 from coder/brett/improve-lint
chore: fix lint issues and add ci workflow
2 parents 4b0809e + 264b1d3 commit e50bcc9

File tree

24 files changed

+761
-2917
lines changed

24 files changed

+761
-2917
lines changed

.github/workflows/ci.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,27 @@ on:
77
branches: [ main ]
88

99
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
24+
25+
- name: Install dependencies
26+
run: pnpm install
27+
28+
- name: Lint
29+
run: pnpm run lint
30+
1031
test:
1132
runs-on: ubuntu-latest
1233

.knip.jsonc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "https://unpkg.com/knip@5/schema.json",
3+
"entry": ["./src/client/index.tsx", "./src/server/index.tsx"],
4+
"project": ["./src/**/*.ts", "./src/**/*.tsx"],
5+
"ignore": [
6+
"**/gen/*",
7+
// Since components are vendored from coder/coder it would be a pain to have
8+
// to fix lint issues every time we update the components here by copying the
9+
// new ones in.
10+
"./src/client/components/*"
11+
]
12+
}
13+

biome.jsonc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@
55
"clientKind": "git"
66
},
77
"files": {
8-
"includes": ["**/*.config.ts", "src/**/*", "!src/client/gen/types.ts","!pnpm-lock.yaml"],
8+
"includes": [
9+
"**/*.config.ts",
10+
"src/**/*",
11+
"!src/client/gen/types.ts",
12+
"!pnpm-lock.yaml",
13+
// Since components are vendored from coder/coder it would be a pain to have
14+
// to fix lint issues every time we update the components here by copying the
15+
// new ones in.
16+
"!src/client/components/*"
17+
],
918
"ignoreUnknown": true
1019
},
1120
"linter": {
@@ -63,5 +72,6 @@
6372
}
6473
}
6574
},
66-
"$schema": "https://biomejs.dev/schemas/2.1.1/schema.json"
75+
"$schema": "https://biomejs.dev/schemas/2.1.4/schema.json"
6776
}
77+

eslint.config.js

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

package.json

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
"scripts": {
77
"dev": "vite",
88
"build": "tsc -b && vite build && vite build --mode=client",
9-
"lint": "eslint .",
9+
"lint": "pnpm run lint:biome && pnpm run lint:knip && pnpm run lint:circular-dep",
10+
"lint:biome": "pnpm biome lint --error-on-warnings .",
11+
"lint:knip": "pnpm knip",
12+
"lint:circular-dep": "pnpm dpdm --no-tree --no-warning -T ./src/client/index.tsx && pnpm dpdm --no-tree --no-warning -T ./src/server/index.tsx",
1013
"preview": "vite preview",
1114
"test": "vitest",
1215
"test:ui": "vitest --ui",
1316
"test:run": "vitest run",
14-
"test:coverage": "vitest run --coverage",
1517
"test:watch": "vitest watch"
1618
},
1719
"dependencies": {
18-
"@fontsource-variable/inter": "^5.2.5",
19-
"@fontsource/dm-mono": "^5.2.5",
2020
"@hono/valibot-validator": "^0.5.2",
2121
"@microlink/react-json-view": "^1.26.2",
2222
"@monaco-editor/react": "^4.7.0",
@@ -33,9 +33,6 @@
3333
"@radix-ui/react-tooltip": "^1.2.7",
3434
"@tailwindcss/typography": "^0.5.16",
3535
"@tanstack/react-form": "^1.12.4",
36-
"@tanstack/valibot-form-adapter": "^0.42.1",
37-
"@universal-middleware/core": "^0.4.7",
38-
"@universal-middleware/hono": "^0.4.12",
3936
"@vercel/blob": "^1.1.1",
4037
"class-variance-authority": "^0.7.1",
4138
"clsx": "^2.1.1",
@@ -46,49 +43,39 @@
4643
"monaco-editor": "^0.52.2",
4744
"motion": "^12.15.0",
4845
"nanoid": "^5.1.5",
49-
"prismjs": "^1.30.0",
5046
"react": "^19.1.0",
5147
"react-dom": "^19.1.0",
5248
"react-markdown": "^10.1.0",
5349
"react-resizable-panels": "^3.0.2",
5450
"react-router": "^7.6.1",
55-
"react-simple-code-editor": "^0.14.1",
5651
"react-syntax-highlighter": "^15.6.1",
5752
"remark-gfm": "^4.0.1",
5853
"tailwind-merge": "^3.3.0",
5954
"tailwindcss-animate": "^1.0.7",
6055
"valibot": "^1.1.0",
61-
"yup": "^1.6.1",
62-
"zustand": "^5.0.5"
56+
"yup": "^1.6.1"
6357
},
6458
"devDependencies": {
65-
"@biomejs/biome": "2.1.1",
66-
"@eslint/js": "^9.25.0",
59+
"@biomejs/biome": "^2.1.4",
6760
"@hono/vite-dev-server": "^0.19.1",
68-
"@testing-library/jest-dom": "^6.6.4",
6961
"@testing-library/react": "^16.3.0",
7062
"@types/lodash": "^4.17.17",
7163
"@types/node": "^22.15.21",
72-
"@types/prismjs": "^1.26.5",
7364
"@types/react": "^19.1.2",
7465
"@types/react-dom": "^19.1.2",
7566
"@types/react-syntax-highlighter": "^15.5.13",
7667
"@vitejs/plugin-basic-ssl": "^2.0.0",
7768
"@vitejs/plugin-react": "^4.4.1",
7869
"autoprefixer": "^10.4.21",
79-
"eslint": "^9.25.0",
80-
"eslint-plugin-react-hooks": "^5.2.0",
81-
"eslint-plugin-react-refresh": "^0.4.19",
82-
"globals": "^16.0.0",
70+
"dpdm": "^3.14.0",
8371
"happy-dom": "^18.0.1",
72+
"knip": "^5.62.0",
8473
"postcss": "^8.5.3",
8574
"tailwindcss": "3",
8675
"typescript": "~5.8.3",
87-
"typescript-eslint": "^8.30.1",
88-
"vercel": "^42.3.0",
8976
"vite": "^6.3.5",
90-
"vite-plugin-vercel": "^9.0.7",
9177
"vitest": "^3.2.4"
9278
},
9379
"packageManager": "pnpm@10.14.0+sha512.ad27a79641b49c3e481a16a805baa71817a04bbe06a38d17e60e2eaee83f6a146c6a688125f5792e48dd5ba30e7da52a5cda4c3992b9ccf333f9ce223af84748"
94-
}
80+
}
81+

0 commit comments

Comments
 (0)