Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no-ambiguity-target: ложные срабатывания в фабриках #49

Closed
sezyara opened this issue Sep 29, 2021 · 2 comments · Fixed by #50
Closed

no-ambiguity-target: ложные срабатывания в фабриках #49

sezyara opened this issue Sep 29, 2021 · 2 comments · Fixed by #50
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@sezyara
Copy link

sezyara commented Sep 29, 2021

В фабриках на effector имеются ложные срабатывания правила effector/no-ambiguity-target на guard.

Что говорит eslint:
Method 'guard' returns 'target' and assigns the result to a variable. Consider removing one of them effector/no-ambiguity-target

Версии пакетов:
effector: 21.8.12
eslint: 7.32.0
eslint-plugin-effector: 0.3.0

Конфиг eslint:

module.exports = {
  root: true,
  extends: [
    'plugin:effector/recommended'
  ],
  parser: '@typescript-eslint/parser',
  plugins: [
    'effector',
    '@typescript-eslint'
  ]
}

Пример кода: typescript playground

@igorkamyshev igorkamyshev added bug Something isn't working good first issue Good for newcomers labels Sep 29, 2021
@igorkamyshev
Copy link
Member

Note for me in future: the problem is usage of traverseParentByType.

@igorkamyshev
Copy link
Member

fixed https://github.com/effector/eslint-plugin/releases/tag/v0.3.1

Thanks to report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants