Skip to content

Commit 3933502

Browse files
committed
fix(functions): resolve deno lint errors in generated edge function template
the template generated by 'supabase functions new' produces deno lint errors on line 6 due to inline jsr: import without version specifier: import jsr:@supabase/functions-js/edge-runtime.d.ts this triggers two default deno lint rules: - no-import-prefix: inline jsr: dependency not allowed - no-unversioned-import: missing version in specifier fix moves the dependency declaration to deno.json with proper versioning and updates index.ts to use bare specifier import as recommended by deno. closes #4424
1 parent 03a9671 commit 3933502

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{
2-
"imports": {}
2+
"imports": {
3+
"@supabase/functions-js": "jsr:@supabase/functions-js@^2"
4+
}
35
}

internal/functions/new/templates/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This enables autocomplete, go to definition, etc.
44

55
// Setup type definitions for built-in Supabase Runtime APIs
6-
import "jsr:@supabase/functions-js/edge-runtime.d.ts"
6+
import "@supabase/functions-js/edge-runtime.d.ts"
77

88
console.log("Hello from Functions!")
99

0 commit comments

Comments
 (0)