An eslint plugin to enforce modular architecture and encapsulation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-modular-architecture
:
npm install eslint-plugin-modular-architecture --save-dev
Add modular-architecture
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["modular-architecture"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"modular-architecture/import-export-only": 2,
"modular-architecture/modules-engagement": 2
}
}
Name | Description |
---|---|
import-export-only | Enforce import/export only on index files |
modules-engagement | Enforce the rules of engagement |