Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-plugin-effector

effector47.4kMIT0.15.0

Enforcing best practices for Effector

eslint, eslint-plugin, eslintplugin, effector

readme

eslint-plugin-effector

Enforcing best practices for Effector. Documentation available at eslint.effector.dev.

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

Read more detailed docs on eslint.effector.dev

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

changelog

Changelog

v0.15.0

  • Add new rule require-pickup-in-persist (PR #163) by @kireevmp
  • Add support of Node.js 22

v0.14.0

  • Add new rule no-duplicate-clock-or-source-array-values (PR #155) by @gearonix
  • Add support of Node.js 21
  • Fix false-positive in enforce-store-naming-convention rule (PR #159) by @kireevmp

v0.13.0

  • Support new types EventCallable and StoreWritable in all rules
  • Drop support of Effector 22

v0.12.0

  • Migrate to TypeScript v5 and @typescript-eslint/* v6 (PR #151) by @7rulnik
  • Drop support of Node.js 14 and Node.js 15 since its support is dropped by Node.js itself 2 years ago and new versions of TypeScript and @typescript-eslint/* don't support it as well

v0.11.0

  • Add support of Node.js 19 and Node.js 20 (PR #146) by @xarety
  • Fixed edge-case of rule enforce-store-naming-convention (PR #140) by @raidenmiro

v0.10.5

  • Fix false-positive in no-ambiguity-target rule

v0.10.4

  • Fix false-positive in enforce-store-naming-convention rule (PR #137)

v0.10.3

  • Fix unhandled rejection in enforce-store-naming-convention rule

v0.10.2

  • Fix unhandled exception in no-patronum-debug rule

v0.10.1

  • Fix false-positive in no-patronum-debug rule (PR #126) by @raidenmiro

v0.10.0

  • Allow using package on Node.js 15 and Node.js 17 (PR #124)

v0.9.1

  • Fixed factory usage with enforce-store-naming-convention (PR #122) by @Lonli-Lokli

v0.9.0

  • Add new rule no-patronum-debug (PR #121 by @raidenmiro)

v0.8.2

  • Fix false-negative in enforce-store-naming-convention rule (PR #119 by @iposokhin)

v0.8.1

  • Fix typo in react preset config

v0.8.0

  • Rule mandatory-useEvent is renamed to mandatory-scope-binding
  • Add new rule prefer-useUnit

v0.7.6

  • Fix keep-options-order case for operators with greedy option

v0.7.5

v0.7.4

  • Fix false-positive in mandatory-useEvent on effect stores

v0.7.3

  • Fix false-positive in mandatory-useEvent

v0.7.2

  • Handle case with two arguments in guard of no-guard

v0.7.1

  • Handle case with empty fields in no-guard/no-forward

v0.7.0

Rules

  • Add new rule no-guard (PR #88)
  • Add new rule mandatory-useEvent (PR #100 by @AlexandrHoroshih)
  • Support Node.js 18 (PR #101)

Presets

  • Add mandatory-useEvent to scope preset

v0.6.0

  • Add new rule keep-options-order (PR #81)
  • Add new rule no-forward (PR #82)
  • Fix false-positive on nested object with store in no-duplicate-on (PR #86)
  • Fix possible exception on WIP code in some IDEs in no-duplicate-on

v0.5.2

  • Fix error of parsing empty function in strict-effect-handlers

v0.5.1

  • Fix possible exceptions on non-effector code

v0.5.0

Rules

  • Add new rule no-duplicate-on (PR #76)
  • Add new rule strict-effect-handlers (PR #78)
  • Add new rule enforce-gate-naming-convention (PR #80)

Presets

  • Add new preset scope (PR #79)
  • Add new preset react (PR #80)

Fixes

  • Fix incorrect suggestion in IDE in rule enforce-store-naming-convention

v0.4.2

  • Fix false-positive in no-useless-methods rule (PR #77)

v0.4.1

  • Specify ESLint version in peerDependencies
  • Fix false-positive in no-unnecessary-combination rule (PR #64)

v0.4.0

  • Add new rule: no-watch (PR #51 by @binjospookie)
  • Add new rule: no-unnecessary-combination (PR #43)
  • Decrease package size in node_modules 42.4 kB -> 39.3 kB (PR #54)
  • Add links to rule docs to IDE prompts (PR #55)
  • Support ESLint 8 (PR #58)

v0.3.1

  • Fixed false-positive in no-ambiguity-target with factories (PR #50)

v0.3.0

  • Add new rule: no-useless-methods (PR #41)
  • Add new rule: no-ambiguity-target (PR #42)
  • Add possibility to configure store's naming convention — suffix of prefix (PR #37 by @ilyaryabchinski)

v0.2.0

  • Add tests against Effector 22
  • Specify supported Node.JS versions
  • Add new rule: prefer-sample-over-forward-with-mapping (PR #34)

v0.1.4

  • Exclude test-coverage report from npm-package
  • Fixed SyntaxError in no-unnecessary-duplication suggestions (PR #28)

v0.1.3

  • Fixed false-positive in no-unnecessary-duplication with composite clock/source (PR #22)
  • Fixed TypeError in enforce-store-naming-convention (PR #25)
  • Fixed false-positive in enforce-effect-naming-convention with combine (PR #26)