@opsydyn/oxlint-effect 2.0.0 → 2.1.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 +123 -56
- package/dist/index.d.mts +0 -50
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/skills/oxlint-effect/SKILL.md +7 -1
- package/skills/oxlint-effect/references/configuration.md +10 -2
- package/skills/oxlint-effect/references/versioned-rules.md +13 -0
package/README.md
CHANGED
|
@@ -1,25 +1,100 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @opsydyn/oxlint-effect
|
|
2
2
|
|
|
3
3
|
Oxlint plugin rules for Effect TypeScript code-shape constraints.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Quick Start
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
Requires Node.js 22 or newer. Version 2.x targets **Effect 4** by default.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
bun add -d oxlint @opsydyn/oxlint-effect
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
With npm, use `npm install -D oxlint @opsydyn/oxlint-effect` instead.
|
|
14
|
+
|
|
15
|
+
Create `oxlint.config.ts` at your project root:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { defineConfig } from "oxlint";
|
|
19
|
+
import { recommended } from "@opsydyn/oxlint-effect";
|
|
20
|
+
|
|
21
|
+
export default defineConfig({
|
|
22
|
+
plugins: ["typescript"],
|
|
23
|
+
jsPlugins: [...recommended.jsPlugins],
|
|
24
|
+
rules: recommended.rules,
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Run against your source directory:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
bunx oxlint --config oxlint.config.ts src
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
With npm, use `npx oxlint --config oxlint.config.ts src`.
|
|
35
|
+
`recommended.jsPlugins` is readonly; spreading it produces the mutable array
|
|
36
|
+
Oxlint expects. When adopting this in an existing config, preserve its plugins,
|
|
37
|
+
rules, ignores and overrides, and register `linteffect` only once.
|
|
38
|
+
|
|
39
|
+
Start with `recommended` for broad policy, or choose a focused group such as
|
|
40
|
+
`ddd` below. The [published 2.0.0 example](examples/npm-effect4-consumer/README.md)
|
|
41
|
+
installs from npm and checks annotated failures alongside clean repairs.
|
|
42
|
+
|
|
43
|
+
- [Effect 3 migration](#configure-legacy-effect-3)
|
|
44
|
+
- [Individual groups and composition](#configure-one-rule-group)
|
|
45
|
+
- [Type-aware opt-in](#configure-type-aware-linting)
|
|
46
|
+
- [Agent skill](#agent-skill)
|
|
47
|
+
- [Editor setup and missing diagnostics](#editor-setup-and-missing-diagnostics)
|
|
48
|
+
- [Rule catalogue](#rule-groups)
|
|
49
|
+
|
|
50
|
+
## Effect Versions
|
|
51
|
+
|
|
52
|
+
### Traced Functions And Explicit Contracts
|
|
53
|
+
|
|
54
|
+
**Version scope:** these changes apply to plugin **2.1.0 and later**. Version
|
|
55
|
+
**2.0.x** retains the previous recommended bans and option-presence concurrency
|
|
56
|
+
checks. This checkout carries the minor changeset; publication is separate.
|
|
57
|
+
|
|
58
|
+
`recommended` and `effect3.recommended` allow generator-based `Effect.fn`,
|
|
59
|
+
explicit `Effect.Effect`/`Layer.Layer` annotations and named Effect type aliases.
|
|
60
|
+
Named `Effect.fn` supplies tracing and stack-frame context; public service
|
|
61
|
+
contracts may deliberately specify success, error and requirement channels.
|
|
62
|
+
Prefer inference within implementations without erasing meaningful interfaces.
|
|
63
|
+
See [Effect.fn](https://effect.website/docs/v4/api/effect/Effect#fn) and the
|
|
64
|
+
[official service guide](https://effect.website/docs/v4/requirements-management/services).
|
|
65
|
+
|
|
66
|
+
The registered `no-effect-fn-generator`, `no-manual-effect-channels` and
|
|
67
|
+
`no-effect-type-alias` rules are now **opt-in style restrictions**, excluded from
|
|
68
|
+
both recommended maps and their `typeAware` companions. `effectComposition` and
|
|
69
|
+
`allRules` deliberately retain them; disable those three entries when composing
|
|
70
|
+
that full group and allowing these patterns. No rule ID was removed. Other
|
|
71
|
+
opinionated defaults are unchanged by this bounded recalibration.
|
|
72
|
+
|
|
73
|
+
Both packed consumers include annotated
|
|
74
|
+
[current failures](examples/effect4-consumer/src/policy-contracts.bad.ts) and
|
|
75
|
+
[valid traced service contracts](examples/effect4-consumer/src/policy-contracts.good.ts),
|
|
76
|
+
plus matching legacy files. Their runtime checks verify service values and the
|
|
77
|
+
automatic span name. Throwing inside Effect.fn remains a typed-failure warning;
|
|
78
|
+
supporting the function form does not permit unsafe bodies.
|
|
79
|
+
|
|
80
|
+
Published `2.0.0` makes default exports Effect 4 policy and adds `effect3` for
|
|
81
|
+
legacy projects. All 146 registered rules and 18 groups are
|
|
9
82
|
locally qualified for their documented forms against the pinned majors:
|
|
10
83
|
146 legacy Effect 3 cases and 141 current Effect 4 cases, with five legacy-only policies.
|
|
11
84
|
Published 1.x packages retain their original Effect 3 behaviour and do not
|
|
12
85
|
provide the new namespace. See the [compatibility roadmap](roadmap/14-effect4-compatibility/README.md)
|
|
13
|
-
and [per-rule audit](docs/effect-version-inventory.json)
|
|
14
|
-
The
|
|
15
|
-
|
|
86
|
+
and [per-rule audit](docs/effect-version-inventory.json) for detection scope.
|
|
87
|
+
The [2.0.0 release](https://github.com/opsydyn/oxlint-effect/releases/tag/v2.0.0)
|
|
88
|
+
includes migration notes. Older 1.x packages do not export `effect3`; upgrade
|
|
89
|
+
the plugin to 2.x to use the explicit legacy presets without upgrading Effect.
|
|
16
90
|
|
|
17
91
|
`bun run test:effect-versions` verifies pinned packed Effect 3.21.4 and 4.0.0
|
|
18
92
|
consumers, with exact warning counts, clean controls and config typechecks.
|
|
19
93
|
All Q01-Q52 now have behavioural evidence in the matching packed consumers.
|
|
20
94
|
The complete rule/group gate and unchanged 30 KB bundle-size gate pass locally.
|
|
21
|
-
Accepting a version option alone is not proof of adaptation.
|
|
22
|
-
|
|
95
|
+
Accepting a version option alone is not proof of adaptation. The rule/group
|
|
96
|
+
publication guard passes at 2.0.0; release and registry verification are recorded
|
|
97
|
+
in the [release checklist](docs/superpowers/reports/2026-10-01-effect4-release-preparation.md).
|
|
23
98
|
|
|
24
99
|
Additional group-by-group evidence is tracked in the
|
|
25
100
|
[wider qualification report](docs/superpowers/reports/2026-10-01-effect4-complete-qualification.md)
|
|
@@ -35,33 +110,10 @@ current [versioned guidance](skills/oxlint-effect/references/versioned-rules.md)
|
|
|
35
110
|
and paired Effect 4 assets, with legacy assets retained. This is lint/type/runtime
|
|
36
111
|
contract QA, not a launched application or browser/React adapter acceptance.
|
|
37
112
|
|
|
38
|
-
## Install
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
bun add -d oxlint @opsydyn/oxlint-effect
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Configure
|
|
45
|
-
|
|
46
|
-
```ts
|
|
47
|
-
import { defineConfig } from "oxlint";
|
|
48
|
-
import { recommended } from "@opsydyn/oxlint-effect";
|
|
49
|
-
|
|
50
|
-
export default defineConfig({
|
|
51
|
-
plugins: ["typescript"],
|
|
52
|
-
jsPlugins: [...recommended.jsPlugins],
|
|
53
|
-
rules: recommended.rules,
|
|
54
|
-
});
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
`recommended.jsPlugins` is exported as a readonly tuple. Spreading it creates
|
|
58
|
-
the mutable array shape expected by Oxlint's `ExternalPluginEntry[]` config
|
|
59
|
-
type.
|
|
60
|
-
|
|
61
113
|
### Configure Legacy Effect 3
|
|
62
114
|
|
|
63
115
|
Every group and its rules-only companion is available under `effect3` in the
|
|
64
|
-
|
|
116
|
+
published 2.x configuration. Default `ddd` targets Effect 4; legacy projects use:
|
|
65
117
|
|
|
66
118
|
```ts
|
|
67
119
|
import { defineConfig } from "oxlint";
|
|
@@ -109,7 +161,7 @@ The audit may identify further restrictions.
|
|
|
109
161
|
|
|
110
162
|
### Recovery And Runtime Across Majors
|
|
111
163
|
|
|
112
|
-
In
|
|
164
|
+
In 2.x, the plain-recovery rules recognise `Effect.catch`
|
|
113
165
|
for Effect 4 and `Effect.catchAll` under `effectVersion: 3`. IDs retain `catchall`
|
|
114
166
|
for configuration stability. Both direct and piped operators, expression
|
|
115
167
|
callbacks and block returns are covered. Original structured errors and explicit
|
|
@@ -143,6 +195,19 @@ See annotated [Effect 4 failures](examples/effect4-consumer/src/recovery-runtime
|
|
|
143
195
|
[legacy recovery failures](examples/effect3-consumer/src/recovery-runtime/rethrow.ts)
|
|
144
196
|
and the [qualification report](docs/superpowers/reports/2026-10-01-effect4-recovery-runtime-qualification.md).
|
|
145
197
|
|
|
198
|
+
### Editor Setup And Missing Diagnostics
|
|
199
|
+
|
|
200
|
+
Use the official Oxc extension (`oxc.oxc-vscode`) in VS Code and install Oxlint
|
|
201
|
+
locally in the workspace. See the [official editor setup](https://oxc.rs/docs/guide/usage/linter/editors).
|
|
202
|
+
|
|
203
|
+
If a warning is missing, first run the CLI against the same file with an explicit
|
|
204
|
+
config path. Check the selected group, rule overrides, ignores and configured
|
|
205
|
+
boundary paths. Custom Effect rules are syntax-only; an unrecognised import or
|
|
206
|
+
alias is not proof that the code is safe. If the CLI warns but the editor does
|
|
207
|
+
not, check the extension's workspace/config resolution and restart its language
|
|
208
|
+
server after dependency changes. Intentional `EXPECT`/`QA` examples must retain
|
|
209
|
+
their warnings; use the example's `qa` command rather than fixing the failures.
|
|
210
|
+
|
|
146
211
|
### Configure Type-Aware Linting
|
|
147
212
|
|
|
148
213
|
`typeAware` is an opt-in configuration bridge to [Oxc's type-aware
|
|
@@ -288,8 +353,9 @@ export default defineConfig({
|
|
|
288
353
|
The companion `oxlint-effect` skill helps coding agents configure the npm
|
|
289
354
|
plugin, diagnose DDD warnings, and repair domain models when requested.
|
|
290
355
|
|
|
291
|
-
|
|
292
|
-
|
|
356
|
+
Effect 4 assets are primary; labelled Effect 3 assets are retained for legacy
|
|
357
|
+
consumers. The [versioned guide](./skills/oxlint-effect/references/versioned-rules.md)
|
|
358
|
+
selects matching APIs, failure examples and repairs for every group.
|
|
293
359
|
|
|
294
360
|
```bash
|
|
295
361
|
npx skills add opsydyn/oxlint-effect --skill oxlint-effect
|
|
@@ -301,39 +367,40 @@ and uses the installed package's APIs and rules. Type-aware linting is opt-in.
|
|
|
301
367
|
Intentional `EXPECT`/`QA` failures are retained as diagnostic controls.
|
|
302
368
|
|
|
303
369
|
The [skill](./skills/oxlint-effect/SKILL.md), its focused references, and
|
|
304
|
-
paired [failures](./skills/oxlint-effect/assets/domain.bad.ts) and
|
|
305
|
-
[repairs](./skills/oxlint-effect/assets/domain.good.ts) are also included in the
|
|
370
|
+
paired [Effect 4 failures](./skills/oxlint-effect/assets/effect4/domain.bad.ts) and
|
|
371
|
+
[repairs](./skills/oxlint-effect/assets/effect4/domain.good.ts) are also included in the
|
|
306
372
|
npm package under `skills/oxlint-effect`. Skill installation is separate from
|
|
307
373
|
npm installation; installing the plugin alone does not activate agent guidance.
|
|
308
374
|
|
|
309
375
|
The initial examples cover branded IDs, explicit notification modes, and
|
|
310
|
-
structured transfer errors. Additional paired [domain shape failures](./skills/oxlint-effect/assets/domain-shapes.bad.ts)
|
|
311
|
-
and [repairs](./skills/oxlint-effect/assets/domain-shapes.good.ts) cover typed
|
|
376
|
+
structured transfer errors. Additional paired [domain shape failures](./skills/oxlint-effect/assets/effect4/domain-shapes.bad.ts)
|
|
377
|
+
and [repairs](./skills/oxlint-effect/assets/effect4/domain-shapes.good.ts) cover typed
|
|
312
378
|
commands, epoch-millisecond time values, and schema-backed options. Their tests
|
|
313
379
|
check wire roundtrips, optional fields, invalid inputs, and rejected type misuse.
|
|
314
|
-
Paired [domain decision failures](./skills/oxlint-effect/assets/domain-decisions.bad.ts)
|
|
315
|
-
and [repairs](./skills/oxlint-effect/assets/domain-decisions.good.ts) cover status
|
|
380
|
+
Paired [domain decision failures](./skills/oxlint-effect/assets/effect4/domain-decisions.bad.ts)
|
|
381
|
+
and [repairs](./skills/oxlint-effect/assets/effect4/domain-decisions.good.ts) cover status
|
|
316
382
|
variants, business predicates, and explicit lifecycle states. Their tests check
|
|
317
383
|
the original decision results, legacy flag roundtrips, and valid/invalid
|
|
318
384
|
transitions. The [decision guide](./skills/oxlint-effect/references/domain-decisions.md)
|
|
319
385
|
documents the example's boundary and lifecycle policies.
|
|
320
|
-
Paired [domain context failures](./skills/oxlint-effect/assets/domain-context.bad.ts)
|
|
321
|
-
and [repairs](./skills/oxlint-effect/assets/domain-context.good.ts) cover explicit
|
|
386
|
+
Paired [domain context failures](./skills/oxlint-effect/assets/effect4/domain-context.bad.ts)
|
|
387
|
+
and [repairs](./skills/oxlint-effect/assets/effect4/domain-context.good.ts) cover explicit
|
|
322
388
|
policy requirements, modelled time inputs, and meaningful error payloads. The
|
|
323
389
|
[context guide](./skills/oxlint-effect/references/domain-context.md) distinguishes
|
|
324
390
|
typed identity from authority and time conversion from clock reads.
|
|
325
|
-
Paired [public error failures](./skills/oxlint-effect/assets/public-errors.bad.ts)
|
|
326
|
-
and [repairs](./skills/oxlint-effect/assets/public-errors.good.ts) cover generic,
|
|
391
|
+
Paired [public error failures](./skills/oxlint-effect/assets/effect4/public-errors.bad.ts)
|
|
392
|
+
and [repairs](./skills/oxlint-effect/assets/effect4/public-errors.good.ts) cover generic,
|
|
327
393
|
unknown, and mixed public error channels. The
|
|
328
394
|
[public error guide](./skills/oxlint-effect/references/public-errors.md) explains
|
|
329
395
|
cause preservation, selective recovery, caller migration and defect ownership.
|
|
330
|
-
Paired [error preservation failures](./skills/oxlint-effect/assets/error-preservation.bad.ts)
|
|
331
|
-
and [repairs](./skills/oxlint-effect/assets/error-preservation.good.ts) cover
|
|
396
|
+
Paired [error preservation failures](./skills/oxlint-effect/assets/effect4/error-preservation.bad.ts)
|
|
397
|
+
and [repairs](./skills/oxlint-effect/assets/effect4/error-preservation.good.ts) cover
|
|
332
398
|
message-only failures, generic rethrows and log-only handlers. The
|
|
333
399
|
[preservation guide](./skills/oxlint-effect/references/error-preservation.md)
|
|
334
|
-
explains recovery ownership
|
|
335
|
-
|
|
336
|
-
|
|
400
|
+
explains recovery ownership; use the versioned guide for current `catch` versus
|
|
401
|
+
legacy `catchAll` APIs. Topic guides retain labelled legacy walkthroughs.
|
|
402
|
+
Paired [expected-state failures](./skills/oxlint-effect/assets/effect4/expected-state.bad.ts)
|
|
403
|
+
and [repairs](./skills/oxlint-effect/assets/effect4/expected-state.good.ts) cover ordinary
|
|
337
404
|
absence, broad null recovery and thrown expected rejection. Their
|
|
338
405
|
[guide](./skills/oxlint-effect/references/expected-state.md) explains the required
|
|
339
406
|
caller changes. The corpus now covers all 21 exported DDD rules with representative
|
|
@@ -372,7 +439,7 @@ Effect flow, domain meaning, or runtime boundaries.
|
|
|
372
439
|
| `linteffect/no-effect-async` | `Effect.async(...)`. | Manual callback bridges are easy to leak or resume incorrectly. |
|
|
373
440
|
| `linteffect/no-effect-ignore` | `Effect.ignore(...)` and pipe arguments such as `Effect.ignore`. | Makes ignored failures explicit at boundaries instead of burying failure ownership. |
|
|
374
441
|
| `linteffect/no-effect-never` | `Effect.never`. | Infinite effects should have explicit lifecycle and teardown ownership. |
|
|
375
|
-
| `linteffect/no-effect-fn-generator` | `Effect.fn(function* ...)`; v4 also covers named
|
|
442
|
+
| `linteffect/no-effect-fn-generator` | Opt-in style restriction on `Effect.fn(function* ...)`; v4 also covers the named factory form. | Excluded from both recommended presets. Traced generators are supported Effect APIs; full group/all-rule users must disable this ban to retain them. |
|
|
376
443
|
| `linteffect/no-nested-effect-gen` | `Effect.gen` nested inside another `Effect.gen`; v4 includes `{ self }` forms. | Keeps generator-based effects linear; v4 excludes separately defined nested functions. |
|
|
377
444
|
| `linteffect/no-yield-without-star-in-effect-gen` | Plain `yield` inside `Effect.gen`; v4 includes `{ self }` forms. | Uses `yield*` for resumed-value typing and consistent workflow style. Plain yield can execute in v4; the rule is a delegation-style policy, not an interpreter-failure claim. |
|
|
378
445
|
| `linteffect/no-async-effect-combinator-callback` | `async` callbacks passed to supported Effect combinators; v4 includes `mapEager`, `flatMapEager`, recovery families and handler maps. | Adapts Promise APIs with `Effect.tryPromise` in gen/flatMap; map callbacks stay pure. Some legacy overloads accept Promises; the rule still requires explicit ownership. |
|
|
@@ -380,8 +447,8 @@ Effect flow, domain meaning, or runtime boundaries.
|
|
|
380
447
|
| `linteffect/no-try-catch-in-effect-logic` | `try/catch` inside gen or supported callbacks; v4 includes eager mapping/sequencing, `{ self }` and recovery maps. | Adapts throwing APIs with `Effect.try` and recovers with `catch` (v4), `catchAll` (v3), or `catchTag`. |
|
|
381
448
|
| `linteffect/no-promise-api-in-effect-logic` | Static Promise APIs and visible chains inside Effect logic; v4 includes eager mapping/sequencing, self-bound gen and recovery maps. | Adapts Promise APIs at a boundary. V4 excludes `Effect.catch`/unrelated receivers and cannot resolve stored aliases; v3 retains broad chain-name recognition. |
|
|
382
449
|
| `linteffect/no-swallowed-catch-all` | Plain `catch`/`catchEager` expression/block recovery (v4), piped `catchAll` expressions (v3), returning succeed/void/ignore or visibly successful asVoid. | Retains failure or uses an explicit typed domain branch. V4 `asVoid(Effect.fail(error))` stays clean because it preserves failure; legacy asVoid policy is unchanged. |
|
|
383
|
-
| `linteffect/no-manual-effect-channels` |
|
|
384
|
-
| `linteffect/no-effect-type-alias` |
|
|
450
|
+
| `linteffect/no-manual-effect-channels` | Opt-in inference-only restriction on explicit Effect/Layer annotations. | Excluded from both recommended presets; explicit service, public and polymorphic contracts are valid. |
|
|
451
|
+
| `linteffect/no-effect-type-alias` | Opt-in restriction on aliases around `Effect.Effect<...>`. | Excluded from both recommended presets; named public Effect contracts remain supported. |
|
|
385
452
|
| `linteffect/no-public-generic-effect-error` | Exported APIs returning `Effect.Effect<_, Error, _>`. | Public Effect APIs should expose tagged, recoverable domain errors instead of generic `Error`. |
|
|
386
453
|
|
|
387
454
|
### Effect Flow
|
|
@@ -568,12 +635,12 @@ export default defineConfig({
|
|
|
568
635
|
|
|
569
636
|
| Rule | Catches | Why |
|
|
570
637
|
| --- | --- | --- |
|
|
571
|
-
| `linteffect/no-unbounded-effect-all` | `
|
|
638
|
+
| `linteffect/no-unbounded-effect-all` | Visible `"unbounded"` or `Infinity` concurrency on `Effect.all`, including stored/tuple inputs. | Omitted options are sequential and clean. Last explicit properties win; later opaque spreads/computed keys and named options are not resolved. Unknown budgets are not proof of safety. |
|
|
572
639
|
| `linteffect/no-fire-and-forget-fork` | V4: discarded direct/curried `forkChild` / `forkDetach` constructors, yielded handles and terminal pipe operators, including startup options. Legacy: bare `Effect.fork` statements only. | Bare construction is lazy, not a launched fiber. Retain and join/await/interrupt executed handles; children follow parent lifetime, detached fibers do not. `forkScoped` / `forkIn` are excluded; stored aliases and nonterminal pipes are not inferred. |
|
|
573
640
|
| `linteffect/no-fork-in-loop` | V4: `forkChild` / `forkDetach` in the own body of `for`, `for...of`, `for...in`, `while`, or `do...while`, including direct/curried/terminal-pipe startup forms. Legacy: broad nested `Effect.fork` traversal. | Retaining handles does not impose a collection budget; prefer bounded `Effect.all` / `Effect.forEach`. Scoped APIs remain excluded, which is not proof of bounded work. V4 skips nested function definitions. |
|
|
574
641
|
| `linteffect/no-race-without-cleanup` | V4: direct/curried/terminal-pipe `race`, `raceAll`, `raceFirst` and `raceAllFirst` without visible cleanup markers in arguments or local enclosing wrappers, including recognised generators and `acquireUseRelease` use callbacks. Legacy: `race` / `raceAll` arguments only. | Races already interrupt losers; owned resources still need finalizers/scopes. Markers do not prove every branch releases. Preserve first-success versus first-completion semantics; named task/cleanup aliases are not resolved. |
|
|
575
642
|
| `linteffect/no-unobserved-fiber` | V4: yielded `forkChild` / `forkDetach` handles without a same-binding `Fiber.join`, `await`, `interrupt`, reference pipe or direct return. Legacy: direct `Effect.fork` initializers matched by file-wide name. | V4 lexical references keep same-name/shadowed observations separate; lazy Effects and scoped APIs stay clean. Return transfers ownership, not a guarantee of later observation. Aliases/aggregate observers and arbitrary wrapped initializers are not inferred; reference presence does not prove execution. |
|
|
576
|
-
| `linteffect/no-unbounded-concurrent-retry` | Visible `Effect.retry`
|
|
643
|
+
| `linteffect/no-unbounded-concurrent-retry` | Visible `Effect.retry` inside `Effect.all` / `Effect.forEach` arguments with an explicit unbounded budget. | Prevents visible retry fan-out; sequential and finite budgets stay clean. Retry duration/count and opaque helpers are not inferred. Bound both concurrency and retry/backoff policy. |
|
|
577
644
|
| `linteffect/no-blocking-call-in-effect` | Identifier calls ending in `Sync`, or literal `fs` / `crypto` / `zlib` members ending in `Sync`, inside `Effect.sync` / `gen`; v4 also recognises self-bound `gen` and direct/named generator `fn`. | Sync suffixes are a heuristic, not import/performance analysis. Use genuinely asynchronous APIs via v4 `callback` (legacy `async`) / `tryPromise`, or a worker for blocking work. A Promise wrapper does not offload it. V4 skips nested function definitions; legacy traversal is broad. |
|
|
578
645
|
| `linteffect/no-promise-concurrency-in-effect` | Literal `Promise.all`, `allSettled`, `race`, or `any` inside `sync` / `gen` or recognised major-specific logic callbacks; v4 adds self-bound `gen` and direct/named generator `fn`. | Prefer bounded `Effect.all` / `forEach`, legacy `either` / v4 `result` for typed outcomes, `raceFirst` for first completion and `race` for first success. Underlying operations must observe cancellation signals. Defects/interruption and `AggregateError` require explicit semantics, not a mechanical swap. V4 skips nested definitions; aliases/computed calls are not inferred. |
|
|
579
646
|
| `linteffect/no-shared-mutable-state-across-fibers` | Outer `let` / `var` scalar writes or known collection mutations in inline direct `all` / `forEach` work; v4 also checks direct/curried/terminal-pipe child/detached forks, using lexical binding identity. Legacy checks `fork` with file-wide name sets. | Use atomic `Ref.update` or immutable result aggregation. Worker-local/shadow parameters stay clean in v4. Syntax is not execution/data-race proof: constructors are lazy and default collections sequential. Stored task bodies, const containers and property writes are not inferred; the separate global-state rule has its own scope. |
|
package/dist/index.d.mts
CHANGED
|
@@ -686,9 +686,6 @@ declare const reactAndRuntimeBoundariesRules: {
|
|
|
686
686
|
effectVersion: 4;
|
|
687
687
|
}];
|
|
688
688
|
"linteffect/no-return-in-callback": "error";
|
|
689
|
-
"linteffect/no-effect-fn-generator": ["error", {
|
|
690
|
-
effectVersion: 4;
|
|
691
|
-
}];
|
|
692
689
|
"linteffect/no-effect-sync-console": "error";
|
|
693
690
|
"linteffect/no-console-in-effect-flow": ["error", {
|
|
694
691
|
effectVersion: 4;
|
|
@@ -794,7 +791,6 @@ declare const reactAndRuntimeBoundariesRules: {
|
|
|
794
791
|
}];
|
|
795
792
|
"linteffect/no-try-catch": "error";
|
|
796
793
|
"linteffect/no-effect-wrapper-alias": "error";
|
|
797
|
-
"linteffect/no-manual-effect-channels": "error";
|
|
798
794
|
"linteffect/no-wrapgraphql-catchall": ["error", {
|
|
799
795
|
effectVersion: 4;
|
|
800
796
|
}];
|
|
@@ -808,7 +804,6 @@ declare const reactAndRuntimeBoundariesRules: {
|
|
|
808
804
|
effectVersion: 4;
|
|
809
805
|
}];
|
|
810
806
|
"linteffect/no-effect-succeed-variable": "error";
|
|
811
|
-
"linteffect/no-effect-type-alias": "error";
|
|
812
807
|
"linteffect/no-public-generic-effect-error": "error";
|
|
813
808
|
"linteffect/no-exception-domain-error": ["error", {
|
|
814
809
|
effectVersion: 4;
|
|
@@ -1313,9 +1308,6 @@ declare const reactAndRuntimeBoundariesRules: {
|
|
|
1313
1308
|
effectVersion: 4;
|
|
1314
1309
|
}];
|
|
1315
1310
|
"linteffect/no-return-in-callback": "error";
|
|
1316
|
-
"linteffect/no-effect-fn-generator": ["error", {
|
|
1317
|
-
effectVersion: 4;
|
|
1318
|
-
}];
|
|
1319
1311
|
"linteffect/no-effect-sync-console": "error";
|
|
1320
1312
|
"linteffect/no-console-in-effect-flow": ["error", {
|
|
1321
1313
|
effectVersion: 4;
|
|
@@ -1421,7 +1413,6 @@ declare const reactAndRuntimeBoundariesRules: {
|
|
|
1421
1413
|
}];
|
|
1422
1414
|
"linteffect/no-try-catch": "error";
|
|
1423
1415
|
"linteffect/no-effect-wrapper-alias": "error";
|
|
1424
|
-
"linteffect/no-manual-effect-channels": "error";
|
|
1425
1416
|
"linteffect/no-wrapgraphql-catchall": ["error", {
|
|
1426
1417
|
effectVersion: 4;
|
|
1427
1418
|
}];
|
|
@@ -1435,7 +1426,6 @@ declare const reactAndRuntimeBoundariesRules: {
|
|
|
1435
1426
|
effectVersion: 4;
|
|
1436
1427
|
}];
|
|
1437
1428
|
"linteffect/no-effect-succeed-variable": "error";
|
|
1438
|
-
"linteffect/no-effect-type-alias": "error";
|
|
1439
1429
|
"linteffect/no-public-generic-effect-error": "error";
|
|
1440
1430
|
"linteffect/no-exception-domain-error": ["error", {
|
|
1441
1431
|
effectVersion: 4;
|
|
@@ -1574,9 +1564,6 @@ declare const reactAndRuntimeBoundariesRules: {
|
|
|
1574
1564
|
effectVersion: 4;
|
|
1575
1565
|
}];
|
|
1576
1566
|
"linteffect/no-return-in-callback": "error";
|
|
1577
|
-
"linteffect/no-effect-fn-generator": ["error", {
|
|
1578
|
-
effectVersion: 4;
|
|
1579
|
-
}];
|
|
1580
1567
|
"linteffect/no-effect-sync-console": "error";
|
|
1581
1568
|
"linteffect/no-console-in-effect-flow": ["error", {
|
|
1582
1569
|
effectVersion: 4;
|
|
@@ -1682,7 +1669,6 @@ declare const reactAndRuntimeBoundariesRules: {
|
|
|
1682
1669
|
}];
|
|
1683
1670
|
"linteffect/no-try-catch": "error";
|
|
1684
1671
|
"linteffect/no-effect-wrapper-alias": "error";
|
|
1685
|
-
"linteffect/no-manual-effect-channels": "error";
|
|
1686
1672
|
"linteffect/no-wrapgraphql-catchall": ["error", {
|
|
1687
1673
|
effectVersion: 4;
|
|
1688
1674
|
}];
|
|
@@ -1696,7 +1682,6 @@ declare const reactAndRuntimeBoundariesRules: {
|
|
|
1696
1682
|
effectVersion: 4;
|
|
1697
1683
|
}];
|
|
1698
1684
|
"linteffect/no-effect-succeed-variable": "error";
|
|
1699
|
-
"linteffect/no-effect-type-alias": "error";
|
|
1700
1685
|
"linteffect/no-public-generic-effect-error": "error";
|
|
1701
1686
|
"linteffect/no-exception-domain-error": ["error", {
|
|
1702
1687
|
effectVersion: 4;
|
|
@@ -2292,9 +2277,6 @@ declare const reactAndRuntimeBoundariesRules: {
|
|
|
2292
2277
|
effectVersion: 4;
|
|
2293
2278
|
}];
|
|
2294
2279
|
"linteffect/no-return-in-callback": "error";
|
|
2295
|
-
"linteffect/no-effect-fn-generator": ["error", {
|
|
2296
|
-
effectVersion: 4;
|
|
2297
|
-
}];
|
|
2298
2280
|
"linteffect/no-effect-sync-console": "error";
|
|
2299
2281
|
"linteffect/no-console-in-effect-flow": ["error", {
|
|
2300
2282
|
effectVersion: 4;
|
|
@@ -2400,7 +2382,6 @@ declare const reactAndRuntimeBoundariesRules: {
|
|
|
2400
2382
|
}];
|
|
2401
2383
|
"linteffect/no-try-catch": "error";
|
|
2402
2384
|
"linteffect/no-effect-wrapper-alias": "error";
|
|
2403
|
-
"linteffect/no-manual-effect-channels": "error";
|
|
2404
2385
|
"linteffect/no-wrapgraphql-catchall": ["error", {
|
|
2405
2386
|
effectVersion: 4;
|
|
2406
2387
|
}];
|
|
@@ -2414,7 +2395,6 @@ declare const reactAndRuntimeBoundariesRules: {
|
|
|
2414
2395
|
effectVersion: 4;
|
|
2415
2396
|
}];
|
|
2416
2397
|
"linteffect/no-effect-succeed-variable": "error";
|
|
2417
|
-
"linteffect/no-effect-type-alias": "error";
|
|
2418
2398
|
"linteffect/no-public-generic-effect-error": "error";
|
|
2419
2399
|
"linteffect/no-exception-domain-error": ["error", {
|
|
2420
2400
|
effectVersion: 4;
|
|
@@ -2554,9 +2534,6 @@ declare const reactAndRuntimeBoundariesRules: {
|
|
|
2554
2534
|
effectVersion: 4;
|
|
2555
2535
|
}];
|
|
2556
2536
|
"linteffect/no-return-in-callback": "error";
|
|
2557
|
-
"linteffect/no-effect-fn-generator": ["error", {
|
|
2558
|
-
effectVersion: 4;
|
|
2559
|
-
}];
|
|
2560
2537
|
"linteffect/no-effect-sync-console": "error";
|
|
2561
2538
|
"linteffect/no-console-in-effect-flow": ["error", {
|
|
2562
2539
|
effectVersion: 4;
|
|
@@ -2662,7 +2639,6 @@ declare const reactAndRuntimeBoundariesRules: {
|
|
|
2662
2639
|
}];
|
|
2663
2640
|
"linteffect/no-try-catch": "error";
|
|
2664
2641
|
"linteffect/no-effect-wrapper-alias": "error";
|
|
2665
|
-
"linteffect/no-manual-effect-channels": "error";
|
|
2666
2642
|
"linteffect/no-wrapgraphql-catchall": ["error", {
|
|
2667
2643
|
effectVersion: 4;
|
|
2668
2644
|
}];
|
|
@@ -2676,7 +2652,6 @@ declare const reactAndRuntimeBoundariesRules: {
|
|
|
2676
2652
|
effectVersion: 4;
|
|
2677
2653
|
}];
|
|
2678
2654
|
"linteffect/no-effect-succeed-variable": "error";
|
|
2679
|
-
"linteffect/no-effect-type-alias": "error";
|
|
2680
2655
|
"linteffect/no-public-generic-effect-error": "error";
|
|
2681
2656
|
"linteffect/no-exception-domain-error": ["error", {
|
|
2682
2657
|
effectVersion: 4;
|
|
@@ -3994,9 +3969,6 @@ declare const effect3: {
|
|
|
3994
3969
|
effectVersion: 3;
|
|
3995
3970
|
}];
|
|
3996
3971
|
"linteffect/no-return-in-callback": "error";
|
|
3997
|
-
"linteffect/no-effect-fn-generator": ["error", {
|
|
3998
|
-
effectVersion: 3;
|
|
3999
|
-
}];
|
|
4000
3972
|
"linteffect/no-effect-sync-console": "error";
|
|
4001
3973
|
"linteffect/no-console-in-effect-flow": ["error", {
|
|
4002
3974
|
effectVersion: 3;
|
|
@@ -4108,7 +4080,6 @@ declare const effect3: {
|
|
|
4108
4080
|
}];
|
|
4109
4081
|
"linteffect/no-try-catch": "error";
|
|
4110
4082
|
"linteffect/no-effect-wrapper-alias": "error";
|
|
4111
|
-
"linteffect/no-manual-effect-channels": "error";
|
|
4112
4083
|
"linteffect/no-wrapgraphql-catchall": ["error", {
|
|
4113
4084
|
effectVersion: 3;
|
|
4114
4085
|
}];
|
|
@@ -4122,7 +4093,6 @@ declare const effect3: {
|
|
|
4122
4093
|
effectVersion: 3;
|
|
4123
4094
|
}];
|
|
4124
4095
|
"linteffect/no-effect-succeed-variable": "error";
|
|
4125
|
-
"linteffect/no-effect-type-alias": "error";
|
|
4126
4096
|
"linteffect/no-public-generic-effect-error": "error";
|
|
4127
4097
|
"linteffect/no-exception-domain-error": ["error", {
|
|
4128
4098
|
effectVersion: 3;
|
|
@@ -4653,9 +4623,6 @@ declare const effect3: {
|
|
|
4653
4623
|
effectVersion: 3;
|
|
4654
4624
|
}];
|
|
4655
4625
|
"linteffect/no-return-in-callback": "error";
|
|
4656
|
-
"linteffect/no-effect-fn-generator": ["error", {
|
|
4657
|
-
effectVersion: 3;
|
|
4658
|
-
}];
|
|
4659
4626
|
"linteffect/no-effect-sync-console": "error";
|
|
4660
4627
|
"linteffect/no-console-in-effect-flow": ["error", {
|
|
4661
4628
|
effectVersion: 3;
|
|
@@ -4767,7 +4734,6 @@ declare const effect3: {
|
|
|
4767
4734
|
}];
|
|
4768
4735
|
"linteffect/no-try-catch": "error";
|
|
4769
4736
|
"linteffect/no-effect-wrapper-alias": "error";
|
|
4770
|
-
"linteffect/no-manual-effect-channels": "error";
|
|
4771
4737
|
"linteffect/no-wrapgraphql-catchall": ["error", {
|
|
4772
4738
|
effectVersion: 3;
|
|
4773
4739
|
}];
|
|
@@ -4781,7 +4747,6 @@ declare const effect3: {
|
|
|
4781
4747
|
effectVersion: 3;
|
|
4782
4748
|
}];
|
|
4783
4749
|
"linteffect/no-effect-succeed-variable": "error";
|
|
4784
|
-
"linteffect/no-effect-type-alias": "error";
|
|
4785
4750
|
"linteffect/no-public-generic-effect-error": "error";
|
|
4786
4751
|
"linteffect/no-exception-domain-error": ["error", {
|
|
4787
4752
|
effectVersion: 3;
|
|
@@ -4930,9 +4895,6 @@ declare const effect3: {
|
|
|
4930
4895
|
effectVersion: 3;
|
|
4931
4896
|
}];
|
|
4932
4897
|
"linteffect/no-return-in-callback": "error";
|
|
4933
|
-
"linteffect/no-effect-fn-generator": ["error", {
|
|
4934
|
-
effectVersion: 3;
|
|
4935
|
-
}];
|
|
4936
4898
|
"linteffect/no-effect-sync-console": "error";
|
|
4937
4899
|
"linteffect/no-console-in-effect-flow": ["error", {
|
|
4938
4900
|
effectVersion: 3;
|
|
@@ -5044,7 +5006,6 @@ declare const effect3: {
|
|
|
5044
5006
|
}];
|
|
5045
5007
|
"linteffect/no-try-catch": "error";
|
|
5046
5008
|
"linteffect/no-effect-wrapper-alias": "error";
|
|
5047
|
-
"linteffect/no-manual-effect-channels": "error";
|
|
5048
5009
|
"linteffect/no-wrapgraphql-catchall": ["error", {
|
|
5049
5010
|
effectVersion: 3;
|
|
5050
5011
|
}];
|
|
@@ -5058,7 +5019,6 @@ declare const effect3: {
|
|
|
5058
5019
|
effectVersion: 3;
|
|
5059
5020
|
}];
|
|
5060
5021
|
"linteffect/no-effect-succeed-variable": "error";
|
|
5061
|
-
"linteffect/no-effect-type-alias": "error";
|
|
5062
5022
|
"linteffect/no-public-generic-effect-error": "error";
|
|
5063
5023
|
"linteffect/no-exception-domain-error": ["error", {
|
|
5064
5024
|
effectVersion: 3;
|
|
@@ -5697,9 +5657,6 @@ declare const effect3: {
|
|
|
5697
5657
|
effectVersion: 3;
|
|
5698
5658
|
}];
|
|
5699
5659
|
"linteffect/no-return-in-callback": "error";
|
|
5700
|
-
"linteffect/no-effect-fn-generator": ["error", {
|
|
5701
|
-
effectVersion: 3;
|
|
5702
|
-
}];
|
|
5703
5660
|
"linteffect/no-effect-sync-console": "error";
|
|
5704
5661
|
"linteffect/no-console-in-effect-flow": ["error", {
|
|
5705
5662
|
effectVersion: 3;
|
|
@@ -5811,7 +5768,6 @@ declare const effect3: {
|
|
|
5811
5768
|
}];
|
|
5812
5769
|
"linteffect/no-try-catch": "error";
|
|
5813
5770
|
"linteffect/no-effect-wrapper-alias": "error";
|
|
5814
|
-
"linteffect/no-manual-effect-channels": "error";
|
|
5815
5771
|
"linteffect/no-wrapgraphql-catchall": ["error", {
|
|
5816
5772
|
effectVersion: 3;
|
|
5817
5773
|
}];
|
|
@@ -5825,7 +5781,6 @@ declare const effect3: {
|
|
|
5825
5781
|
effectVersion: 3;
|
|
5826
5782
|
}];
|
|
5827
5783
|
"linteffect/no-effect-succeed-variable": "error";
|
|
5828
|
-
"linteffect/no-effect-type-alias": "error";
|
|
5829
5784
|
"linteffect/no-public-generic-effect-error": "error";
|
|
5830
5785
|
"linteffect/no-exception-domain-error": ["error", {
|
|
5831
5786
|
effectVersion: 3;
|
|
@@ -5974,9 +5929,6 @@ declare const effect3: {
|
|
|
5974
5929
|
effectVersion: 3;
|
|
5975
5930
|
}];
|
|
5976
5931
|
"linteffect/no-return-in-callback": "error";
|
|
5977
|
-
"linteffect/no-effect-fn-generator": ["error", {
|
|
5978
|
-
effectVersion: 3;
|
|
5979
|
-
}];
|
|
5980
5932
|
"linteffect/no-effect-sync-console": "error";
|
|
5981
5933
|
"linteffect/no-console-in-effect-flow": ["error", {
|
|
5982
5934
|
effectVersion: 3;
|
|
@@ -6088,7 +6040,6 @@ declare const effect3: {
|
|
|
6088
6040
|
}];
|
|
6089
6041
|
"linteffect/no-try-catch": "error";
|
|
6090
6042
|
"linteffect/no-effect-wrapper-alias": "error";
|
|
6091
|
-
"linteffect/no-manual-effect-channels": "error";
|
|
6092
6043
|
"linteffect/no-wrapgraphql-catchall": ["error", {
|
|
6093
6044
|
effectVersion: 3;
|
|
6094
6045
|
}];
|
|
@@ -6102,7 +6053,6 @@ declare const effect3: {
|
|
|
6102
6053
|
effectVersion: 3;
|
|
6103
6054
|
}];
|
|
6104
6055
|
"linteffect/no-effect-succeed-variable": "error";
|
|
6105
|
-
"linteffect/no-effect-type-alias": "error";
|
|
6106
6056
|
"linteffect/no-public-generic-effect-error": "error";
|
|
6107
6057
|
"linteffect/no-exception-domain-error": ["error", {
|
|
6108
6058
|
effectVersion: 3;
|