0.0.5 • Published 10 months ago

eslint-plugin-feature-sliced-import-checker v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

eslint-plugin-feature-sliced-import-checker

feature-sliced-import-checker is an ESLint plugin designed to enforce best practices and consistent path structures in projects following the Feature-Sliced Design methodology. It helps developers ensure that file and folder paths adhere to the architectural principles of Feature-Sliced Design, promoting maintainability and scalability in large codebases.

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-feature-sliced-import-checker:

npm install eslint-plugin-feature-sliced-import-checker --save-dev

Usage

Add feature-sliced-import-checker to the plugins section of your eslint.config.js configuration file.

import featureSlicedImportChecker from "eslint-plugin-feature-sliced-import-checker";
{
  "plugins": ["'feature-sliced-import-checker': featureSlicedImportChecker"]
}

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

{
  "rules": {
    "feature-sliced-import-checker/path-checker": "error"
  }
}

If you need to use strict public API imports, use this rule.

{
  "rules": {
    "feature-sliced-import-checker/public-api-imports": [
      "error",
      {
        "alias": "@",
        "testFilesPatterns": ["**/*.test.ts", "**/*.story.*"]
      }
    ]
  }
}

testFilesPatterns is array of paths to permitted files

TODO

0.0.5

10 months ago

0.0.1

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.4

11 months ago

0.0.0

1 year ago