Reactivity rule does not allow directly returning a reactive expression instead of assigning to a variable #52
Labels
bug
Something isn't working
reactivity v2
To be addressed in the rewrite of the solid/reactivity rule
Describe the bug
Returning the result of
createMemo
inside ofmapArray
triggers thesolid/reactivity
lint, but in practice this isn't an issue.To Reproduce
Lint text:
"For proper analysis, a variable should be used to capture the result of this function call."
Expected behavior
I expect there to be no warning present.
(Or, if there should be a warning present, then maybe this is a documentation issue? I can avoid this warning by writing
const m = createMemo(...); return m
, which seems to me to be the same thing, but I might be missing something!)Environment (please complete the following information):
node --version
): 19.2.0eslint-plugin-solid
version (npm list eslint-plugin-solid
/yarn why eslint-plugin-solid
): 0.9.1eslint
version (npm list eslint
/yarn why eslint
): 8.29.0The text was updated successfully, but these errors were encountered: