@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}(useEnforce 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-qualityLatest: 2.0.0 (via changesets).
Example
import { defineLayers } from "@zedtech/zedkit-quality/eslint";
export default [
...defineLayers({
kitPackage: "@acme/ui",
viewDirs: ["app/**/ui/**"],
dataDirs: ["lib/**"],
actionPatterns: ["@/lib/*", "**/actions", "**/actions/**"],
}),
];Wraps: eslint
Lint UI files for accessibility, Tailwind and tokens
Enforce a11y, Tailwind hygiene, tokens-only classes (no arbitrary px/rem, no scale steps such as p-4 or text-sm, no raw focus:ring-N), no inline style, no forw…
Enforce feature-folder ports and adapters
Ban UI→adapter imports, keep the model pure, and leave adapter injection to the composition root.