eslint-plugin-fsd-principles
v1.1.3
Published
Eslint configs and rules to ensure the principles of the FSD methodology
Downloads
38
Maintainers
Readme
eslint-plugin-fsd-principles
Eslint configs and rules to ensure the principles of the Feature-Sliced Design methodology
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
yarn add eslint -D
Next, install eslint-plugin-fsd-principles
:
npm install eslint-plugin-fsd-principles --save-dev
yarn add eslint-plugin-fsd-principles -D
Also, you need [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import/)
as dependency:
npm install eslint-plugin-import --save-dev
yarn add eslint-plugin-import -D
Usage
Add fsd-principles
to the plugins section of your .eslintrc
configuration file:
{
"plugins": [
"fsd-principles"
]
}
or simply add plugin:fsd-principles/recommended
to the extends section of your .eslintrc
Then configure the rules you want to use under the rules section.
{
"rules": {
"fsd-principles/import-only-from-public-api": [ "error", [ "directoryName" ] ]
}
}