npm.io
0.0.2 • Published 3 years ago

eslint-plugin-modular-architecture

Licence
ISC
Version
0.0.2
Deps
2
Size
24 kB
Vulns
0
Weekly
0

eslint-plugin-modular-architecture

An eslint plugin to enforce modular architecture and encapsulation

Installation

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

Usage

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
  }
}

Rules

Name Description
import-export-only Enforce import/export only on index files
modules-engagement Enforce the rules of engagement

Keywords