0.1.0 ā€¢ Published 6 months ago

eslint-plugin-fsd-arch-checker v0.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

eslint-plugin-fsd-arch-checker

This plugin intends to control imports according to FSD architecture

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-fsd-arch-checker:

npm install eslint-plugin-fsd-arch-checker --save-dev

Usage

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

{
    "plugins": [
        "fsd-arch-checker"
    ]
}

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

{
    "rules": {
        "fsd-arch-checker/relative-imports": "error"
    }
}

Options

If you use aliases in your project you can provide this alias into your eslint configuration file

module.exports = {
  // ...
  'fsd-arch-checker/dependencies-imports': [
    'error',
    {
      alias: '$',
    },
  ],
}

Rules

šŸ”§ Automatically fixable by the --fix CLI option.

NameDescriptionšŸ”§
relative-importsforbid absolute imports inside slicešŸ”§
dependencies-importsforbid any imports from parent layers
public-api-importsforbid any imports not from public API
0.1.0

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago

0.0.0

6 months ago