Enforcing best practices for Effector
This plugin uses TypeScript for more precise results, but JavaScript is supported too.
Install ESLint and eslint-plugin-effector
:
$ pnpm install --dev eslint
$ pnpm install --dev eslint-plugin-effector
$ yarn add --dev eslint
$ yarn add --dev eslint-plugin-effector
$ npm install --dev eslint
$ npm install --dev eslint-plugin-effector
Add effector
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["effector"],
"extends": ["plugin:effector/recommended", "plugin:effector/scope"]
}
To configure individual rules:
{
"rules": {
"effector/enforce-store-naming-convention": "off"
}
}
This preset is recommended for most projects.
- effector/enforce-store-naming-convention
- effector/enforce-effect-naming-convention
- effector/no-getState
- effector/no-useless-methods
- effector/no-unnecessary-duplication
- effector/prefer-sample-over-forward-with-mapping
- effector/no-ambiguity-target
- effector/no-watch
- effector/no-unnecessary-combination
- effector/no-duplicate-on
- effector/keep-options-order
This preset is recommended for projects that use Fork API. You can read more about Fork API in an article.
This preset is recommended for projects that use React with Effector.
This preset contains rules, which enforce future-effector code-style.
This preset is recommended for projects that use Patronum.
- Bump
version
in package.json - Fill CHANGELOG.md
- Commit changes by
git commit -m "Release X.X.X"
- Create git tag for release by
git tag -a vX.X.X -m "vX.X.X"
- Push changes to remote by
git push --follow-tags
- Release package to registry by
pnpm clean-publish
- Fill release page with changelog on GitHub