eslint-plugin-galilia-plugin v0.0.12
Feature-Sliced Path Checker
A custom ESLint plugin that ensures proper relative import paths within the same feature slice according to Feature-Sliced Design methodology.
Overview
The Feature-Sliced Path Checker enforces a consistent pattern for import paths within the same feature slice in your project. It helps maintain proper structure and improves the readability of the codebase.
Feature-Sliced Design is a frontend project structure methodology that organizes code based on the following layers:
- Shared
- Entities
- Features
- Widgets
- Pages
This plugin verifies that all imports within the same layer and slice use relative paths, making your code more maintainable and easier to understand.
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-galilia-plugin
:
npm install eslint-plugin-galilia-plugin --save-dev
Usage
Add galilia-plugin
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"galilia-plugin"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"galilia-plugin/rule-name": 2
}
}
Rules
TODO: Run eslint-doc-generator to generate the rules list.