pattern-enforcement

Enforce architectural boundaries and coding standards in TypeScript projects with ESLint.

3|1|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/jagreehal/jagreehal-claude-skills --skill pattern-enforcement
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pattern-enforcement
Source: https://github.com/jagreehal/jagreehal-claude-skills/tree/main/skills/pattern-enforcement
Command: npx skills add https://github.com/jagreehal/jagreehal-claude-skills --skill pattern-enforcement

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Architectural consistency is hard to enforce across TypeScript projects. This Skill provides a ready-made ESLint-based enforcement layer to block infra imports from domain code, ensure object-parameter functions, and prevent server/client leaks.

Core Features & Use Cases

  • Enforce Architectural Boundaries: Domain code must not import from infra, ensuring clean dependency direction.
  • Enforce Function Signatures: Use object parameters to improve readability and maintainability.
  • Enforce Server/Client Separation: Block server imports in client code to prevent data leakage and runtime issues.
  • Ready-to-use ESLint Configuration: Provides a cohesive config that combines no-restricted-imports, boundaries, prefer-object-params, and no-server-imports rules, ready to drop into an existing project.

Quick Start

Install the required plugins and add the rules to your ESLint config. Example steps:

  • npm install -D eslint @typescript-eslint/parser eslint-plugin-boundaries eslint-plugin-prefer-object-params eslint-plugin-no-server-imports
  • Update your eslint.config.mjs or .eslintrc to include the rules as described in this Skill.
  • Run npm run lint or your CI workflow to enforce the rules.

Frequently Asked Questions about pattern-enforcement

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce architectural boundaries in a TypeScript project?

You can enforce architectural boundaries in TypeScript by applying an ESLint configuration that uses rules like no-restricted-imports and eslint-plugin-boundaries to block infra imports from domain code.

How do I prevent server imports in client code to avoid data leakage?

To prevent server imports in client code, configure ESLint with the no-server-imports rule to block server-side dependencies in client modules, preventing runtime issues and data leakage.

How do I enforce object parameters in TypeScript function signatures?

Enforce object parameters in TypeScript function signatures by integrating the eslint-plugin-prefer-object-params rule into your ESLint setup, which ensures functions accept objects for better readability.

What ESLint plugins do I need to enforce domain and infra separation?

To enforce domain and infra separation, install ESLint plugins including eslint-plugin-boundaries and eslint-plugin-no-server-imports, then apply their rules to block unauthorized imports across architectural layers.

Can I use this ESLint architecture enforcement in a multi-layered codebase?

Yes, this ESLint enforcement configuration is specifically designed for multi-layered TypeScript codebases with domain, infra, and API boundaries to maintain clean dependency directions and separate server and client code.

Why should I use ESLint to enforce coding standards instead of manual reviews?

Using ESLint to enforce coding standards provides an automated, ready-to-use configuration that blocks infra imports, requires object-params, and prevents server/client leakage consistently across your TypeScript project.