eslint-plugin
eslint-plugin copied to clipboard
Enforcing best practices for Effector
Example: ```ts const change = createEvent(); const firstField = createField(); const secondField = createField(); firstField.$value.on(change, (_, { first }) => first); // Error: Method `.on` is called on store `$value`...
В связи с [переходом на новый](https://t.me/sergeysova/842) основной способ указания домена для создаваемых юнитов предлагаю завести соответствующее правило, чтобы поддержать консистентность ```ts const domain = createDomain() // Bad const event =...
Rule effector/mandatory-scope-binding not working - no warnings/errors Example: https://stackblitz.com/edit/effector-vite-react-template-2sj3r3?file=src%2Fapplication.tsx
Using effects in components typically leads to business logic leaks into view. A cleaner approach is to use events instead of effects. I suggest to add corresponding rule to warn...
Enforce a maximum number of lines of code in a unit Some people consider large functions a code smell. Large `fn` or `filter` in `sample` can make it hard to...
Plusing should ignore combine operator in source for a sample if it has fn specified ```ts sample({ clock: $desks, source: combine({ desks: $desks, id: $id }, ({ desks, id })...
``` Rule | Time (ms) | Relative :---------------------------------------|----------:|--------: effector/enforce-gate-naming-convention | 17103.194 | 16.5% @typescript-eslint/no-redeclare | 9522.036 | 9.2% import/no-relative-packages | 9331.129 | 9.0% effector/mandatory-scope-binding | 9249.898 | 8.9% import/no-deprecated |...