Research
Effect tsgo Oxlint Pack Research
Effect tsgo Oxlint Pack Research
Scope
Research the 2026-08-04 announcement that Effect language-service diagnostics are available as custom type-aware Oxlint rules, then identify the smallest correct Harness Effect-pack integration.
Primary-source facts
- Mattia Manzati announced that the Effect LSP rules are available as custom, type-aware Oxlint rules and linked the
Effect-TS/tsgosetup. Announcement - The latest published release is
@effect/tsgo@0.36.5, from commitcf4147a. Currentmaincontains unreleased changes, so the published release is the implementation authority. - Upstream requires
@effect/tsgo,oxlint, andoxlint-tsgolint. For@effect/tsgo@0.36.5, the compatible direct-install tuple isoxlint@1.78.0andoxlint-tsgolint@7.0.2001. The patch command rejects unsupported installed versions. Setup, supported versions, compatibility requirement - Oxlint integration patches installed binaries and must run again after dependency installation. For a lint-only pack, the precise command is
effect-tsgo patch --no-typescript --oxlint; the shorter upstream example also patches TypeScript and therefore requires a supported native TypeScript 7 installation. Setup, integration flags - The supported TypeScript config imports
recommendedfrom@effect/tsgo/oxlint-presetsand extends it. The preset enablesoptions.typeAware, registerseffecttsgo, and owns the curated severities. All Effect rules need type-aware mode. Config, recommended preset, limitation - The integration remains marked experimental and its packaged binaries support x64/arm64 macOS, Windows, and glibc Linux, but not musl Linux. Flag status, platform discovery
Harness findings
- The Effect pack currently selects only
effect-no-barrel-importsinapps/cli/src/data/catalog/packs.ts. That asset is still required because the upstream recommended preset does not replaceeffect-js/no-import-from-barrel-package. - Lint config generation already composes Ultracite imports, local rules, JS plugins, dependencies, and nearest-workspace
oxlint.config.tsfiles. It does not model external preset imports, dependency version constraints, or required package scripts. - Missing lint dependencies currently default to
latest. On 2026-08-19,oxlint@latestis1.79.0, which is outside@effect/tsgo@0.36.5's supported set. Adding package names without exact versions would produce a setup whose prepare step fails. - Clean macOS arm64 probes confirmed both sides of the compatibility boundary. With
oxlint@1.79.0,effect-tsgo patch --no-typescript --oxlintexits withUnsupportedTargetPackageVersionError, listing only1.77.0and1.78.0; running the imported recommended preset without the patch exits withUnknown plugin: 'effecttsgo'. Withoxlint@1.78.0, the patch succeeds and Oxlint reports a realeffecttsgo(floating-effect)error. Current upstreammainstill packages only the 1.77/1.78 Oxlint components. - Existing package scripts and dependency protocols are project-owned state. Integration must compose and deduplicate the Effect patch command, preserve unrelated script content, preserve compatible existing versions, and fail closed rather than silently replace incompatible or non-semver dependency protocols.
Synthesized implementation direction
- Keep the existing barrel-import asset and add a separate Effect tsgo recommended asset.
- Extend the CLI-owned lint-asset model with external named preset imports, exact required dependency versions, and required package scripts. Keep these generic lint capabilities; do not special-case Effect inside the config encoder.
- Import the published upstream
recommendedpreset rather than copying its rule list. - Generate the exact compatible dependency tuple and compose
effect-tsgo patch --no-typescript --oxlintintopreparewithout overwriting existing commands or duplicating the patch on repeated scaffold runs. - Test through the built CLI scaffold seam: an Effect repository receives both assets, the imported preset, the existing barrel rule, the compatible dependency tuple, and the composed prepare command. Also exercise a real type-aware Effect diagnostic when the host platform supports the patched integration.
- Document that the integration is experimental, version-coupled, and unavailable on musl Linux.
Conflicts and uncertainty
- Upstream documentation commonly shows floating installs, but the same documentation requires installed versions to match the release's supported set. Harness must prefer the explicit compatibility table because its scaffold is expected to remain installable after publication.
- Whether a repository with an incompatible pre-existing Oxlint dependency should be upgraded automatically is a product-policy decision. Current Harness preservation rules argue for a clear validation failure with remediation rather than silent replacement.
- Projects that also enable Effect LSP diagnostics may see duplicate findings. Upstream recommends setting language-service
diagnosticstofalse, but this lint-pack change should document that choice rather than mutatetsconfig.jsonoutside the lint asset's ownership.