Add Knip unused-code checks
This commit is contained in:
@@ -48,6 +48,7 @@ sent to the browser.
|
||||
```bash
|
||||
nix develop -c pnpm dev
|
||||
nix develop -c pnpm dev:tailscale
|
||||
nix develop -c pnpm knip
|
||||
nix develop -c pnpm test
|
||||
nix develop -c pnpm test:e2e
|
||||
nix develop -c pnpm test:live
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
inherit (finalAttrs) pname version src;
|
||||
pnpm = pkgs.pnpm_11;
|
||||
fetcherVersion = 4;
|
||||
hash = "sha256-Dk0GkHhvVuls8CkBxYmKV4xYCaZ4vR1UDYCgQmHMgaM=";
|
||||
hash = "sha256-TF1cCC86a24Cukks7+BbeM2fvU0SkHtSm6RUIF55RuY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import type { KnipConfig } from 'knip'
|
||||
|
||||
export default {
|
||||
entry: [
|
||||
'playwright.config.ts',
|
||||
'tests/e2e/**/*.spec.ts',
|
||||
'tests/e2e/mock-relay.mjs',
|
||||
],
|
||||
playwright: false,
|
||||
} satisfies KnipConfig
|
||||
+2
-1
@@ -18,6 +18,7 @@
|
||||
"start": "HOST=127.0.0.1 node .output/server/index.mjs",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"lint": "biome check .",
|
||||
"knip": "knip",
|
||||
"format": "biome check --write .",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
@@ -38,7 +39,6 @@
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "2.5.3",
|
||||
"@playwright/test": "1.61.1",
|
||||
"@tanstack/router-cli": "1.167.18",
|
||||
"@testing-library/dom": "10.4.1",
|
||||
"@testing-library/jest-dom": "6.9.1",
|
||||
"@testing-library/react": "16.3.2",
|
||||
@@ -47,6 +47,7 @@
|
||||
"@types/react-dom": "19.2.3",
|
||||
"@vitejs/plugin-react": "6.0.3",
|
||||
"jsdom": "29.1.1",
|
||||
"knip": "6.27.0",
|
||||
"typescript": "7.0.2",
|
||||
"vite": "8.1.4",
|
||||
"vitest": "4.1.10"
|
||||
|
||||
Generated
+550
-152
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ export type ThreadPage = PostPage & {
|
||||
conversationId: string
|
||||
}
|
||||
|
||||
export type LoadErrorCode =
|
||||
type LoadErrorCode =
|
||||
| 'invalid-input'
|
||||
| 'post-not-found'
|
||||
| 'post-unavailable'
|
||||
|
||||
Reference in New Issue
Block a user