Curated, product-agnostic snapshot of the post-story-04 tree: demo content deleted, auth-only reference feature, web-next shell, all gates green. Product-specific docs, ADRs 027-029, PRDs/epics/archive, editor library traces, and product naming are curated out; generic template repairs (coverage provider devDeps, root test:coverage script, live lint fixes, root-only release-please) are kept. See TEMPLATE.md for provenance, curation list, and usage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
2.2 KiB
2.2 KiB
AGENTS.md — core-eslint
Tag: tooling
Shared ESLint 9 flat configs (rules, plugins, parser settings) consumed by all packages via eslint.config.js. Enforces boundary rules alongside Turborepo's boundaries feature (which validates the workspace dependency graph at build time).
What it owns
base.js— Core ESLint rules: noconsole, nodebugger, strict@typescript-eslintconfignext.js— Next.js-specific rules:"use client"boundaries,next/no-img-elementreact-internal.js— React library rules: component display names, hook rulesboundaries.js—eslint-plugin-boundariesconfig enforcing vertical feature architecture:- Features may only import
core-*and tooling packages - Core packages may only import other core packages (with composition exceptions for
core-cms,core-api) - No cross-feature imports
- No deep source path imports (only public subpath exports)
- Features may only import
How packages consume them
Each package creates eslint.config.js at its root:
// packages/blog/eslint.config.js
import baseConfig from "@repo/core-eslint/base";
import boundariesConfig from "@repo/core-eslint/boundaries";
export default [
...baseConfig,
...boundariesConfig,
{
files: ["src/**/*.tsx"],
rules: {
"react/display-name": "off",
},
},
];
Apps may add Next.js-specific rules:
// apps/web-next/eslint.config.js
import baseConfig from "@repo/core-eslint/base";
import nextConfig from "@repo/core-eslint/next";
import boundariesConfig from "@repo/core-eslint/boundaries";
export default [...baseConfig, ...nextConfig, ...boundariesConfig];
Test conventions
- No unit tests (config validation via lint pass/fail in other packages)
- Verify at CI:
pnpm lintsucceeds across all packages - ESLint should catch boundary violations:
pnpm lintfails on feature→feature imports or deep imports
Structure
src/
base.js # Core TypeScript + ESLint config
next.js # Next.js additions
react-internal.js # React library rules
boundaries.js # Feature boundaries + composition rules
index.js # Re-exports all configs