eslint-plugin-feature-sliced-import-checker

0.0.5 • Public • Published

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

Package Sidebar

Install

npm i eslint-plugin-feature-sliced-import-checker

Weekly Downloads

2

Version

0.0.5

License

MIT

Unpacked Size

11 kB

Total Files

7

Last publish

Collaborators

  • sirisb