eslint-plugin-feature-sliced-import-checker
v0.0.5
Published
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 architectu
Downloads
11
Maintainers
Readme
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