plugin for linting fsd rules
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-lint-fsd-plugin
:
npm install eslint-plugin-lint-fsd-plugin --save-dev
Add lint-fsd-plugin
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["lint-fsd-plugin"]
}
import-checker - Checks if you are using a relative path within a layers.
List of layers to be checked by linter, your catalogues will be checked if they have names from the list:
- entity
- entities
- feature
- features
- shared
- shareds
- page
- pages
- widget
- widgets
Then configure the rules you want to use under the rules section.
{
"rules": {
"lint-fsd-plugin/import-checker": "error"
}
}
TODO: Run eslint-doc-generator to generate the rules list.