Open danielnixon opened 1 year ago
In such codebases, we may want to configure https://eslint.org/docs/latest/rules/no-console to forbid console logging entirely.
We will also want the rule to flag when an IO or a TE or similar type is interpreted. We only want that to happen once "at the end of the world" (where the lint rule can be ignored). If a dev has sprinkled IO or TE execution/interpretation throughout the program, it is an error.
https://github.com/danielnixon/eslint-plugin-total-functions/blob/master/src/rules/no-premature-fp-ts-effects.ts takes care of the "at the end of the world" point.
For those codebases that have fully embraced fp-ts -- especially including
Task
andTaskEither
, we want to forbid things like creating new promises or including promises in return types.Not all codebases will be using fp-ts, and not all of those that do will have gone this far. But for those who have, the reminder via linting to not use promises would be valuable.