@opsydyn/oxlint-effect 2.0.0 → 2.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/README.md CHANGED
@@ -1,25 +1,72 @@
1
- # linteffect Oxlint plugin
1
+ # @opsydyn/oxlint-effect
2
2
 
3
3
  Oxlint plugin rules for Effect TypeScript code-shape constraints.
4
4
 
5
- ### Effect Version Status
5
+ ## Quick Start
6
6
 
7
- The unreleased `2.0.0` migration makes default exports Effect 4 policy and adds
8
- `effect3` for legacy projects. All 146 registered rules and 18 groups are
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
+ Published `2.0.0` makes default exports Effect 4 policy and adds `effect3` for
53
+ legacy projects. All 146 registered rules and 18 groups are
9
54
  locally qualified for their documented forms against the pinned majors:
10
55
  146 legacy Effect 3 cases and 141 current Effect 4 cases, with five legacy-only policies.
11
56
  Published 1.x packages retain their original Effect 3 behaviour and do not
12
57
  provide the new namespace. See the [compatibility roadmap](roadmap/14-effect4-compatibility/README.md)
13
- and [per-rule audit](docs/effect-version-inventory.json) before using this checkout.
14
- The staged major changeset and outstanding publication gates are tracked in the
15
- [2.0.0 release checklist](docs/superpowers/reports/2026-10-01-effect4-release-preparation.md).
58
+ and [per-rule audit](docs/effect-version-inventory.json) for detection scope.
59
+ The [2.0.0 release](https://github.com/opsydyn/oxlint-effect/releases/tag/v2.0.0)
60
+ includes migration notes. Older 1.x packages do not export `effect3`; upgrade
61
+ the plugin to 2.x to use the explicit legacy presets without upgrading Effect.
16
62
 
17
63
  `bun run test:effect-versions` verifies pinned packed Effect 3.21.4 and 4.0.0
18
64
  consumers, with exact warning counts, clean controls and config typechecks.
19
65
  All Q01-Q52 now have behavioural evidence in the matching packed consumers.
20
66
  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. `release` and
22
- `prepublishOnly` remain blocked at version 1.2.0 until the major changeset is applied.
67
+ Accepting a version option alone is not proof of adaptation. The rule/group
68
+ publication guard passes at 2.0.0; release and registry verification are recorded
69
+ in the [release checklist](docs/superpowers/reports/2026-10-01-effect4-release-preparation.md).
23
70
 
24
71
  Additional group-by-group evidence is tracked in the
25
72
  [wider qualification report](docs/superpowers/reports/2026-10-01-effect4-complete-qualification.md)
@@ -35,33 +82,10 @@ current [versioned guidance](skills/oxlint-effect/references/versioned-rules.md)
35
82
  and paired Effect 4 assets, with legacy assets retained. This is lint/type/runtime
36
83
  contract QA, not a launched application or browser/React adapter acceptance.
37
84
 
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
85
  ### Configure Legacy Effect 3
62
86
 
63
87
  Every group and its rules-only companion is available under `effect3` in the
64
- unreleased 2.0 configuration. Default `ddd` targets Effect 4; legacy projects use:
88
+ published 2.x configuration. Default `ddd` targets Effect 4; legacy projects use:
65
89
 
66
90
  ```ts
67
91
  import { defineConfig } from "oxlint";
@@ -109,7 +133,7 @@ The audit may identify further restrictions.
109
133
 
110
134
  ### Recovery And Runtime Across Majors
111
135
 
112
- In the unreleased 2.0 checkout, the plain-recovery rules recognise `Effect.catch`
136
+ In 2.x, the plain-recovery rules recognise `Effect.catch`
113
137
  for Effect 4 and `Effect.catchAll` under `effectVersion: 3`. IDs retain `catchall`
114
138
  for configuration stability. Both direct and piped operators, expression
115
139
  callbacks and block returns are covered. Original structured errors and explicit
@@ -143,6 +167,19 @@ See annotated [Effect 4 failures](examples/effect4-consumer/src/recovery-runtime
143
167
  [legacy recovery failures](examples/effect3-consumer/src/recovery-runtime/rethrow.ts)
144
168
  and the [qualification report](docs/superpowers/reports/2026-10-01-effect4-recovery-runtime-qualification.md).
145
169
 
170
+ ### Editor Setup And Missing Diagnostics
171
+
172
+ Use the official Oxc extension (`oxc.oxc-vscode`) in VS Code and install Oxlint
173
+ locally in the workspace. See the [official editor setup](https://oxc.rs/docs/guide/usage/linter/editors).
174
+
175
+ If a warning is missing, first run the CLI against the same file with an explicit
176
+ config path. Check the selected group, rule overrides, ignores and configured
177
+ boundary paths. Custom Effect rules are syntax-only; an unrecognised import or
178
+ alias is not proof that the code is safe. If the CLI warns but the editor does
179
+ not, check the extension's workspace/config resolution and restart its language
180
+ server after dependency changes. Intentional `EXPECT`/`QA` examples must retain
181
+ their warnings; use the example's `qa` command rather than fixing the failures.
182
+
146
183
  ### Configure Type-Aware Linting
147
184
 
148
185
  `typeAware` is an opt-in configuration bridge to [Oxc's type-aware
@@ -288,8 +325,9 @@ export default defineConfig({
288
325
  The companion `oxlint-effect` skill helps coding agents configure the npm
289
326
  plugin, diagnose DDD warnings, and repair domain models when requested.
290
327
 
291
- Its existing assets currently target Effect 3. They are legacy controls during
292
- the v4 migration, not qualified v4 repairs; select `effect3` for their lint QA.
328
+ Effect 4 assets are primary; labelled Effect 3 assets are retained for legacy
329
+ consumers. The [versioned guide](./skills/oxlint-effect/references/versioned-rules.md)
330
+ selects matching APIs, failure examples and repairs for every group.
293
331
 
294
332
  ```bash
295
333
  npx skills add opsydyn/oxlint-effect --skill oxlint-effect
@@ -301,39 +339,40 @@ and uses the installed package's APIs and rules. Type-aware linting is opt-in.
301
339
  Intentional `EXPECT`/`QA` failures are retained as diagnostic controls.
302
340
 
303
341
  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
342
+ paired [Effect 4 failures](./skills/oxlint-effect/assets/effect4/domain.bad.ts) and
343
+ [repairs](./skills/oxlint-effect/assets/effect4/domain.good.ts) are also included in the
306
344
  npm package under `skills/oxlint-effect`. Skill installation is separate from
307
345
  npm installation; installing the plugin alone does not activate agent guidance.
308
346
 
309
347
  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
348
+ structured transfer errors. Additional paired [domain shape failures](./skills/oxlint-effect/assets/effect4/domain-shapes.bad.ts)
349
+ and [repairs](./skills/oxlint-effect/assets/effect4/domain-shapes.good.ts) cover typed
312
350
  commands, epoch-millisecond time values, and schema-backed options. Their tests
313
351
  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
352
+ Paired [domain decision failures](./skills/oxlint-effect/assets/effect4/domain-decisions.bad.ts)
353
+ and [repairs](./skills/oxlint-effect/assets/effect4/domain-decisions.good.ts) cover status
316
354
  variants, business predicates, and explicit lifecycle states. Their tests check
317
355
  the original decision results, legacy flag roundtrips, and valid/invalid
318
356
  transitions. The [decision guide](./skills/oxlint-effect/references/domain-decisions.md)
319
357
  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
358
+ Paired [domain context failures](./skills/oxlint-effect/assets/effect4/domain-context.bad.ts)
359
+ and [repairs](./skills/oxlint-effect/assets/effect4/domain-context.good.ts) cover explicit
322
360
  policy requirements, modelled time inputs, and meaningful error payloads. The
323
361
  [context guide](./skills/oxlint-effect/references/domain-context.md) distinguishes
324
362
  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,
363
+ Paired [public error failures](./skills/oxlint-effect/assets/effect4/public-errors.bad.ts)
364
+ and [repairs](./skills/oxlint-effect/assets/effect4/public-errors.good.ts) cover generic,
327
365
  unknown, and mixed public error channels. The
328
366
  [public error guide](./skills/oxlint-effect/references/public-errors.md) explains
329
367
  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
368
+ Paired [error preservation failures](./skills/oxlint-effect/assets/effect4/error-preservation.bad.ts)
369
+ and [repairs](./skills/oxlint-effect/assets/effect4/error-preservation.good.ts) cover
332
370
  message-only failures, generic rethrows and log-only handlers. The
333
371
  [preservation guide](./skills/oxlint-effect/references/error-preservation.md)
334
- explains recovery ownership and the `catchAll`/`tapError` distinction.
335
- Paired [expected-state failures](./skills/oxlint-effect/assets/expected-state.bad.ts)
336
- and [repairs](./skills/oxlint-effect/assets/expected-state.good.ts) cover ordinary
372
+ explains recovery ownership; use the versioned guide for current `catch` versus
373
+ legacy `catchAll` APIs. Topic guides retain labelled legacy walkthroughs.
374
+ Paired [expected-state failures](./skills/oxlint-effect/assets/effect4/expected-state.bad.ts)
375
+ and [repairs](./skills/oxlint-effect/assets/effect4/expected-state.good.ts) cover ordinary
337
376
  absence, broad null recovery and thrown expected rejection. Their
338
377
  [guide](./skills/oxlint-effect/references/expected-state.md) explains the required
339
378
  caller changes. The corpus now covers all 21 exported DDD rules with representative
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opsydyn/oxlint-effect",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Oxlint plugin rules for Effect TypeScript code shape constraints.",
5
5
  "author": "Alan Currie",
6
6
  "license": "MIT",
@@ -17,7 +17,9 @@ overrides, and lint/typecheck commands. Match guidance to those installed
17
17
  versions. A skill obtained from GitHub may describe exports newer than the
18
18
  consumer package; verify exports before adding them.
19
19
 
20
- This unreleased 2.0 checkout defaults to Effect 4. Published 1.x remains Effect 3.
20
+ Published 2.x defaults to Effect 4. Published 1.x remains Effect 3 and does not
21
+ export the `effect3` namespace; that namespace is available after upgrading the
22
+ plugin to 2.x, without upgrading the consumer's Effect dependency.
21
23
  For every group, consult [versioned rule guidance](references/versioned-rules.md)
22
24
  and the matching pinned consumer's annotated failures, repairs and scope notes.
23
25
  Legacy uses `effect3`; manual sensitive rules default to 4. Do not mix a legacy
@@ -50,6 +52,10 @@ Do not enable every group merely because it is available.
50
52
 
51
53
  ## Diagnose Or Repair Domain Code
52
54
 
55
+ Use the Effect 4 pairs above for current consumers. The links in the following
56
+ legacy walkthrough target Effect 3; substitute their `assets/effect4/`
57
+ counterparts for Effect 4 and consult the versioned guide before adapting APIs.
58
+
53
59
  Read [domain modeling](references/domain-modeling.md) for DDD warnings. Identify
54
60
  the exact rule ID, source span, enabled policy, and surrounding domain contract.
55
61
  Separate what the syntax detector observed from what the application actually
@@ -2,8 +2,9 @@
2
2
 
3
3
  ## Effect Major
4
4
 
5
- In this unreleased 2.0 checkout default groups target Effect 4; published 1.x
6
- remains legacy. Every preset and rules-only companion is available under
5
+ Published 2.x default groups target Effect 4; published 1.x remains legacy and
6
+ does not export `effect3`. Upgrade the plugin to 2.x to select legacy presets
7
+ without upgrading Effect. Every preset and rules-only companion is available under
7
8
  `effect3` for Effect 3. See [all versioned groups](versioned-rules.md) for the
8
9
  matching failure/repair corpus. Verify the installed package before selecting it.
9
10