npm.io
0.0.8 • Published 3 years ago

eslint-plugin-fsd-helper

Licence
ISC
Version
0.0.8
Deps
2
Size
22 kB
Vulns
0
Weekly
0

eslint-plugin-fsd-helper

checks imports for FSD architecture

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-fsd-helper:

npm install eslint-plugin-fsd-helper --save-dev

Usage

Add fsd-helper to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "fsd-helper"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "fsd-helper/path-ckecker": ["error", { "alias": "@" }],
        "fsd-helper/public-api-imports": ["error", { "alias": "@" }],
        "fsd-helper/layer-imports": [
            "error",
            {
            "alias": "@",
            "ignoreImportPatterns": ["**/StoreProvider"]
            }
        ]
        
    }
}

Supported Rules

  • Fill in provided rules here

Keywords