Skip to content
zedkit
@zedtech/zedkit-quality

Enforce route, view and data layer boundaries

Ban cross-layer imports (route to kit, view to data client, data to UI) at lint time.

At a glance

  • Who: Frontend teams keeping routes thin, views presentational and data UI-free.
  • What: Ban cross-layer imports (route to kit, view to data client, data to UI) at lint time.
  • Use when: When features map onto route/view/data folders and bypasses must fail the gate.
  • Avoid when: When the repo has no layered folders (nothing to map the globs onto), or when features live in features/<name>/{ui,ports,adapters,model} (use Enforce feature-folder ports and adapters).
  • See also: Lint UI files for accessibility, Tailwind and tokens, Enforce feature-folder ports and adapters

Install

pnpm add @zedtech/zedkit-quality

Latest: 2.0.0 (via changesets).

Example

Usage
import { defineLayers } from "@zedtech/zedkit-quality/eslint";

export default [
  ...defineLayers({
    kitPackage: "@acme/ui",
    viewDirs: ["app/**/ui/**"],
    dataDirs: ["lib/**"],
    actionPatterns: ["@/lib/*", "**/actions", "**/actions/**"],
  }),
];

Wraps: eslint

On this page