Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion lint/rules/no-import-prefix.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ tags: [workspace]
Ensure that all dependencies are declared in either `deno.json` or
`package.json`.

This promotes better dependency management and makes it easier to track and
update dependencies. It also helps Deno purge the lockfile when removing a
dependency.

### Invalid:

```ts
Expand All @@ -16,6 +20,15 @@ import foo from "npm:preact@10";
### Valid:

```ts
// Mapped in `deno.json` or `package.json`
import foo from "@std/path";
```

With a corresponding entry in the `deno.json` or `package.json` file:

```jsonc title="deno.json"
{
"imports": {
"@std/path": "jsr:@std/path@1"
}
}
```
2 changes: 1 addition & 1 deletion runtime/reference/continuous_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ restore them from cache instead of re-downloading.
To demonstrate, let's say you have a project that uses the logger from
[`@std/log`](https://jsr.io/@std/log):

```json, title="deno.json"
```json title="deno.json"
{
"imports": {
"@std/log": "jsr:@std/log@0.224.5"
Expand Down