diff --git a/web/CLAUDE.md b/web/CLAUDE.md index ae072792..12977bd6 100644 --- a/web/CLAUDE.md +++ b/web/CLAUDE.md @@ -127,7 +127,7 @@ ESLint ([eslint.config.mjs](eslint.config.mjs)) runs **type-aware**: `eslint.con - `@typescript-eslint/no-explicit-any` is off; `prefer-function-type` is off (keeps the `defineEmits<{ (e: ...): void }>()` style). - The vendored `packages/lezer-promql` fork is excluded so upstream re-syncs cannot break the gate. -**knip** ([knip.ts](knip.ts)) guards dead exports, unused files, and unused dependencies. Its blind spots are deliberate and documented in the config: the auto-import surface (`app/composables`, `app/stores`, `app/utils`) and all `.vue` components are entry points because nuxt wires them without import statements — unused exports there and unused components are **not** reported. `app/components/shadcn/` is ignored (vendored spares are expected). Knip's `unlisted` check is **off** by policy: the hoisted node_modules layout makes transitive packages importable, that is relied on deliberately, and `package.json` declares top-level intent only. +**knip** ([knip.ts](knip.ts)) guards dead exports, unused files, and unused dependencies. Its nuxt plugin resolves auto-imports through the generated `.nuxt` maps, so unused components, stores, and utils **are** detected despite having no import statements. Remaining blind spots, documented in the config: `app/composables` are entry points (the auto-import map does not connect their `export default function useX` style, so their internal exports are unreported), and `app/components/shadcn/` is ignored (vendored spares are expected). Knip's `unlisted` check is **off** by policy: the hoisted node_modules layout makes transitive packages importable, that is relied on deliberately, and `package.json` declares top-level intent only. Knip runs with `--cache`, and the cache is keyed by knip version, **not** config — after editing [knip.ts](knip.ts), run `rm -rf node_modules/.cache/knip` or results are stale. TypeScript strictness (set in [nuxt.config.ts](nuxt.config.ts)): `noUnusedLocals`, `noUnusedParameters`, `noUncheckedIndexedAccess`, `noImplicitOverride`, `verbatimModuleSyntax`, and `noImplicitAny` all on; `allowUnreachableCode: false` (mirrored in [electron/tsconfig.json](electron/tsconfig.json)). Path aliases `@/*` and `~/*` both point to `app/*`. diff --git a/web/app/components/ExpandableInput.vue b/web/app/components/ExpandableInput.vue deleted file mode 100644 index add35e6f..00000000 --- a/web/app/components/ExpandableInput.vue +++ /dev/null @@ -1,37 +0,0 @@ - - - diff --git a/web/app/components/editor/ReviewerList.vue b/web/app/components/editor/ReviewerList.vue index 4c47fff8..7ea90607 100644 --- a/web/app/components/editor/ReviewerList.vue +++ b/web/app/components/editor/ReviewerList.vue @@ -2,7 +2,7 @@ import IconStack from "./IconStack.vue" import { showToastMessage } from "../toast" -export interface ReviewerEntry { +interface ReviewerEntry { id: string name: string email: string @@ -11,7 +11,7 @@ export interface ReviewerEntry { previouslyApproved?: boolean } -export interface ReviewerInviteEntry { +interface ReviewerInviteEntry { id: string name: string email?: string | null diff --git a/web/app/components/editor/blocks/metrics/ConfigInputField.vue b/web/app/components/editor/blocks/metrics/ConfigInputField.vue deleted file mode 100644 index cc5475c1..00000000 --- a/web/app/components/editor/blocks/metrics/ConfigInputField.vue +++ /dev/null @@ -1,32 +0,0 @@ - - diff --git a/web/knip.ts b/web/knip.ts index ea513d4d..7a301037 100644 --- a/web/knip.ts +++ b/web/knip.ts @@ -1,9 +1,9 @@ import type { KnipConfig } from "knip" -import { parse } from "vue/compiler-sfc" -// knip's nuxt plugin only knows the nuxt 3 layout, so the nuxt 4 app/ -// conventions (and everything else referenced by convention rather than by -// import) are declared as entries here explicitly. +// knip's nuxt plugin handles the nuxt 4 app/ layout natively (it detects the +// app/ srcDir) and resolves auto-imported components and named composables +// through the generated .nuxt/imports.d.ts and .nuxt/components.d.ts maps — +// so only the conventions it cannot know about are configured here. const config: KnipConfig = { // the vendored PromQL grammar fork is re-synced from upstream and must // not be reported against (see packages/README.lezer-promql.md) @@ -17,56 +17,16 @@ const config: KnipConfig = { unlisted: "off", }, - compilers: { - // the SFC compiler recommended by knip's docs, extended to follow - // tailwind v4 @reference/@plugin directives in