@systemfsoftware/oxlint-plugin-effect-platform 2.2.0 → 3.0.1
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/CHANGELOG.md +2 -2
- package/README.md +10 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +1085 -195
- package/dist/oxlint-plugin-effect-platform-untrimmed.d.ts +2 -0
- package/dist/oxlint-plugin-effect-platform.d.ts +2 -0
- package/package.json +13 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# @systemfsoftware/oxlint-plugin-effect-platform
|
|
2
2
|
|
|
3
|
-
# @systemfsoftware/oxlint-plugin-effect-platform@
|
|
3
|
+
# @systemfsoftware/oxlint-plugin-effect-platform@3.0.1
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The Effect presets list every rule `@effect/tsgo` 0.70 ships. A rule missing from a preset fell back to its upstream default, and `unstableApiUsage` defaulted to `warning`, which fails the `effect-tsgo` exit code on every use of an Effect 4 platform module. The rules that default to warning or error are now `error`, and suggestion-level hints are `off`. `allowedUnstableApis` names the Effect 4 platform subtrees, so `unstableApiUsage` fails only on unstable APIs outside them.
|
package/README.md
CHANGED
|
@@ -67,6 +67,7 @@ All six rules are in the recommended set, so the spread enables them at `error`.
|
|
|
67
67
|
| `entrypoint-no-promise-wrapper` | `runMain(Effect.tryPromise(...))` or `runMain(Effect.promise(...))`: the outer edge awaits a promise while the real fibers run in a runtime it cannot interrupt |
|
|
68
68
|
| `runtime-construction-placement` | `ManagedRuntime.make` inside a function body — a runtime built per call that nothing finalizes — and `ManagedRuntime.make` at module scope, where importing the module starts fibers nothing can interrupt. It judges runtime code: a file under a `src/` directory segment, or a `*.test.ts` file; a package-root hook, config, or setup file is outside its subject |
|
|
69
69
|
| `no-unported-time-source` | A direct `Date.now`, `performance.now`, `process.hrtime`, `Math.random`, `crypto.getRandomValues`, `crypto.randomUUID`, `setTimeout`, `setInterval`, or `setImmediate` call, an argument-less `new Date()`, or a static or dynamic import of `node:timers` in production source outside a file listed in the rule's `ports` option |
|
|
70
|
+
| `no-die-on-service-option` | An `Effect.serviceOption` read whose own None branch reaches a defect: `Effect.die`, `Effect.failCause(Cause.die(…))`, `throw`, `Option.getOrThrow*`, or `Effect.orDie` over `Effect.fromOption` of the read. The read removes the service from the requirement type, so a defect on absence passes typecheck and fails only at runtime |
|
|
70
71
|
|
|
71
72
|
What the placement rule leaves alone, each a shape the rule's own fixtures pin:
|
|
72
73
|
|
|
@@ -88,6 +89,15 @@ What the time-source rule leaves alone, each a shape the rule's own fixtures pin
|
|
|
88
89
|
- A file listed in the rule's `ports` option, matched by repo-relative path or path suffix: the recommended config registers `packages/atom/effect-atom/src/internal/HostTimer.ts` and `packages/schema/effect-schema-law/src/recursion-laws.ts`.
|
|
89
90
|
- Test and fixture files (`.test.ts`, `.spec.ts`, `__tests__/`, `__fixtures__/`, `tests/`, `testResources/`): the regime binds production code.
|
|
90
91
|
|
|
92
|
+
What the service-option rule leaves alone, and what it cannot see:
|
|
93
|
+
|
|
94
|
+
- A None branch that returns a fallback, skips the work, or fails with a typed error (`Effect.fail`, `Effect.fromOption(() => new E())` not wrapped in `Effect.orDie`).
|
|
95
|
+
- A defect reachable only when the read is Some, or elsewhere in the function and not on the read's None path.
|
|
96
|
+
- A fallback object whose methods die: the walk stops at a nested function, except a generator passed to `Effect.gen`, or an `Effect.fn` that is itself the handler.
|
|
97
|
+
- Not seen: a module-level stub that dies indirectly, returned from the None branch of a read in another function; an `Option` returned from a helper and crashed by its caller; absence mapped to `undefined` and then crashed; `Effect.orDie` wrapped around the read rather than after it. These need typed entry points and a test at the invocation boundary.
|
|
98
|
+
|
|
99
|
+
There is no option, allowlist or disable comment. A service that must be present goes back into the requirement type with `yield* Tag`; code implementing a framework interface that fixes its requirement type takes the value as a construction argument instead.
|
|
100
|
+
|
|
91
101
|
## FAQ
|
|
92
102
|
|
|
93
103
|
**Q: Installed, but nothing is reported.**
|
package/dist/index.d.ts
CHANGED
|
@@ -10,10 +10,12 @@ declare const _default: {
|
|
|
10
10
|
'entrypoint-not-imported': import("@oxlint/plugins").Rule;
|
|
11
11
|
'entrypoint-no-promise-wrapper': import("@oxlint/plugins").Rule;
|
|
12
12
|
'runtime-construction-placement': import("@oxlint/plugins").Rule;
|
|
13
|
+
'no-die-on-service-option': import("@oxlint/plugins").Rule;
|
|
13
14
|
'no-logging-in-catch': import("@oxlint/plugins").Rule;
|
|
14
15
|
'no-native-map-in-effect': import("@oxlint/plugins").Rule;
|
|
15
16
|
'no-native-set-in-effect': import("@oxlint/plugins").Rule;
|
|
16
17
|
'no-new-worker-with-wasm-import': import("@oxlint/plugins").Rule;
|
|
18
|
+
'node-runtime-needs-engines': import("@oxlint/plugins").Rule;
|
|
17
19
|
'no-unported-time-source': import("@oxlint/plugins").Rule;
|
|
18
20
|
};
|
|
19
21
|
configs: {
|