0.0.2 • Published 1 year ago

eslint-plugin-import-path-checker-fsd v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

eslint-plugin-ubgbigtv-plugin-fsd-import-checker

plugin for correct imports

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-import-path-checker-fsd:

npm install eslint-plugin-import-path-checker-fsd --save-dev

Usage

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

{
    "plugins": [
        "import-path-checker-fsd"
    ]
}

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

{
    "rules": {
        "fsd-import-checker/rule-name": 2
    }
}

Rules

🔧 Automatically fixable by the --fix CLI option.

Name                             Description🔧
import-only-from-public-apirule prohibiting importing from something other than a public api🔧
import-only-from-the-lower-layersa rule that allows importing only from underlying layers
path-checkerfeature slice relative path checker