@opsydyn/oxlint-effect 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -889,10 +889,27 @@ not currently expose it; it is not part of the v1 export surface.
|
|
|
889
889
|
| `linteffect/no-raw-time-domain-field` | Time-looking fields typed as `number` or `Date`. | Models durations and clock boundaries explicitly. |
|
|
890
890
|
| `linteffect/no-overloaded-options-object` | `opts`, `options`, or `config` typed as `any` or `object`. | Uses Schema decoding or named config models instead of loose bags. |
|
|
891
891
|
| `linteffect/no-domain-logic-in-conditional` | Multi-clause business rules embedded in boolean expressions. | Extracts named predicates or validation Effects that can be tested. |
|
|
892
|
-
| `linteffect/no-implicit-state-machine-object` | Multiple
|
|
892
|
+
| `linteffect/no-implicit-state-machine-object` | Multiple lifecycle flags combined in a condition. Opt in to checking configured boolean pairs in `Schema.Struct` declarations. | Models impossible states away with tagged unions. |
|
|
893
893
|
| `linteffect/no-adhoc-domain-error` | `Effect.fail("...")` and `throw new Error("...")` in domain code. | Uses structured tagged errors for recovery and observability. |
|
|
894
894
|
| `linteffect/no-domain-meaning-by-folder-only` | Admin/public/internal meaning encoded only in names around raw IDs. | Represents context in types, commands, policies, or services. |
|
|
895
895
|
|
|
896
|
+
Configure pairs when the domain says those flags describe the same lifecycle.
|
|
897
|
+
|
|
898
|
+
```ts
|
|
899
|
+
rules: {
|
|
900
|
+
"linteffect/no-implicit-state-machine-object": [
|
|
901
|
+
"error",
|
|
902
|
+
{ schemaFlagPairs: [["open", "asking"]] },
|
|
903
|
+
],
|
|
904
|
+
}
|
|
905
|
+
```
|
|
906
|
+
|
|
907
|
+
This reports an inline Effect `Schema.Struct` containing both named fields as
|
|
908
|
+
direct `Schema.Boolean` members. The rule resolves the Effect Schema import,
|
|
909
|
+
including import aliases. Spreads, computed keys, and wrapped or referenced
|
|
910
|
+
schemas are outside the check. The existing conditional check also runs when
|
|
911
|
+
the option is omitted.
|
|
912
|
+
|
|
896
913
|
### Error Modeling
|
|
897
914
|
|
|
898
915
|
**Since 2.3.0:** `no-error-cause-loss` is included in `errorModeling`,
|