Extract binder package from citation-evidence (EBIND-WP-0001)
Extracts citation-evidence/src/binder/ into this repo as the standalone @citation-evidence/evidence-binder package: headless binding service + in-memory link repo, active-state machine, the SharedContracts §7 rect-registry contract (registry, change pumps, hooks, SVG overlay), and the target-neutral reference FormRenderer. - toolchain mirrors sibling extracted repos (pnpm/tsc/vitest/eslint); imports rewritten from @shared/@engine aliases to the engine's @citation-evidence/engine package specifiers - dependency boundary (engine + anchor only; no source/work/umbrella) enforced via eslint no-restricted-imports - docs: extraction inventory + contract deltas, ADR-0001 (reference UI kept as supported exports), refreshed README/SCOPE/INTENT, populated capabilities index - typecheck + lint green, 37 tests passing Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
87d4eb3006
commit
a10f080f12
36 changed files with 6643 additions and 170 deletions
54
eslint.config.js
Normal file
54
eslint.config.js
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
// ESLint flat config — enforces the DependencyMap §2 edge set for
|
||||
// `evidence-binder`: it may depend on `citation-engine` and `evidence-anchor`,
|
||||
// and must NOT depend on `evidence-source`, `citation-work`, or the umbrella
|
||||
// `citation-evidence`.
|
||||
|
||||
import js from "@eslint/js";
|
||||
import tseslint from "typescript-eslint";
|
||||
import importPlugin from "eslint-plugin-import";
|
||||
import globals from "globals";
|
||||
|
||||
// Package specifiers and relative-path prefixes that would cross a forbidden
|
||||
// dependency edge. Anchor and engine are the only allowed sibling edges.
|
||||
const FORBIDDEN_EDGES = [
|
||||
{ name: "@citation-evidence/evidence-source", message: "binder must not depend on evidence-source (DependencyMap §2)." },
|
||||
{ name: "@citation-evidence/work", message: "binder must not depend on citation-work (DependencyMap §2)." },
|
||||
{ name: "@citation-evidence/citation-work", message: "binder must not depend on citation-work (DependencyMap §2)." },
|
||||
];
|
||||
|
||||
const FORBIDDEN_PATTERNS = [
|
||||
{ group: ["../evidence-source/*", "../citation-work/*", "../citation-evidence/*"], message: "binder must not reach into evidence-source, citation-work, or the umbrella (DependencyMap §2)." },
|
||||
];
|
||||
|
||||
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.node, ...globals.browser },
|
||||
},
|
||||
plugins: {
|
||||
import: importPlugin,
|
||||
},
|
||||
settings: {
|
||||
"import/resolver": {
|
||||
typescript: { project: "./tsconfig.json" },
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
paths: FORBIDDEN_EDGES,
|
||||
patterns: FORBIDDEN_PATTERNS,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue