Implement CE-WP-0001 Foundations: TS scaffold, lint boundaries, normalize v1, fixtures
T01 Toolchain — vite + pnpm 9.15 + React 18 + strict TS (ADR-0001).
T02 Folder layout — src/{shared,engine,anchor,source,binder,work,app}/
mirroring the future subsystem split, with path aliases.
T03 Boundary lint — eslint-plugin-boundaries enforcing the dependency
edges from wiki/DependencyMap.md §4; verified by a violating fixture.
T04 Canonical normalization v1 — src/shared/text/normalize.ts with
NORMALIZE_VERSION=1; 10/10 vitest covering ligatures, CRLF, soft
hyphens (including line-break reassembly), mixed whitespace.
T05 PDF fixture corpus — 7 user-supplied German PDFs in fixtures/pdfs/
(gitignored binaries) plus a manifest with verbatim known-good
quotes and page counts, ready for CE-WP-0002 selector tests.
T06 README upgrade — umbrella README points at wiki/docs/workplans
and documents the dev workflow.
T07 ADR-0002..0006 stubs in docs/decisions/.
Toolchain end-to-end: pnpm install + lint + typecheck + test all green.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 00:13:03 +02:00
|
|
|
// ESLint flat config (ESLint 9+).
|
|
|
|
|
// Enforces the partition dependency map in wiki/DependencyMap.md §4.
|
|
|
|
|
//
|
2026-06-22 19:45:11 +02:00
|
|
|
// shared/ and engine/ live in the linked @citation-evidence/engine package;
|
|
|
|
|
// boundary rules for those partitions are enforced in citation-engine.
|
|
|
|
|
//
|
Implement CE-WP-0001 Foundations: TS scaffold, lint boundaries, normalize v1, fixtures
T01 Toolchain — vite + pnpm 9.15 + React 18 + strict TS (ADR-0001).
T02 Folder layout — src/{shared,engine,anchor,source,binder,work,app}/
mirroring the future subsystem split, with path aliases.
T03 Boundary lint — eslint-plugin-boundaries enforcing the dependency
edges from wiki/DependencyMap.md §4; verified by a violating fixture.
T04 Canonical normalization v1 — src/shared/text/normalize.ts with
NORMALIZE_VERSION=1; 10/10 vitest covering ligatures, CRLF, soft
hyphens (including line-break reassembly), mixed whitespace.
T05 PDF fixture corpus — 7 user-supplied German PDFs in fixtures/pdfs/
(gitignored binaries) plus a manifest with verbatim known-good
quotes and page counts, ready for CE-WP-0002 selector tests.
T06 README upgrade — umbrella README points at wiki/docs/workplans
and documents the dev workflow.
T07 ADR-0002..0006 stubs in docs/decisions/.
Toolchain end-to-end: pnpm install + lint + typecheck + test all green.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 00:13:03 +02:00
|
|
|
// Element types (folders) and allowed importers:
|
2026-06-22 19:45:11 +02:00
|
|
|
// shared : importable by every other element (package: citation-engine).
|
|
|
|
|
// engine : imports shared (package: citation-engine).
|
Implement CE-WP-0001 Foundations: TS scaffold, lint boundaries, normalize v1, fixtures
T01 Toolchain — vite + pnpm 9.15 + React 18 + strict TS (ADR-0001).
T02 Folder layout — src/{shared,engine,anchor,source,binder,work,app}/
mirroring the future subsystem split, with path aliases.
T03 Boundary lint — eslint-plugin-boundaries enforcing the dependency
edges from wiki/DependencyMap.md §4; verified by a violating fixture.
T04 Canonical normalization v1 — src/shared/text/normalize.ts with
NORMALIZE_VERSION=1; 10/10 vitest covering ligatures, CRLF, soft
hyphens (including line-break reassembly), mixed whitespace.
T05 PDF fixture corpus — 7 user-supplied German PDFs in fixtures/pdfs/
(gitignored binaries) plus a manifest with verbatim known-good
quotes and page counts, ready for CE-WP-0002 selector tests.
T06 README upgrade — umbrella README points at wiki/docs/workplans
and documents the dev workflow.
T07 ADR-0002..0006 stubs in docs/decisions/.
Toolchain end-to-end: pnpm install + lint + typecheck + test all green.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 00:13:03 +02:00
|
|
|
// anchor : imports shared, engine.
|
|
|
|
|
// source : imports shared, engine.
|
|
|
|
|
// binder : imports shared, engine, anchor.
|
|
|
|
|
// work : imports shared, engine, anchor, source. (NOT binder.)
|
|
|
|
|
// app : imports anything.
|
|
|
|
|
|
|
|
|
|
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";
|
2026-06-22 19:45:11 +02:00
|
|
|
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");
|
Implement CE-WP-0001 Foundations: TS scaffold, lint boundaries, normalize v1, fixtures
T01 Toolchain — vite + pnpm 9.15 + React 18 + strict TS (ADR-0001).
T02 Folder layout — src/{shared,engine,anchor,source,binder,work,app}/
mirroring the future subsystem split, with path aliases.
T03 Boundary lint — eslint-plugin-boundaries enforcing the dependency
edges from wiki/DependencyMap.md §4; verified by a violating fixture.
T04 Canonical normalization v1 — src/shared/text/normalize.ts with
NORMALIZE_VERSION=1; 10/10 vitest covering ligatures, CRLF, soft
hyphens (including line-break reassembly), mixed whitespace.
T05 PDF fixture corpus — 7 user-supplied German PDFs in fixtures/pdfs/
(gitignored binaries) plus a manifest with verbatim known-good
quotes and page counts, ready for CE-WP-0002 selector tests.
T06 README upgrade — umbrella README points at wiki/docs/workplans
and documents the dev workflow.
T07 ADR-0002..0006 stubs in docs/decisions/.
Toolchain end-to-end: pnpm install + lint + typecheck + test all green.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 00:13:03 +02:00
|
|
|
|
|
|
|
|
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": [
|
2026-06-22 19:45:11 +02:00
|
|
|
{ type: "shared", pattern: `${engineSrc}/shared/**` },
|
|
|
|
|
{ type: "engine", pattern: `${engineSrc}/engine/**` },
|
Implement CE-WP-0001 Foundations: TS scaffold, lint boundaries, normalize v1, fixtures
T01 Toolchain — vite + pnpm 9.15 + React 18 + strict TS (ADR-0001).
T02 Folder layout — src/{shared,engine,anchor,source,binder,work,app}/
mirroring the future subsystem split, with path aliases.
T03 Boundary lint — eslint-plugin-boundaries enforcing the dependency
edges from wiki/DependencyMap.md §4; verified by a violating fixture.
T04 Canonical normalization v1 — src/shared/text/normalize.ts with
NORMALIZE_VERSION=1; 10/10 vitest covering ligatures, CRLF, soft
hyphens (including line-break reassembly), mixed whitespace.
T05 PDF fixture corpus — 7 user-supplied German PDFs in fixtures/pdfs/
(gitignored binaries) plus a manifest with verbatim known-good
quotes and page counts, ready for CE-WP-0002 selector tests.
T06 README upgrade — umbrella README points at wiki/docs/workplans
and documents the dev workflow.
T07 ADR-0002..0006 stubs in docs/decisions/.
Toolchain end-to-end: pnpm install + lint + typecheck + test all green.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 00:13:03 +02:00
|
|
|
{ type: "anchor", pattern: "src/anchor/**" },
|
|
|
|
|
{ type: "source", pattern: "src/source/**" },
|
|
|
|
|
{ type: "binder", pattern: "src/binder/**" },
|
|
|
|
|
{ type: "work", pattern: "src/work/**" },
|
|
|
|
|
{ type: "app", pattern: "src/app/**" },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
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: "binder", allow: ["shared", "engine", "anchor"] },
|
|
|
|
|
{ from: "work", allow: ["shared", "engine", "anchor", "source"] },
|
|
|
|
|
{ from: "app", allow: ["shared", "engine", "anchor", "source", "binder", "work"] },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-06-22 19:45:11 +02:00
|
|
|
);
|