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-watch rule: not work #147

Closed
Rastraponovich opened this issue Aug 3, 2023 · 1 comment
Closed

no-watch rule: not work #147

Rastraponovich opened this issue Aug 3, 2023 · 1 comment
Labels
question Further information is requested

Comments

@Rastraponovich
Copy link

Hello!
Rule don't work in recommended preset and if we inline write config


extends: [
    "eslint:recommended",
    "plugin:@typescript-eslint/recommended",
    "plugin:react-hooks/recommended",
    "plugin:effector/recommended",
  ],
    parser: "@typescript-eslint/parser",
    parserOptions: { ecmaVersion: "latest", sourceType: "module" },
    plugins: ["react-refresh", "jsx-a11y", "prettier", "react", "effector"],
    rules: {
      "effector/no-watch": "error",
  },
...
]
image

"eslint-plugin-effector": "^0.11.0",
"effector": "^22.8.6",
"eslint": "^8.38.0",

@igorkamyshev
Copy link
Member

Hello! The reason is that in pure JS we do not have a way to check that is something is Event, so we use TS info for these checks. I suppose, in your setup, ESLint does not have access to types info. Check the corresponding issue for the more info — #131

However, it will work with Store, because in Effector's ecosystem there is a specific convention what variable with $ is a Store.

@sergeysova sergeysova added the question Further information is requested label Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants