Replies: 2 comments
|
I believe if you are using the rule |
0 replies
|
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? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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-tsand enforce that you can't callTaskorIOfunctions in a module except within another function.All reactions