Setup Overview
The plugin architecture is built on three main concepts that work together:
Core Concepts
- Element Descriptors - Define what types of elements exist in your project (components, modules, helpers, etc.) and how to recognize them based on file paths. Read more in the Elements section.
- Element Selectors - Match specific elements in rules based on their type and captured properties. Read more in the Selectors section.
- Global Settings - Configure plugin behavior, define dependencies to analyze, and set include/ignore patterns. Read more in the Global Settings section and Configuration Helpers.
Workflow
The typical workflow when setting up the plugin involves three main steps:
- Define your element types using element descriptors in
boundaries/elementssetting - Configure rules using element selectors to specify which elements can interact with each other
- Customize global settings to include/ignore files, define dependency nodes, etc. You can use the helpers in the Configuration Helpers section to simplify this process.
The plugin analyzes each file in your project and assigns it an element type based on your descriptors. Then, when checking dependencies (imports, requires, etc.), it uses your rules with element selectors to determine if the dependency is allowed.