eslint-plugin-fsd-core
v1.0.5
Published
ESLint rules to enforce clean layer structure and import conventions in Feature-Sliced Design projects.
Downloads
37
Maintainers
Readme
🎯 Eslint plugin based on FSD
An ESLint plugin designed to enforce path conventions based on the Feature-Sliced Design (FSD) methodology.
📦 Installation
First, ensure you have ESLint installed:
npm i eslint --save-devThen, install the eslint-plugin-fsd-core package:
npm install eslint-plugin-fsd-core --save-dev⚙️ Configuration
Add fsd-core to the plugins section of your .eslintrc file:
{
"plugins": ["fsd-core"]
}Then, enable the desired rules in the rules section:
{
"rules": {
"fsd-core/path-checker": "error"
}
}📖 Documentation of available Rules
🔧 Automatically fixable by the --fix CLI option.
| Name | Description | 🔧 | | :----------------------------------------------------------- | :------------------------- | :- | | layer-imports-checker | FSD layers imports checker | | | path-checker | FSD relative path checker | 🔧 | | public-api-checker | FSD public api checker | 🔧 |
| Rule Name | Description | | ------------------------------------------------------------ | ---------------------------------------------- | | layer-imports-checker | Ensures correct layer imports in FSD structure | | path-checker | Validates relative paths within FSD components | | public-api-imports | Restricts direct imports outside public API |
