@opsydyn/oxlint-effect 2.5.0 → 2.6.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 +14 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -299,6 +299,20 @@ backends did not report identical compiler diagnostics with `--type-check`.
|
|
|
299
299
|
Linux and editor integration have not been verified by this project.
|
|
300
300
|
See the [optional packed-consumer check](examples/type-aware-consumer/README.md#optional-tsrs-verification).
|
|
301
301
|
|
|
302
|
+
### Boolean Blindness Opt-In
|
|
303
|
+
|
|
304
|
+
| Rule | Catches | Prefer |
|
|
305
|
+
| --- | --- | --- |
|
|
306
|
+
| `linteffect/no-positional-boolean-literal` | Bare `true` or `false` passed directly to a function, optional call, or constructor. | A named option such as `submit(order, { notify: true })`, a named value, or separate operations for distinct behaviors. |
|
|
307
|
+
|
|
308
|
+
Enable it with `"linteffect/no-positional-boolean-literal": "warn"` in
|
|
309
|
+
your Oxlint `rules` after registering the plugin. It works in JavaScript and
|
|
310
|
+
TypeScript without an Effect import. It is included in both majors'
|
|
311
|
+
`allRules`, but not in `recommended`, `typeAware`, or `ddd`. It does not resolve
|
|
312
|
+
variables, assertions, spread arguments, or other expressions. There is no
|
|
313
|
+
autofix. See the [annotated example](examples/shared/boolean-blindness/positional.bad.ts)
|
|
314
|
+
and [clean alternatives](examples/shared/boolean-blindness/positional.good.ts).
|
|
315
|
+
|
|
302
316
|
### Effect UI Strict Opt-In
|
|
303
317
|
|
|
304
318
|
The next minor release adds the Effect 4-only `effectUiStrict` preset for
|
package/dist/index.d.mts
CHANGED
|
@@ -575,6 +575,7 @@ declare const reactAndRuntimeBoundariesRules: {
|
|
|
575
575
|
}];
|
|
576
576
|
"linteffect/no-raw-domain-id-alias": "error";
|
|
577
577
|
"linteffect/no-boolean-domain-flag": "error";
|
|
578
|
+
"linteffect/no-positional-boolean-literal": "error";
|
|
578
579
|
"linteffect/no-magic-domain-string": "error";
|
|
579
580
|
"linteffect/no-raw-domain-primitive-params": "error";
|
|
580
581
|
"linteffect/no-raw-time-domain-field": "error";
|
|
@@ -3875,6 +3876,7 @@ declare const effect3: {
|
|
|
3875
3876
|
}];
|
|
3876
3877
|
"linteffect/no-raw-domain-id-alias": "error";
|
|
3877
3878
|
"linteffect/no-boolean-domain-flag": "error";
|
|
3879
|
+
"linteffect/no-positional-boolean-literal": "error";
|
|
3878
3880
|
"linteffect/no-magic-domain-string": "error";
|
|
3879
3881
|
"linteffect/no-raw-domain-primitive-params": "error";
|
|
3880
3882
|
"linteffect/no-raw-time-domain-field": "error";
|