Skip to main content
← Back to list
01Issue
FeatureOpenSwamp Club
AssigneesNone

deno lint no-import-prefix conflicts with swamp's required npm:/jsr: inline specifiers

Opened by swampadmin · 4/2/2026

Description

Swamp extension models require npm: and jsr: inline import specifiers (e.g., import { z } from "npm:zod@4") because there is no deno.json or import map managed by swamp. However, Deno's built-in linter flags every one of these with the no-import-prefix rule:

error[no-import-prefix]: Inline 'npm:', 'jsr:' or 'https:' dependency not allowed

This forces every extension model file and test file to include a // deno-lint-ignore no-import-prefix suppress comment on each inline import.

Steps to Reproduce

  1. Create a swamp extension model with import { z } from "npm:zod@4";
  2. Run deno lint extensions/models/
  3. Observe no-import-prefix error on every inline specifier

Expected Behavior

Swamp should either:

  • Generate/manage a deno.json with an import map so bare specifiers work, OR
  • Document the // deno-lint-ignore no-import-prefix workaround as expected, OR
  • Provide a lint config that suppresses this rule for extension model directories

Environment

  • swamp version: 20260318.021802.0-sha.3848499d
  • Deno version: 2.2.8
  • OS: macOS Darwin 25.3.0
  • #617 — lockfile strategy for extension model npm deps (same root cause: no deno.json managed by swamp)

Summary

The fix would involve swamp managing a deno.json (or deno.jsonc) in the extensions directory that maps bare specifiers to their npm:/jsr: equivalents. This would resolve both the lint warnings and the lockfile gap from #617 in one change. Affected component: extension model scaffolding and the swamp extension CLI commands.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED

Open

4/2/2026, 5:48:32 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.