eslint-plugin-paths-observer

0.1.1 • Public • Published

eslint-plugin-paths-observer

Plugin for checking not correctly declared paths for imports using Feature Sliced Design methodology (FSD)

Read more about FSD

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-paths-observer:

npm install eslint-plugin-paths-observer --save-dev

Usage

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

{
  "plugins": [
    "paths-observer"
  ]
}

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

{
  "rules": {
    "paths-observer/only-relative-imports-in-layer": [
      "error",
      {
        "alias": "@"
      }
    ],
    "paths-observer/only-public-api-imports": [
      "error",
      {
        "alias": "@",
        "ignoreFilePatterns": []
      }
    ],
    "paths-observer/layer-imports-order": [
      "error",
      {
        "alias": "@",
        "ignoreImportPatterns": []
      }
    ]
  }
}

Supported Rules

  • Fill in provided rules here

Package Sidebar

Install

npm i eslint-plugin-paths-observer

Weekly Downloads

3

Version

0.1.1

License

ISC

Unpacked Size

22.7 kB

Total Files

19

Last publish

Collaborators

  • starck43