Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an fp-ts strict config #313

Open
danielnixon opened this issue Jan 13, 2023 · 5 comments
Open

Add an fp-ts strict config #313

danielnixon opened this issue Jan 13, 2023 · 5 comments

Comments

@danielnixon
Copy link
Owner

For those codebases that have fully embraced fp-ts -- especially including Task and TaskEither, 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.

@danielnixon
Copy link
Owner Author

In such codebases, we may want to configure https://eslint.org/docs/latest/rules/no-console to forbid console logging entirely.

  1. It's too easy to log during program construction instead of during interpretation/execution.
  2. fp-ts provides https://gcanti.github.io/fp-ts/modules/Console.ts.html

@danielnixon
Copy link
Owner Author

@danielnixon
Copy link
Owner Author

danielnixon commented Mar 10, 2023

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.

@danielnixon
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant