eslint-plugin-denchik-fsd
v0.0.12
Published
plugin for check fsd frontend project
Downloads
41
Maintainers
Readme
eslint-plugin-denchik
eslint plugin eslint-plugin-denchik-fsd for check fsd frontend, содержит 3 правила:
- path-checker - запрещает использовать абсолютные импорты в рамках одного модуля
- layer-imports - проверяет корректность использования слоев с точки зрения FSD (например widgets нельзя использовать в features и entities)
- public-api-imports - разрешает импорт из других модулей только из public api. Имеет auto fix
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-denchik
:
npm install eslint-plugin-denchik --save-dev
Usage
Add denchik
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"denchik"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"denchik/rule-name": 2
}
}
Rules
TODO: Run eslint-doc-generator to generate the rules list.