Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Architecture Compliance LinterNew to Visual Studio Code? Get it now.
Architecture Compliance Linter

Architecture Compliance Linter

denizbitmez

|
1 install
| (0) | Free
Enforce architectural rules (e.g. Layered, Clean, Hexagonal) with real-time import linting and automated rule templates.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Architecture Compliance Linter

Visual Studio Marketplace

Define and enforce architectural rules in your projects with ease. This extension helps maintain a clean codebase by ensuring layers (like Controllers, Services, and Repositories) only interact in ways you've explicitly allowed.

Features

  • Smart Rule Discovery: Automatically searches for arch-rules.json up the directory tree. Perfect for monorepos or subfolder-specific rules.
  • Rule Templates: Quickly bootstrap your project with the "Architecture: Generate Default Rules" command.
  • Real-time Feedback: Get instant diagnostic warnings in your editor when an architectural rule is violated.
  • Language Agnostic: Works by scanning imports using regex and glob patterns, making it compatible with TypeScript, JavaScript, C#, and more.

Usage

  1. Install the extension.
  2. Open a project folder.
  3. Run the command Architecture: Generate Default Rules from the Command Palette (Ctrl+Shift+P).
  4. Customize the generated arch-rules.json to fit your architectural needs.
  5. Start coding! Warnings will appear in the "Problems" tab and on the import lines if you violate a rule.

Configuration

Rules are defined in arch-rules.json. Example:

{
  "layers": {
    "Controller": "**/Controllers/**",
    "Service": "**/Services/**",
    "Repository": "**/Repositories/**"
  },
  "rules": [
    {
      "from": "Controller",
      "allow": ["Service"],
      "disallow": ["Repository"],
      "message": "Controllers should not call Repositories directly. Use a Service."
    }
  ]
}
  • layers: Map layer names to glob patterns.
  • rules: Define which layers can access which. Use allow or disallow.
  • message: Custom warning message displayed in the editor.

Why use this?

Maintaining a strict architecture is hard as projects grow. This linter acts as an automated "Architecture Review" that runs while you type, preventing technical debt before it even reaches a code review.

Extension Settings

This extension contributes the following settings:

  • architectureComplianceLinter.rulesFile: Specifies the name of the configuration file to look for (default is arch-rules.json).

Contributing

  1. Fork the repository.
  2. Clone it to your machine.
  3. Run npm install to install dependencies.
  4. Open the project in VS Code.
  5. Press F5 to open the Extension Development Host.
  6. Make your changes and submit a Pull Request!
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft