no-watch rule: not work
Rastraponovich opened this issue · 1 comments
Rastraponovich commented
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",
},
...
]
"eslint-plugin-effector": "^0.11.0",
"effector": "^22.8.6",
"eslint": "^8.38.0",
igorkamyshev commented
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.