@effect/tsgo 0.0.16 → 0.0.17
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 +179 -0
- package/bin/effect-tsgo.js +19 -2
- package/package.json +11 -10
package/README.md
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# Effect Language Service (TypeScript-Go)
|
|
2
|
+
|
|
3
|
+
A wrapper around [TypeScript-Go](https://github.com/nicolo-ribaudo/TypeScript-Go) that builds the Effect Language Service, providing Effect-TS diagnostics and quick fixes.
|
|
4
|
+
This project targets **Effect V4** (codename: "smol") primarily and also Effect V3.
|
|
5
|
+
|
|
6
|
+
## Currently in Alpha
|
|
7
|
+
The TypeScript-Go version of the Effect LSP should be considered in Alpha. Expect breaking changes between releases and some missing features compared to previous version.
|
|
8
|
+
Some of them are currently on hold due to not yet complete pipeline on the upstream TypeScript repository.
|
|
9
|
+
|
|
10
|
+
## Diagnostic Status
|
|
11
|
+
|
|
12
|
+
Some diagnostics are off by default or have a default severity of suggestion, but you can always enable them or change their default severity in the plugin options.
|
|
13
|
+
|
|
14
|
+
<!-- diagnostics-table:start -->
|
|
15
|
+
<table>
|
|
16
|
+
<thead>
|
|
17
|
+
<tr><th>Diagnostic</th><th>Sev</th><th>Fix</th><th>Description</th><th>v3</th><th>v4</th></tr>
|
|
18
|
+
</thead>
|
|
19
|
+
<tbody>
|
|
20
|
+
<tr><td colspan="6"><strong>Correctness</strong> <em>Wrong, unsafe, or structurally invalid code patterns.</em></td></tr>
|
|
21
|
+
<tr><td><code>anyUnknownInErrorContext</code></td><td>➖</td><td></td><td>Detects 'any' or 'unknown' types in Effect error or requirements channels</td><td>✓</td><td>✓</td></tr>
|
|
22
|
+
<tr><td><code>classSelfMismatch</code></td><td>❌</td><td>🔧</td><td>Ensures Self type parameter matches the class name in ServiceMap/Service/Tag/Schema classes</td><td>✓</td><td>✓</td></tr>
|
|
23
|
+
<tr><td><code>duplicatePackage</code></td><td>⚠️</td><td></td><td>Warns when multiple versions of an Effect-related package are detected in the program</td><td>✓</td><td>✓</td></tr>
|
|
24
|
+
<tr><td><code>floatingEffect</code></td><td>❌</td><td></td><td>Detects Effect values that are neither yielded nor assigned</td><td>✓</td><td>✓</td></tr>
|
|
25
|
+
<tr><td><code>genericEffectServices</code></td><td>⚠️</td><td></td><td>Prevents services with type parameters that cannot be discriminated at runtime</td><td>✓</td><td>✓</td></tr>
|
|
26
|
+
<tr><td><code>missingEffectContext</code></td><td>❌</td><td></td><td>Detects Effect values with unhandled context requirements</td><td>✓</td><td>✓</td></tr>
|
|
27
|
+
<tr><td><code>missingEffectError</code></td><td>❌</td><td>🔧</td><td>Detects Effect values with unhandled error types</td><td>✓</td><td>✓</td></tr>
|
|
28
|
+
<tr><td><code>missingLayerContext</code></td><td>❌</td><td></td><td>Detects Layer values with unhandled context requirements</td><td>✓</td><td>✓</td></tr>
|
|
29
|
+
<tr><td><code>missingReturnYieldStar</code></td><td>❌</td><td>🔧</td><td>Suggests using return yield* for Effects that never succeed</td><td>✓</td><td>✓</td></tr>
|
|
30
|
+
<tr><td><code>missingStarInYieldEffectGen</code></td><td>❌</td><td>🔧</td><td>Detects bare yield (without *) inside Effect generator scopes</td><td>✓</td><td>✓</td></tr>
|
|
31
|
+
<tr><td><code>nonObjectEffectServiceType</code></td><td>❌</td><td></td><td>Ensures Effect.Service types are objects, not primitives</td><td>✓</td><td></td></tr>
|
|
32
|
+
<tr><td><code>outdatedApi</code></td><td>⚠️</td><td></td><td>Detects usage of APIs that have been removed or renamed in Effect v4</td><td></td><td>✓</td></tr>
|
|
33
|
+
<tr><td><code>overriddenSchemaConstructor</code></td><td>❌</td><td>🔧</td><td>Prevents overriding constructors in Schema classes which breaks decoding behavior</td><td>✓</td><td>✓</td></tr>
|
|
34
|
+
<tr><td colspan="6"><strong>Anti-pattern</strong> <em>Discouraged patterns that often lead to bugs or confusing behavior.</em></td></tr>
|
|
35
|
+
<tr><td><code>catchUnfailableEffect</code></td><td>💡</td><td></td><td>Warns when using error handling on Effects that never fail</td><td>✓</td><td>✓</td></tr>
|
|
36
|
+
<tr><td><code>effectFnIife</code></td><td>⚠️</td><td>🔧</td><td>Effect.fn or Effect.fnUntraced is called as an IIFE; use Effect.gen instead</td><td>✓</td><td>✓</td></tr>
|
|
37
|
+
<tr><td><code>effectGenUsesAdapter</code></td><td>⚠️</td><td></td><td>Warns when using the deprecated adapter parameter in Effect.gen</td><td>✓</td><td>✓</td></tr>
|
|
38
|
+
<tr><td><code>effectInFailure</code></td><td>⚠️</td><td></td><td>Warns when an Effect is used inside an Effect failure channel</td><td>✓</td><td>✓</td></tr>
|
|
39
|
+
<tr><td><code>effectInVoidSuccess</code></td><td>⚠️</td><td></td><td>Detects nested Effects in void success channels that may cause unexecuted effects</td><td>✓</td><td>✓</td></tr>
|
|
40
|
+
<tr><td><code>globalErrorInEffectCatch</code></td><td>⚠️</td><td></td><td>Warns when catch callbacks return global Error type instead of typed errors</td><td>✓</td><td>✓</td></tr>
|
|
41
|
+
<tr><td><code>globalErrorInEffectFailure</code></td><td>⚠️</td><td></td><td>Warns when the global Error type is used in an Effect failure channel</td><td>✓</td><td>✓</td></tr>
|
|
42
|
+
<tr><td><code>layerMergeAllWithDependencies</code></td><td>⚠️</td><td>🔧</td><td>Detects interdependencies in Layer.mergeAll calls where one layer provides a service that another layer requires</td><td>✓</td><td>✓</td></tr>
|
|
43
|
+
<tr><td><code>leakingRequirements</code></td><td>💡</td><td></td><td>Detects implementation services leaked in service methods</td><td>✓</td><td>✓</td></tr>
|
|
44
|
+
<tr><td><code>multipleEffectProvide</code></td><td>⚠️</td><td>🔧</td><td>Warns against chaining Effect.provide calls which can cause service lifecycle issues</td><td>✓</td><td>✓</td></tr>
|
|
45
|
+
<tr><td><code>returnEffectInGen</code></td><td>💡</td><td>🔧</td><td>Warns when returning an Effect in a generator causes nested Effect<Effect<...>></td><td>✓</td><td>✓</td></tr>
|
|
46
|
+
<tr><td><code>runEffectInsideEffect</code></td><td>💡</td><td>🔧</td><td>Suggests using Runtime methods instead of Effect.run* inside Effect contexts</td><td>✓</td><td></td></tr>
|
|
47
|
+
<tr><td><code>schemaSyncInEffect</code></td><td>💡</td><td></td><td>Suggests using Effect-based Schema methods instead of sync methods inside Effect generators</td><td>✓</td><td></td></tr>
|
|
48
|
+
<tr><td><code>scopeInLayerEffect</code></td><td>⚠️</td><td>🔧</td><td>Suggests using Layer.scoped instead of Layer.effect when Scope is in requirements</td><td>✓</td><td></td></tr>
|
|
49
|
+
<tr><td><code>strictEffectProvide</code></td><td>➖</td><td></td><td>Warns when using Effect.provide with layers outside of application entry points</td><td>✓</td><td>✓</td></tr>
|
|
50
|
+
<tr><td><code>tryCatchInEffectGen</code></td><td>💡</td><td></td><td>Discourages try/catch in Effect generators in favor of Effect error handling</td><td>✓</td><td>✓</td></tr>
|
|
51
|
+
<tr><td><code>unknownInEffectCatch</code></td><td>⚠️</td><td></td><td>Warns when catch callbacks return unknown instead of typed errors</td><td>✓</td><td>✓</td></tr>
|
|
52
|
+
<tr><td colspan="6"><strong>Effect-native</strong> <em>Prefer Effect-native APIs and abstractions when available.</em></td></tr>
|
|
53
|
+
<tr><td><code>extendsNativeError</code></td><td>➖</td><td></td><td>Warns when a class directly extends the native Error class</td><td>✓</td><td>✓</td></tr>
|
|
54
|
+
<tr><td><code>globalFetch</code></td><td>➖</td><td></td><td>Warns when using the global fetch function instead of the Effect HTTP client</td><td>✓</td><td>✓</td></tr>
|
|
55
|
+
<tr><td><code>instanceOfSchema</code></td><td>➖</td><td>🔧</td><td>Suggests using Schema.is instead of instanceof for Effect Schema types</td><td>✓</td><td>✓</td></tr>
|
|
56
|
+
<tr><td><code>nodeBuiltinImport</code></td><td>➖</td><td></td><td>Warns when importing Node.js built-in modules that have Effect-native counterparts</td><td>✓</td><td>✓</td></tr>
|
|
57
|
+
<tr><td><code>preferSchemaOverJson</code></td><td>💡</td><td></td><td>Suggests using Effect Schema for JSON operations instead of JSON.parse/JSON.stringify</td><td>✓</td><td>✓</td></tr>
|
|
58
|
+
<tr><td colspan="6"><strong>Style</strong> <em>Cleanup, consistency, and idiomatic Effect code.</em></td></tr>
|
|
59
|
+
<tr><td><code>catchAllToMapError</code></td><td>💡</td><td>🔧</td><td>Suggests using Effect.mapError instead of Effect.catch + Effect.fail</td><td>✓</td><td>✓</td></tr>
|
|
60
|
+
<tr><td><code>deterministicKeys</code></td><td>➖</td><td>🔧</td><td>Enforces deterministic naming for service/tag/error identifiers based on class names</td><td>✓</td><td>✓</td></tr>
|
|
61
|
+
<tr><td><code>effectFnOpportunity</code></td><td>💡</td><td>🔧</td><td>Suggests using Effect.fn for functions that return an Effect</td><td>✓</td><td>✓</td></tr>
|
|
62
|
+
<tr><td><code>effectMapVoid</code></td><td>💡</td><td>🔧</td><td>Suggests using Effect.asVoid instead of Effect.map(() => void 0), Effect.map(() => undefined), or Effect.map(() => {})</td><td>✓</td><td>✓</td></tr>
|
|
63
|
+
<tr><td><code>effectSucceedWithVoid</code></td><td>💡</td><td>🔧</td><td>Suggests using Effect.void instead of Effect.succeed(undefined) or Effect.succeed(void 0)</td><td>✓</td><td>✓</td></tr>
|
|
64
|
+
<tr><td><code>missedPipeableOpportunity</code></td><td>➖</td><td>🔧</td><td>Suggests using .pipe() for nested function calls</td><td>✓</td><td>✓</td></tr>
|
|
65
|
+
<tr><td><code>missingEffectServiceDependency</code></td><td>➖</td><td></td><td>Checks that Effect.Service dependencies satisfy all required layer inputs</td><td>✓</td><td></td></tr>
|
|
66
|
+
<tr><td><code>redundantSchemaTagIdentifier</code></td><td>💡</td><td>🔧</td><td>Suggests removing redundant identifier argument when it equals the tag value in Schema.TaggedClass/TaggedError/TaggedRequest</td><td>✓</td><td>✓</td></tr>
|
|
67
|
+
<tr><td><code>schemaStructWithTag</code></td><td>💡</td><td>🔧</td><td>Suggests using Schema.TaggedStruct instead of Schema.Struct with _tag field</td><td>✓</td><td>✓</td></tr>
|
|
68
|
+
<tr><td><code>schemaUnionOfLiterals</code></td><td>➖</td><td>🔧</td><td>Suggests combining multiple Schema.Literal calls in Schema.Union into a single Schema.Literal</td><td>✓</td><td></td></tr>
|
|
69
|
+
<tr><td><code>serviceNotAsClass</code></td><td>➖</td><td>🔧</td><td>Warns when ServiceMap.Service is used as a variable instead of a class declaration</td><td></td><td>✓</td></tr>
|
|
70
|
+
<tr><td><code>strictBooleanExpressions</code></td><td>➖</td><td></td><td>Enforces boolean types in conditional expressions for type safety</td><td>✓</td><td>✓</td></tr>
|
|
71
|
+
<tr><td><code>unnecessaryEffectGen</code></td><td>💡</td><td>🔧</td><td>Suggests removing Effect.gen when it contains only a single return statement</td><td>✓</td><td>✓</td></tr>
|
|
72
|
+
<tr><td><code>unnecessaryFailYieldableError</code></td><td>💡</td><td>🔧</td><td>Suggests yielding yieldable errors directly instead of wrapping with Effect.fail</td><td>✓</td><td>✓</td></tr>
|
|
73
|
+
<tr><td><code>unnecessaryPipe</code></td><td>💡</td><td>🔧</td><td>Removes pipe calls with no arguments</td><td>✓</td><td>✓</td></tr>
|
|
74
|
+
<tr><td><code>unnecessaryPipeChain</code></td><td>💡</td><td>🔧</td><td>Simplifies chained pipe calls into a single pipe call</td><td>✓</td><td>✓</td></tr>
|
|
75
|
+
</tbody>
|
|
76
|
+
</table>
|
|
77
|
+
|
|
78
|
+
`➖` off by default, `❌` error, `⚠️` warning, `💬` message, `💡` suggestion, `🔧` quick fix available
|
|
79
|
+
<!-- diagnostics-table:end -->
|
|
80
|
+
|
|
81
|
+
## Refactor Status
|
|
82
|
+
|
|
83
|
+
| Refactor | V3 | V4 | Notes |
|
|
84
|
+
|----------|----|----|-------|
|
|
85
|
+
| `asyncAwaitToFn` | ✅ | ✅ | Convert async/await to Effect.fn |
|
|
86
|
+
| `asyncAwaitToFnTryPromise` | ✅ | ✅ | Convert async/await to Effect.fn with Error ADT + tryPromise |
|
|
87
|
+
| `asyncAwaitToGen` | ✅ | ✅ | Convert async/await to Effect.gen |
|
|
88
|
+
| `asyncAwaitToGenTryPromise` | ✅ | ✅ | Convert async/await to Effect.gen with Error ADT + tryPromise |
|
|
89
|
+
| `debugPerformance` | ❌ | ❌ | Insert performance timing debug comments |
|
|
90
|
+
| `effectGenToFn` | ✅ | ✅ | Convert Effect.gen to Effect.fn |
|
|
91
|
+
| `functionToArrow` | ✅ | ✅ | Convert function declaration to arrow function |
|
|
92
|
+
| `layerMagic` | ✅ | ✅ | Auto-compose layers with correct merge/provide |
|
|
93
|
+
| `makeSchemaOpaque` | ✅ | ✅ | Convert Schema to opaque type aliases |
|
|
94
|
+
| `makeSchemaOpaqueWithNs` | ✅ | ✅ | Convert Schema to opaque types with namespace |
|
|
95
|
+
| `pipeableToDatafirst` | ✅ | ✅ | Convert pipeable calls to data-first style |
|
|
96
|
+
| `removeUnnecessaryEffectGen` | ✅ | ✅ | Remove redundant Effect.gen wrapper |
|
|
97
|
+
| `structuralTypeToSchema` | ✅ | ✅ | Generate recursive Schema from type alias |
|
|
98
|
+
| `toggleLazyConst` | ✅ | ✅ | Toggle lazy/eager const declarations |
|
|
99
|
+
| `togglePipeStyle` | ✅ | ✅ | Toggle pipe(x, f) vs x.pipe(f) |
|
|
100
|
+
| `toggleReturnTypeAnnotation` | ✅ | ✅ | Add/remove return type annotation |
|
|
101
|
+
| `toggleTypeAnnotation` | ✅ | ✅ | Add/remove variable type annotation |
|
|
102
|
+
| `typeToEffectSchema` | ✅ | ✅ | Generate Effect.Schema from type alias |
|
|
103
|
+
| `typeToEffectSchemaClass` | ✅ | ✅ | Generate Schema.Class from type alias |
|
|
104
|
+
| `wrapWithEffectGen` | ✅ | ✅ | Wrap expression in Effect.gen |
|
|
105
|
+
| `wrapWithPipe` | ❌ | ✅ | Wrap selection in pipe(...) |
|
|
106
|
+
| `writeTagClassAccessors` | ✅ | ➖ | Generate static accessors for Effect.Service/Tag classes |
|
|
107
|
+
|
|
108
|
+
### Completion Status
|
|
109
|
+
|
|
110
|
+
| Completion | V3 | V4 | Notes |
|
|
111
|
+
|------------|----|----|-------|
|
|
112
|
+
| `contextSelfInClasses` | ✅ | ➖ | Context.Tag self-type snippets in extends clauses (V3-only) |
|
|
113
|
+
| `effectDataClasses` | ✅ | ✅ | Data class constructor snippets in extends clauses |
|
|
114
|
+
| `effectSchemaSelfInClasses` | ✅ | ✅ | Schema/Model class constructor snippets in extends clauses |
|
|
115
|
+
| `effectSelfInClasses` | ✅ | ➖ | Effect.Service/Effect.Tag self-type snippets in extends clauses (V3-only) |
|
|
116
|
+
| `genFunctionStar` | ✅ | ✅ | `gen(function*(){})` snippet when dot-accessing `.gen` on objects with callable gen property |
|
|
117
|
+
| `effectCodegensComment` | ✅ | ✅ | `@effect-codegens` directive snippet in comments with codegen name choices |
|
|
118
|
+
| `effectDiagnosticsComment` | ✅ | ✅ | `@effect-diagnostics` / `@effect-diagnostics-next-line` directive snippets in comments |
|
|
119
|
+
| `rpcMakeClasses` | ✅ | ➖ | `Rpc.make` constructor snippet in extends clauses (V3-only) |
|
|
120
|
+
| `schemaBrand` | ✅ | ➖ | `brand("varName")` snippet when dot-accessing Schema in variable declarations (V3-only) |
|
|
121
|
+
| `serviceMapSelfInClasses` | ✅ | ✅ | Service map self-type snippets in extends clauses |
|
|
122
|
+
|
|
123
|
+
### Codegen Status
|
|
124
|
+
|
|
125
|
+
| Codegen | V3 | V4 | Notes |
|
|
126
|
+
|---------|----|----|-------|
|
|
127
|
+
| `accessors` | ❌ | ❌ | Generate Service accessor methods from comment directive |
|
|
128
|
+
| `annotate` | ❌ | ❌ | Generate type annotations from comment directive |
|
|
129
|
+
| `typeToSchema` | ❌ | ❌ | Generate Schema from type alias comment directive |
|
|
130
|
+
|
|
131
|
+
### Rename Status
|
|
132
|
+
|
|
133
|
+
| Rename | V3 | V4 | Notes |
|
|
134
|
+
|--------|----|----|-------|
|
|
135
|
+
| `keyStrings` | ❌ | ❌ | Extend rename to include key string literals in Effect classes |
|
|
136
|
+
|
|
137
|
+
## Best Practices
|
|
138
|
+
|
|
139
|
+
### Relationship to Official TypeScript-Go (`tsgo`)
|
|
140
|
+
|
|
141
|
+
Effect-tsgo is a **superset** of the official [TypeScript-Go](https://github.com/nicolo-ribaudo/TypeScript-Go) — it embeds a pinned version of `tsgo` with a small patch set on top and adds the Effect language service. This means `effect-tsgo` provides all standard TypeScript-Go functionality plus Effect-specific diagnostics, quick fixes, and refactors.
|
|
142
|
+
|
|
143
|
+
**Use `effect-tsgo` instead of `tsgo`, not alongside it.** Running both in parallel will produce duplicate diagnostics and degrade editor performance. Configure your editor to use `effect-tsgo` as your sole TypeScript language server.
|
|
144
|
+
|
|
145
|
+
### Version Pinning
|
|
146
|
+
|
|
147
|
+
Each release of `effect-tsgo` is built against a specific upstream `tsgo` commit. The pinned commit is recorded in `flake.nix` (`typescript-go-src`). When upstream `tsgo` releases new features or fixes, `effect-tsgo` will adopt them in a subsequent release after validating compatibility with the Effect diagnostics layer.
|
|
148
|
+
|
|
149
|
+
### When to Upgrade
|
|
150
|
+
|
|
151
|
+
- Upgrade `effect-tsgo` when a new release includes upstream `tsgo` fixes you need or new Effect diagnostics you want.
|
|
152
|
+
- There is no need to track upstream `tsgo` releases separately — `effect-tsgo` is the single binary to manage.
|
|
153
|
+
|
|
154
|
+
## Plugin Options
|
|
155
|
+
|
|
156
|
+
These options are configured in `tsconfig.json` under `compilerOptions.plugins` for the `@effect/language-service` plugin entry.
|
|
157
|
+
|
|
158
|
+
| Option | Type | Default | Description |
|
|
159
|
+
|--------|------|---------|-------------|
|
|
160
|
+
| `diagnosticSeverity` | `Record<string, Severity>` | (all defaults) | Maps rule names to severity levels. Set to `{}` to enable diagnostics with defaults. |
|
|
161
|
+
| `ignoreEffectSuggestionsInTscExitCode` | `boolean` | `true` | When true, Effect suggestion/message-category diagnostics do not affect the tsc exit code. |
|
|
162
|
+
| `ignoreEffectWarningsInTscExitCode` | `boolean` | `false` | When true, Effect warning-category diagnostics do not affect the tsc exit code. |
|
|
163
|
+
| `ignoreEffectErrorsInTscExitCode` | `boolean` | `false` | When true, Effect error-category diagnostics do not affect the tsc exit code. |
|
|
164
|
+
| `includeSuggestionsInTsc` | `boolean` | `true` | When false, suggestion-level Effect diagnostics are omitted from tsc CLI output. LSP and other flows are unaffected. |
|
|
165
|
+
| `skipDisabledOptimization` | `boolean` | `false` | When true, disabled diagnostics are still processed so per-line or per-section directive overrides can enable them. |
|
|
166
|
+
| `keyPatterns` | `KeyPattern[]` | (see defaults) | Configures key pattern formulas for the `deterministicKeys` rule. |
|
|
167
|
+
| `extendedKeyDetection` | `boolean` | `false` | Enables matching constructors with `@effect-identifier` annotations. |
|
|
168
|
+
| `pipeableMinArgCount` | `number` | `2` | Minimum number of contiguous pipeable transformations to trigger `missedPipeableOpportunity`. |
|
|
169
|
+
| `mermaidProvider` | `string` | `"mermaid.live"` | Mermaid rendering service for Layer hover links. Accepted values: `"mermaid.live"`, `"mermaid.com"`, or a custom URL. |
|
|
170
|
+
| `noExternal` | `boolean` | `false` | When true, suppresses external links (Mermaid diagram URLs) in hover output. |
|
|
171
|
+
| `inlays` | `boolean` | `false` | When true, suppresses redundant return-type inlay hints on `Effect.gen`, `Effect.fn`, and `Effect.fnUntraced` generator functions. |
|
|
172
|
+
| `allowedDuplicatedPackages` | `string[]` | `[]` | Package names allowed to have multiple versions without triggering the `duplicatePackage` diagnostic. |
|
|
173
|
+
| `layerGraphFollowDepth` | `number` | `0` | How many levels deep the layer graph extraction follows symbol references. |
|
|
174
|
+
| `namespaceImportPackages` | `string[]` | `[]` | Package names that should prefer namespace imports. Package matching is case-insensitive. |
|
|
175
|
+
| `barrelImportPackages` | `string[]` | `[]` | Package names that should prefer barrel named imports. Package matching is case-insensitive. |
|
|
176
|
+
| `importAliases` | `Record<string, string>` | `{}` | Package-level import aliases keyed by package name. Alias keys are case-insensitive package matches. |
|
|
177
|
+
| `topLevelNamedReexports` | `"ignore" \| "follow"` | `"ignore"` | Controls whether named reexports are followed at package top-level. Accepted values are case-insensitive; invalid values fall back to `"ignore"`. |
|
|
178
|
+
|
|
179
|
+
For the four auto-import style options above (`namespaceImportPackages`, `barrelImportPackages`, `importAliases`, `topLevelNamedReexports`), package-name matching is case-insensitive, and invalid option types/values fall back to defaults.
|
package/bin/effect-tsgo.js
CHANGED
|
@@ -195732,7 +195732,7 @@ var FileReadError = class extends TaggedError("FileReadError") {
|
|
|
195732
195732
|
//#endregion
|
|
195733
195733
|
//#region package.json
|
|
195734
195734
|
var name = "@effect/tsgo";
|
|
195735
|
-
var version = "0.0.
|
|
195735
|
+
var version = "0.0.17";
|
|
195736
195736
|
|
|
195737
195737
|
//#endregion
|
|
195738
195738
|
//#region src/setup/consts.ts
|
|
@@ -196512,7 +196512,7 @@ var rules = [
|
|
|
196512
196512
|
{
|
|
196513
196513
|
"name": "classSelfMismatch",
|
|
196514
196514
|
"group": "correctness",
|
|
196515
|
-
"description": "Ensures Self type parameter matches the class name in Service/Tag/Schema classes",
|
|
196515
|
+
"description": "Ensures Self type parameter matches the class name in ServiceMap/Service/Tag/Schema classes",
|
|
196516
196516
|
"defaultSeverity": "error",
|
|
196517
196517
|
"fixable": true,
|
|
196518
196518
|
"supportedEffect": ["v3", "v4"],
|
|
@@ -197023,6 +197023,23 @@ var rules = [
|
|
|
197023
197023
|
}]
|
|
197024
197024
|
}
|
|
197025
197025
|
},
|
|
197026
|
+
{
|
|
197027
|
+
"name": "globalFetch",
|
|
197028
|
+
"group": "effectNative",
|
|
197029
|
+
"description": "Warns when using the global fetch function instead of the Effect HTTP client",
|
|
197030
|
+
"defaultSeverity": "off",
|
|
197031
|
+
"fixable": false,
|
|
197032
|
+
"supportedEffect": ["v3", "v4"],
|
|
197033
|
+
"codes": [377061],
|
|
197034
|
+
"preview": {
|
|
197035
|
+
"sourceText": "\nimport { Effect } from \"effect\"\n\nvoid Effect\n\nexport const preview = fetch(\"https://example.com\")\n",
|
|
197036
|
+
"diagnostics": [{
|
|
197037
|
+
"start": 70,
|
|
197038
|
+
"end": 75,
|
|
197039
|
+
"text": "Prefer using HttpClient from effect/unstable/http instead of the global 'fetch' function. effect(globalFetch)"
|
|
197040
|
+
}]
|
|
197041
|
+
}
|
|
197042
|
+
},
|
|
197026
197043
|
{
|
|
197027
197044
|
"name": "instanceOfSchema",
|
|
197028
197045
|
"group": "effectNative",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/tsgo",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -18,16 +18,17 @@
|
|
|
18
18
|
"effect-tsgo": "./bin/effect-tsgo.js"
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
|
-
"bin/"
|
|
21
|
+
"bin/",
|
|
22
|
+
"README.md"
|
|
22
23
|
],
|
|
23
24
|
"optionalDependencies": {
|
|
24
|
-
"@effect/tsgo-win32-x64": "0.0.
|
|
25
|
-
"@effect/tsgo-win32-arm64": "0.0.
|
|
26
|
-
"@effect/tsgo-linux-
|
|
27
|
-
"@effect/tsgo-linux-
|
|
28
|
-
"@effect/tsgo-linux-arm": "0.0.
|
|
29
|
-
"@effect/tsgo-darwin-x64": "0.0.
|
|
30
|
-
"@effect/tsgo-darwin-arm64": "0.0.
|
|
25
|
+
"@effect/tsgo-win32-x64": "0.0.17",
|
|
26
|
+
"@effect/tsgo-win32-arm64": "0.0.17",
|
|
27
|
+
"@effect/tsgo-linux-arm64": "0.0.17",
|
|
28
|
+
"@effect/tsgo-linux-x64": "0.0.17",
|
|
29
|
+
"@effect/tsgo-linux-arm": "0.0.17",
|
|
30
|
+
"@effect/tsgo-darwin-x64": "0.0.17",
|
|
31
|
+
"@effect/tsgo-darwin-arm64": "0.0.17"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"@effect/platform-node": "4.0.0-beta.11",
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
"vitest": "^3.2.1"
|
|
40
41
|
},
|
|
41
42
|
"scripts": {
|
|
42
|
-
"build": "tsdown --config tsdown.config.
|
|
43
|
+
"build": "tsdown --config tsdown.config.ts",
|
|
43
44
|
"check": "tsc --noEmit -p tsconfig.json",
|
|
44
45
|
"test": "vitest run"
|
|
45
46
|
}
|