effector/eslint-plugin

Rule: `no-ambiguity-target`

graberzz opened this issue · 1 comments

This code triggers warning:

import { createStore, createEvent, sample } from "effector";

const obj = {
  fn: () => {
    const $store = createStore(0);
    const event = createEvent();
    // warning  Method `sample` returns `target` and assigns the result to a variable. Consider removing one of them  effector/no-ambiguity-target
    sample({
      source: event,
      target: $store,
    });
  },
};

Sounds like a bug 😇 thanks for report, I'll take a look