Replies: 2 comments
-
I believe if you are using the rule |
Beta Was this translation helpful? Give feedback.
-
Yes, having a pure modifier for functions in typescript would be awesome :-). I usually try to avoid having any code outside of functions in all modules. Having side-effects happen just by importing a module is IMO never wanted. Perhaps we could check if there is anything else than function definitions in a module? That check would be less specific of course but it would eliminate any side-effect that happen on import. Or would that be too restrictive? |
Beta Was this translation helpful? Give feedback.
-
This one probably can't be done, but I'm curious if anyone has any thoughts - can we lint against module side effects?
Only way I've thought of so far is to lint specifically against
fp-ts
and enforce that you can't callTask
orIO
functions in a module except within another function.Beta Was this translation helpful? Give feedback.
All reactions