eslint-plugin-stratified-design
v0.11.0
Published
ESlint rules for stratified design
Downloads
68
Maintainers
Readme
eslint-plugin-stratified-design
ESLint rules for stratified design, inspired by "Grokking Simplicity" written by Erick Normand, for practicing stratified design.
Installation
First, ensure you have ESLint installed:
npm i eslint --save-dev
Next, install eslint-plugin-stratified-design
:
npm install eslint-plugin-stratified-design --save-dev
Usage
Add stratified-design
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["stratified-design"]
}
Then configure the rules you wish to use under the rules section:
{
"rules": {
"stratified-design/[rule-name]": ["error"]
}
}
Supported Rules
- lower-level-imports: Requires lower-level modules to be imported.
- stratified-imports: Requires lower-level modules to be imported. The stratified structure is set by
.stratified.json
. - no-same-level-funcs: Disallows calling functions in the same file.
- no-disallowed-imports: Allow or disallow importing specified modules