Skip to content

effector/eslint-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

345ee9d · Sep 12, 2022
Jun 16, 2022
Sep 12, 2022
Sep 12, 2022
Sep 12, 2022
Jun 16, 2022
Jun 16, 2022
Apr 5, 2022
Sep 12, 2022
Aug 29, 2021
Sep 12, 2022
Jun 10, 2022
Sep 12, 2022
Oct 12, 2021
Sep 12, 2022
Jun 9, 2022
Sep 12, 2022

Repository files navigation

eslint-plugin-effector

Enforcing best practices for Effector

This plugin uses TypeScript for more precise results, but JavaScript is supported too.

Installation

Install ESLint and eslint-plugin-effector:

pnpm

$ pnpm install --dev eslint
$ pnpm install --dev eslint-plugin-effector

yarn

$ yarn add --dev eslint
$ yarn add --dev eslint-plugin-effector

npm

$ npm install --dev eslint
$ npm install --dev eslint-plugin-effector

Usage

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"
  }
}

Available rules by preset

plugin:effector/recommended

This preset is recommended for most projects.

plugin:effector/scope

This preset is recommended for projects that use Fork API. You can read more about Fork API in an article.

plugin:effector/react

This preset is recommended for projects that use React with Effector.

plugin:effector/future

This preset contains rules, which enforce future-effector code-style.

plugin:effector/patronum

This preset is recommended for projects that use Patronum.

Maintenance

Release flow

  1. Bump version in package.json
  2. Fill CHANGELOG.md
  3. Commit changes by git commit -m "Release X.X.X"
  4. Create git tag for release by git tag -a vX.X.X -m "vX.X.X"
  5. Push changes to remote by git push --follow-tags
  6. Release package to registry by pnpm clean-publish
  7. Fill release page with changelog on GitHub