@effect/tsgo 0.63.0 → 0.67.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 +35 -10
- package/dist/effect-tsgo.cjs +8919 -3476
- package/lib/oxlint-bridge.cjs +20 -0
- package/oxlint-presets/antipattern.json +1 -0
- package/oxlint-presets/effect-native.json +2 -1
- package/oxlint-presets/index.js +25 -2
- package/oxlint-presets/recommended.json +6 -0
- package/oxlint-presets/strict.json +6 -0
- package/oxlint-presets/style.json +10 -1
- package/oxlint-schema.json +36 -0
- package/package.json +12 -11
- package/schema.json +122 -3
package/README.md
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
# Effect Language Service (TypeScript-Go)
|
|
1
|
+
# Effect Language Service (TSRS, TypeScript-Go and Oxlint)
|
|
2
2
|
|
|
3
|
-
A wrapper
|
|
4
|
-
This project targets **Effect V4** (codename: "smol") primarily and also Effect V3.
|
|
3
|
+
A wrapper for both [TSRS](https://github.com/oxc-project/tsrs) and [TypeScript-Go](https://github.com/microsoft/TypeScript-Go) that builds the Effect Language Service, providing Effect-TS diagnostics and quick fixes.
|
|
5
4
|
|
|
6
5
|
<!-- supported-components:start -->
|
|
7
6
|
## Supported Package Versions
|
|
8
7
|
|
|
9
|
-
The following target package versions are supported by `@effect/tsgo@0.
|
|
8
|
+
The following target package versions are supported by `@effect/tsgo@0.67.0`:
|
|
10
9
|
|
|
11
10
|
| Component | Supported versions |
|
|
12
11
|
|---|---|
|
|
13
|
-
| TypeScript | `7.0.2`, `7.1.0-beta`, `7.1.0-dev.
|
|
14
|
-
| tsrs | `0.
|
|
12
|
+
| TypeScript | `7.0.2`, `7.1.0-beta`, `7.1.0-dev.20261101.1` |
|
|
13
|
+
| tsrs | `0.21.0-ts7.1.0-beta` |
|
|
15
14
|
| Oxlint | `1.88.0`, `1.89.0`, `1.90.0` |
|
|
16
15
|
| oxlint-tsgolint | `7.0.2004`, `7.0.2005` |
|
|
17
16
|
<!-- supported-components:end -->
|
|
18
17
|
|
|
19
18
|
## Installation
|
|
20
19
|
|
|
21
|
-
The setup of the
|
|
20
|
+
The setup of the LSP (both tsgo and tsrs) can be performed via the command line interface:
|
|
22
21
|
|
|
23
22
|
```bash
|
|
24
23
|
# Interactive and guided setup for human friends
|
|
@@ -46,12 +45,18 @@ effect-tsgo tsc@7.0.2 --lsp --stdio # a specific TypeScript version
|
|
|
46
45
|
effect-tsgo tsc@next --build # or an upstream tag: latest, beta, next
|
|
47
46
|
effect-tsgo tsrs --noEmit # the Effect-patched tsrs (tsrs@<version> and tsrs@latest work too)
|
|
48
47
|
effect-tsgo oxlint --type-aware # Oxlint with the Effect rules
|
|
48
|
+
effect-tsgo vp check # vite-plus (vp check, vp lint, vp run ...) with the Effect rules
|
|
49
|
+
effect-tsgo --tsrs-lint oxlint --type-aware # the type-aware rules on tsrs instead of tsgolint (experimental)
|
|
50
|
+
effect-tsgo --tsrs-lint=latest vp lint # with a tsrs version or tag
|
|
49
51
|
```
|
|
50
52
|
|
|
51
53
|
Every argument after the tool is passed through unchanged, so the commands work as drop-in replacements in `package.json` scripts and editor settings that launch `tsc`.
|
|
52
54
|
|
|
53
55
|
- `tsc` and `tsrs` run the requested version or tag; without one they run the build of the installed `typescript`/`@typescript/native` (>= 7) or `tsrs` version when this release ships it, and otherwise the latest supported version. They do not require TypeScript or tsrs to be installed.
|
|
54
56
|
- `oxlint` runs the CLI of the installed `oxlint` package (installed directly or through `vite-plus`) with the Effect-patched native binding and, when `oxlint-tsgolint` is installed, the Effect-patched `tsgolint` of the installed versions. It does not accept a version.
|
|
57
|
+
- `vp` runs the CLI of the installed `vite-plus` package, so that the Oxlint it starts (for `vp check`, `vp lint`, and scripts run through `vp run`) uses the Effect-patched binding and `tsgolint` of the oxlint version vite-plus resolves. It does not accept a version.
|
|
58
|
+
- `--tsrs-lint[=<version|tag>]`, in front of `oxlint` or `vp`, runs Oxlint's type-aware rules, including the Effect ones, on the Effect-patched `tsrs` (`tsrs --lint`, tsrs's port of tsgolint) instead of the patched `tsgolint`; `oxlint-tsgolint` does not need to be installed. The tsrs version is picked as for `effect-tsgo tsrs`: the requested version or tag, else the installed `tsrs` version when this release ships it, else the latest supported one. tsrs does not support tsgolint's Go profiling variables (`OXLINT_TSGOLINT_TRACE`, `OXLINT_TSGOLINT_CPU`, `OXLINT_TSGOLINT_HEAP`, `OXLINT_TSGOLINT_ALLOCS`).
|
|
59
|
+
- `oxlint` and `vp` work under Node.js and Bun: they preload `@effect/tsgo/oxlint-bridge` through `NODE_OPTIONS` and `BUN_OPTIONS`, in front of any options already set there, so every process they start loads the patched Oxlint binding in place of the stock one and every other native addon unchanged.
|
|
55
60
|
- As with `patch`, the packaged `tsrs` and `oxlint` builds do not support Linux musl.
|
|
56
61
|
|
|
57
62
|
Prefer these commands whenever you cannot or do not want to modify `node_modules`; prefer `patch` when other tools must keep launching the stock binaries (for example `npx tsc`, or editor extensions that resolve the TypeScript package). Note that the type augmentation that adds the `effecttsgo` plugin and rules to Oxlint's config types (for `oxlint.config.ts`) is applied only by `patch`.
|
|
@@ -111,6 +116,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
111
116
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/effect-gen-uses-adapter.md"><code>effectGenUsesAdapter</code></a></td><td>Warns when using the deprecated adapter parameter in Effect.gen</td></tr>
|
|
112
117
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/effect-in-failure.md"><code>effectInFailure</code></a></td><td>Warns when an Effect is used inside an Effect failure channel</td></tr>
|
|
113
118
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/effect-in-void-success.md"><code>effectInVoidSuccess</code></a></td><td>Detects nested Effects in void success channels that may cause unexecuted effects</td></tr>
|
|
119
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/effect-try-without-catch.md"><code>effectTryWithoutCatch</code></a></td><td>Reports Effect.try and Effect.tryPromise calls without a catch handler, whose failures surface as a generic unknown error</td></tr>
|
|
114
120
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/global-error-in-effect-catch.md"><code>globalErrorInEffectCatch</code></a></td><td>Warns when catch callbacks return global Error type instead of typed errors</td></tr>
|
|
115
121
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/global-error-in-effect-failure.md"><code>globalErrorInEffectFailure</code></a></td><td>Warns when the global Error type is used in an Effect failure channel</td></tr>
|
|
116
122
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/layer-merge-all-with-dependencies.md"><code>layerMergeAllWithDependencies</code></a></td><td>Detects interdependencies in Layer.mergeAll calls where one layer provides a service that another layer requires</td></tr>
|
|
@@ -129,8 +135,8 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
129
135
|
<tr><td colspan="2"><strong>Effect-native</strong> <em>Prefer Effect-native APIs and abstractions when available.</em></td></tr>
|
|
130
136
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/abort-controller-in-effect.md"><code>abortControllerInEffect</code></a></td><td>Warns when manually constructing AbortController inside Effect generators instead of using Effect.abortSignal</td></tr>
|
|
131
137
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/async-function.md"><code>asyncFunction</code></a></td><td>Warns when declaring async functions and suggests using Effect values and Effect.gen for async control flow</td></tr>
|
|
132
|
-
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/crypto-random-uuid.md"><code>cryptoRandomUUID</code></a></td><td>Warns when using crypto.randomUUID() outside Effect generators instead of
|
|
133
|
-
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/crypto-random-uuid-in-effect.md"><code>cryptoRandomUUIDInEffect</code></a></td><td>Warns when using crypto.randomUUID() inside Effect generators instead of
|
|
138
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/crypto-random-uuid.md"><code>cryptoRandomUUID</code></a></td><td>Warns when using crypto.randomUUID() outside Effect generators instead of SecureRandom from effect/crypto</td></tr>
|
|
139
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/crypto-random-uuid-in-effect.md"><code>cryptoRandomUUIDInEffect</code></a></td><td>Warns when using crypto.randomUUID() inside Effect generators instead of SecureRandom from effect/crypto</td></tr>
|
|
134
140
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/extends-native-error.md"><code>extendsNativeError</code></a></td><td>Warns when a class directly extends the native Error class</td></tr>
|
|
135
141
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/global-console.md"><code>globalConsole</code></a></td><td>Warns when using console methods outside Effect generators instead of Effect.log/Logger</td></tr>
|
|
136
142
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/global-console-in-effect.md"><code>globalConsoleInEffect</code></a></td><td>Warns when using console methods inside Effect generators instead of Effect.log/Logger</td></tr>
|
|
@@ -138,6 +144,8 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
138
144
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/global-date-in-effect.md"><code>globalDateInEffect</code></a></td><td>Warns when using Date.now() or new Date() inside Effect generators instead of Clock/DateTime</td></tr>
|
|
139
145
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/global-fetch.md"><code>globalFetch</code></a></td><td>Warns when using the global fetch function outside Effect generators instead of the Effect HTTP client</td></tr>
|
|
140
146
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/global-fetch-in-effect.md"><code>globalFetchInEffect</code></a></td><td>Warns when using the global fetch function inside Effect generators instead of the Effect HTTP client</td></tr>
|
|
147
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/global-json.md"><code>globalJson</code></a></td><td>Warns when using JSON.parse or JSON.stringify outside Effect generators instead of Effect Schema</td></tr>
|
|
148
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/global-json-in-effect.md"><code>globalJsonInEffect</code></a></td><td>Warns when using JSON.parse or JSON.stringify inside Effect generators instead of Effect Schema</td></tr>
|
|
141
149
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/global-random.md"><code>globalRandom</code></a></td><td>Warns when using Math.random() outside Effect generators instead of the Random service</td></tr>
|
|
142
150
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/global-random-in-effect.md"><code>globalRandomInEffect</code></a></td><td>Warns when using Math.random() inside Effect generators instead of the Random service</td></tr>
|
|
143
151
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/global-timers.md"><code>globalTimers</code></a></td><td>Warns when using setTimeout/setInterval outside Effect generators instead of Effect.sleep/Schedule</td></tr>
|
|
@@ -148,7 +156,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
148
156
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-effect-array.md"><code>preferEffectArray</code></a></td><td>Suggests Effect Array APIs for native array member references, with semantic caveats</td></tr>
|
|
149
157
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-effect-record.md"><code>preferEffectRecord</code></a></td><td>Suggests Effect Record APIs for native Object member references, with semantic caveats</td></tr>
|
|
150
158
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-effect-string.md"><code>preferEffectString</code></a></td><td>Suggests Effect String APIs for native String method invocations, with semantic caveats</td></tr>
|
|
151
|
-
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-schema-over-json.md"><code>preferSchemaOverJson</code></a></td><td>Suggests using Effect Schema for JSON operations instead of JSON.parse/JSON.stringify</td></tr>
|
|
159
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-schema-over-json.md"><code>preferSchemaOverJson</code></a></td><td>Deprecated: use globalJsonInEffect and globalJson instead. Suggests using Effect Schema for JSON operations instead of JSON.parse/JSON.stringify inside Effect code</td></tr>
|
|
152
160
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/process-env.md"><code>processEnv</code></a></td><td>Warns when reading process.env outside Effect generators instead of using Effect Config</td></tr>
|
|
153
161
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/process-env-in-effect.md"><code>processEnvInEffect</code></a></td><td>Warns when reading process.env inside Effect generators instead of using Effect Config</td></tr>
|
|
154
162
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/schema-sync.md"><code>schemaSync</code></a></td><td>Suggests Effect-based Schema decoding and encoding instead of synchronous methods</td></tr>
|
|
@@ -171,6 +179,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
171
179
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/effect-map-flatten.md"><code>effectMapFlatten</code></a></td><td>Suggests using Effect.flatMap instead of Effect.map followed by Effect.flatten in piping flows</td></tr>
|
|
172
180
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/effect-map-void.md"><code>effectMapVoid</code></a></td><td>Suggests using Effect.asVoid instead of Effect.map(() => void 0), Effect.map(() => undefined), or Effect.map(() => {})</td></tr>
|
|
173
181
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/effect-sleep-zero-to-yield-now.md"><code>effectSleepZeroToYieldNow</code></a></td><td>Suggests Effect.yieldNow for cooperative yielding instead of sleeping for zero duration</td></tr>
|
|
182
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/effect-succeed-with-undefined.md"><code>effectSucceedWithUndefined</code></a></td><td>Suggests using Effect.undefined instead of Effect.succeed(undefined) or Effect.succeed(void 0)</td></tr>
|
|
174
183
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/effect-succeed-with-void.md"><code>effectSucceedWithVoid</code></a></td><td>Suggests using Effect.void instead of Effect.succeed(undefined) or Effect.succeed(void 0)</td></tr>
|
|
175
184
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/fail-cause-to-constructor.md"><code>failCauseToConstructor</code></a></td><td>Suggests Effect.fail/die/failSync/dieSync instead of failCause/failCauseSync wrapping a single Cause.fail/die</td></tr>
|
|
176
185
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/flat-map-conditional-to-filter-or-fail.md"><code>flatMapConditionalToFilterOrFail</code></a></td><td>Suggests Effect.filterOrFail or Effect.filterOrElse when Effect.flatMap conditionally passes its input through with Effect.succeed</td></tr>
|
|
@@ -181,9 +190,12 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
181
190
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/manual-metric-tap-to-track.md"><code>manualMetricTapToTrack</code></a></td><td>Suggests Effect.trackSuccesses/trackErrors/trackDefects when an Effect.tap/tapError/tapDefect only updates a metric</td></tr>
|
|
182
191
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/map-const-to-as.md"><code>mapConstToAs</code></a></td><td>Suggests using Effect.as instead of Effect.map when the callback ignores its input and returns a constant</td></tr>
|
|
183
192
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/map-map-error-to-map-both.md"><code>mapMapErrorToMapBoth</code></a></td><td>Suggests Effect.mapBoth when Effect.map and Effect.mapError are adjacent steps of a piping flow</td></tr>
|
|
193
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/map-some-catch-no-such-element.md"><code>mapSomeCatchNoSuchElement</code></a></td><td>Suggests Effect.catchNoSuchElement instead of wrapping successes in Option.some and catching NoSuchElementError into Option.none</td></tr>
|
|
184
194
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/map-some-to-as-some.md"><code>mapSomeToAsSome</code></a></td><td>Suggests using Effect.asSome instead of Effect.map when the mapper only wraps the success value with Option.some</td></tr>
|
|
195
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/match-boolean-to-is-success.md"><code>matchBooleanToIsSuccess</code></a></td><td>Suggests Effect.isSuccess or Effect.isFailure when Effect.match or Effect.matchEager folds to complementary boolean literals</td></tr>
|
|
185
196
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/match-effect-to-map-both.md"><code>matchEffectToMapBoth</code></a></td><td>Suggests Effect.mapBoth when Effect.matchEffect only transforms the failure and success channels</td></tr>
|
|
186
197
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/match-effect-to-match.md"><code>matchEffectToMatch</code></a></td><td>Suggests Effect.match or Effect.matchCause when both Effect.matchEffect handlers only return Effect.succeed</td></tr>
|
|
198
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/match-to-result-or-option.md"><code>matchToResultOrOption</code></a></td><td>Suggests Effect.result, Effect.option or Effect.either when match handlers, or a map step followed by a catch step, only reify the outcome</td></tr>
|
|
187
199
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/missed-pipeable-opportunity.md"><code>missedPipeableOpportunity</code></a></td><td>Suggests using .pipe() for nested function calls</td></tr>
|
|
188
200
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/missing-effect-service-dependency.md"><code>missingEffectServiceDependency</code></a></td><td>Checks that Effect.Service dependencies satisfy all required layer inputs</td></tr>
|
|
189
201
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/missing-pipeable-signature.md"><code>missingPipeableSignature</code></a></td><td>Reports exported fixed-arity functions whose call signatures have no corresponding pipeable overload</td></tr>
|
|
@@ -198,24 +210,29 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
198
210
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-succeed-some-or-none.md"><code>preferSucceedSomeOrNone</code></a></td><td>Suggests using Effect.succeedNone or Effect.succeedSome instead of wrapping Option.none or Option.some with Effect.succeed</td></tr>
|
|
199
211
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-typed-schema-decoder.md"><code>preferTypedSchemaDecoder</code></a></td><td>Suggests typed Schema decoders when the input is assignable to the schema's Encoded type</td></tr>
|
|
200
212
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/provide-layer-succeed-to-provide-service.md"><code>provideLayerSucceedToProvideService</code></a></td><td>Suggests providing inline Layer.succeed and Layer.effect services directly</td></tr>
|
|
213
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/provide-merge-all-to-array.md"><code>provideMergeAllToArray</code></a></td><td>Suggests passing an array of layers to Effect.provide instead of wrapping them in Layer.mergeAll</td></tr>
|
|
201
214
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/race-first-with-sleep-to-timeout.md"><code>raceFirstWithSleepToTimeout</code></a></td><td>Suggests Effect.timeoutOrElse when Effect.raceFirst has exactly one sleep- or delay-based timer arm</td></tr>
|
|
202
215
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/redundant-map-error.md"><code>redundantMapError</code></a></td><td>Suggests hoisting a repeated trailing Effect.mapError from every yield in an Effect generator</td></tr>
|
|
203
216
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/redundant-or-die.md"><code>redundantOrDie</code></a></td><td>Suggests hoisting a repeated trailing Effect.orDie from every yield in an Effect generator</td></tr>
|
|
204
217
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/redundant-schema-tag-identifier.md"><code>redundantSchemaTagIdentifier</code></a></td><td>Suggests removing redundant identifier argument when it equals the tag value in Schema.TaggedClass/TaggedError/TaggedRequest</td></tr>
|
|
218
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/result-match-to-from-result.md"><code>resultMatchToFromResult</code></a></td><td>Suggests Effect.fromResult when Result.match or a Result guard conditional only converts Success to Effect.succeed and Failure to Effect.fail</td></tr>
|
|
205
219
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/run-of-exit-to-run-exit.md"><code>runOfExitToRunExit</code></a></td><td>Suggests using Effect.runPromiseExit instead of passing Effect.exit to Effect.runPromise</td></tr>
|
|
206
220
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/schema-number.md"><code>schemaNumber</code></a></td><td>Suggests Schema.Finite and Schema.FiniteFromString instead of Schema.Number APIs when describing domain numbers</td></tr>
|
|
207
221
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/schema-struct-with-tag.md"><code>schemaStructWithTag</code></a></td><td>Suggests using Schema.TaggedStruct instead of Schema.Struct with _tag field</td></tr>
|
|
208
222
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/schema-union-of-literals.md"><code>schemaUnionOfLiterals</code></a></td><td>Suggests combining multiple Schema.Literal calls in Schema.Union into a single Schema.Literal</td></tr>
|
|
209
223
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/service-not-as-class.md"><code>serviceNotAsClass</code></a></td><td>Warns when Context.Service is used as a variable instead of a class declaration</td></tr>
|
|
210
224
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/strict-boolean-expressions.md"><code>strictBooleanExpressions</code></a></td><td>Enforces boolean types in conditional expressions for type safety</td></tr>
|
|
225
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/suspend-fail-to-fail-sync.md"><code>suspendFailToFailSync</code></a></td><td>Suggests Effect.failSync/dieSync instead of Effect.suspend wrapping a single Effect.fail/die</td></tr>
|
|
211
226
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/sync-to-succeed.md"><code>syncToSucceed</code></a></td><td>Suggests using Effect.succeed instead of Effect.sync when the thunk returns a constant value</td></tr>
|
|
212
227
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/timeout-catch-tag-to-timeout-or-else.md"><code>timeoutCatchTagToTimeoutOrElse</code></a></td><td>Suggests dedicated timeout combinators instead of catching TimeoutError immediately after Effect.timeout</td></tr>
|
|
228
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/type-union-to-schema-union.md"><code>typeUnionToSchemaUnion</code></a></td><td>Suggests composing unions of Schema .Type/.Encoded types with Schema.Union and deriving the type from it</td></tr>
|
|
213
229
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/unnecessary-arrow-block.md"><code>unnecessaryArrowBlock</code></a></td><td>Suggests using a concise arrow body when the block only returns an expression</td></tr>
|
|
214
230
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/unnecessary-effect-gen.md"><code>unnecessaryEffectGen</code></a></td><td>Suggests removing Effect.gen when it contains only a single return statement</td></tr>
|
|
215
231
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/unnecessary-fail-yieldable-error.md"><code>unnecessaryFailYieldableError</code></a></td><td>Suggests yielding yieldable errors directly instead of wrapping with Effect.fail</td></tr>
|
|
216
232
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/unnecessary-pipe.md"><code>unnecessaryPipe</code></a></td><td>Removes pipe calls with no arguments</td></tr>
|
|
217
233
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/unnecessary-pipe-chain.md"><code>unnecessaryPipeChain</code></a></td><td>Simplifies chained pipe calls into a single pipe call</td></tr>
|
|
218
234
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/unnecessary-typeof-type.md"><code>unnecessaryTypeofType</code></a></td><td>Suggests replacing typeof Schema.Type style annotations with the matching named type when available</td></tr>
|
|
235
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/yield-in-call-argument.md"><code>yieldInCallArgument</code></a></td><td>Suggests yielding into a const before a call instead of passing a yield* directly as a call or new argument in Effect generators</td></tr>
|
|
219
236
|
<tr><td colspan="2"><strong>Maintainers</strong> <em>Guard the public API surface and release hygiene of a package.</em></td></tr>
|
|
220
237
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/api-stability-leak.md"><code>apiStabilityLeak</code></a></td><td>Reports exported APIs whose public surface exposes a less stable type</td></tr>
|
|
221
238
|
</tbody>
|
|
@@ -361,6 +378,14 @@ The npm compiler binaries load their TypeScript standard libraries from `lib.*.d
|
|
|
361
378
|
"effectFn": [
|
|
362
379
|
"span"
|
|
363
380
|
],
|
|
381
|
+
// Schema class kinds that get a nominal brand, used by schemaClassMissingBrand and the Schema class completions. (default: ["Class","TaggedClass","Error","TaggedError","Opaque"])
|
|
382
|
+
"brandedSchemaClasses": [
|
|
383
|
+
"Class",
|
|
384
|
+
"TaggedClass",
|
|
385
|
+
"Error",
|
|
386
|
+
"TaggedError",
|
|
387
|
+
"Opaque"
|
|
388
|
+
],
|
|
364
389
|
// Maps rule names to severity levels. Use {} to enable diagnostics with rule defaults. (default: {})
|
|
365
390
|
"diagnosticSeverity": {},
|
|
366
391
|
// Ordered per-file diagnostic option overrides. (default: [{"include":["src/**/*.ts"],"options":{"diagnosticSeverity":{"floatingEffect":"error"}}}])
|