Establishes citation-work as the standalone home of the review workspace, migrated out of the citation-evidence umbrella app. - Package/tooling scaffold: package.json, tsconfig, vite/vitest/eslint configs with eslint-plugin-boundaries enforcing engine/anchor/source-only imports - Providers/hooks: EngineProvider, SessionProvider + use* hooks (T02) - Panes: CollectionList, ViewerShell, EvidenceSidebar (T03/T04/T05) - Capture/edit: InlineCaptureForm, EvidenceFormBody; UploadDropzone owned here - ReviewShell: repo-owned three-pane layout with an upload slot seam - Tests: CollectionList, InlineCaptureForm capture flow, EvidenceSidebar export/edit/activation (11 tests, all green) - Anchor consumed as @citation-evidence/evidence-anchor package; @source kept on the umbrella facade for its local viewer-url policy - Docs (README/SCOPE) refreshed; deferred gaps recorded Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
71 lines
2.1 KiB
JavaScript
71 lines
2.1 KiB
JavaScript
import js from "@eslint/js";
|
|
import tseslint from "typescript-eslint";
|
|
import boundaries from "eslint-plugin-boundaries";
|
|
import importPlugin from "eslint-plugin-import";
|
|
import globals from "globals";
|
|
import { fileURLToPath } from "node:url";
|
|
import { dirname, resolve } from "node:path";
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
const engineSrc = resolve(__dirname, "../citation-engine/src");
|
|
const anchorSrc = resolve(__dirname, "../evidence-anchor/src");
|
|
const sourceSrc = resolve(__dirname, "../citation-evidence/src/source");
|
|
|
|
export default tseslint.config(
|
|
{
|
|
ignores: ["dist/", "node_modules/", "coverage/", "**/*.d.ts"],
|
|
},
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
{
|
|
files: ["src/**/*.{ts,tsx}"],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: "module",
|
|
globals: { ...globals.browser, ...globals.node },
|
|
},
|
|
plugins: {
|
|
boundaries,
|
|
import: importPlugin,
|
|
},
|
|
settings: {
|
|
"import/resolver": {
|
|
typescript: { project: "./tsconfig.json" },
|
|
},
|
|
"boundaries/elements": [
|
|
{ type: "shared", pattern: `${engineSrc}/shared/**` },
|
|
{ type: "engine", pattern: `${engineSrc}/engine/**` },
|
|
{ type: "anchor", pattern: `${anchorSrc}/**` },
|
|
{ type: "source", pattern: `${sourceSrc}/**` },
|
|
{ type: "work", pattern: "src/work/**" },
|
|
],
|
|
},
|
|
rules: {
|
|
"boundaries/element-types": [
|
|
2,
|
|
{
|
|
default: "disallow",
|
|
rules: [
|
|
{ from: "shared", allow: [] },
|
|
{ from: "engine", allow: ["shared"] },
|
|
{ from: "anchor", allow: ["shared", "engine"] },
|
|
{ from: "source", allow: ["shared", "engine"] },
|
|
{ from: "work", allow: ["shared", "engine", "anchor", "source", "work"] },
|
|
],
|
|
},
|
|
],
|
|
"no-restricted-imports": [
|
|
2,
|
|
{
|
|
patterns: [
|
|
"@binder/*",
|
|
"@app/*",
|
|
"../citation-evidence/src/app/*",
|
|
"../citation-evidence/src/binder/*",
|
|
"../citation-evidence/src/work/*",
|
|
],
|
|
},
|
|
],
|
|
},
|
|
},
|
|
);
|