You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[fp-ts/no-lib-imports](docs/rules/no-lib-imports.md)| Disallow imports from `fp-ts/lib/`| 🔧 ||
70
+
|[fp-ts/no-pipeable](docs/rules/no-pipeable.md)| Disallow imports from the `pipeable` module | 🔧 ||
71
+
|[fp-ts/no-module-imports](docs/rules/no-module-imports.md)| Disallow imports from fp-ts modules | 🔧 ||
72
+
|[fp-ts/no-redundant-flow](docs/rules/no-redundant-flow.md)| Remove redundant uses of `flow`| 🔧 ||
73
+
|[fp-ts/prefer-traverse](docs/rules/prefer-traverse.md)| Replace `map` + `sequence` with `traverse`| 💡 ||
74
+
|[fp-ts/prefer-chain](docs/rules/prefer-chain.md)| Replace `map` + `flatten` with `chain`| 💡 ||
75
+
|[fp-ts/prefer-bimap](docs/rules/prefer-bimap.md)| Replace `map` + `mapLeft` with `bimap`| 💡 ||
76
+
|[fp-ts/no-discarded-pure-expression](docs/rules/no-discarded-pure-expression.md)| Disallow expressions returning pure data types (like `Task` or `IO`) in statement position | 💡 | 🦄 |
77
+
78
+
### Fixable legend:
79
+
80
+
🔧 = auto-fixable via `--fix` (or via the appropriate editor configuration)
81
+
82
+
💡 = provides in-editor suggestions that need to be applied manually
57
83
58
84
## Configurations
59
85
@@ -74,6 +100,26 @@ The rules included in this configuration are:
# Disallow expressions returning pure data types (like `Task` or `IO`) where `void` or `unknown` is expected or in statement position (fp-ts/no-discarded-pure-expression)
2
+
3
+
Expressions which return a pure data type, such as `IO`, `Task` and their
4
+
variants, should normally be passed as an argument, returned, or run.
5
+
6
+
Failing to do so causes the program represented by `IO` or `Task` to never be
7
+
run, leading to surprising behavior which is normally difficult to debug.
8
+
9
+
This rule covers two common scenarios that are common programming errors:
10
+
11
+
- returning pure data types where `void` or `unknown` is expected (for instance,
12
+
in event handlers) without running them
13
+
14
+
- writing expressions that return pure data types in statement position (without
15
+
returning them or running them)
16
+
17
+
**💡 Fixable**: This rule provides in-editor suggested fixes.
0 commit comments