Skip to content

Commit

Permalink
docs: fix link rot on no-external-import (#1219)
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston authored Dec 24, 2023
1 parent 9cd4fb2 commit d7166fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/rules/no_external_imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Disallows the use of external imports
places in your project.
- who should use it?
- to avoid it you could use "deps.ts convention" or
[import maps](https://deno.land/manual/linking_to_external_code/import_maps),
[import maps](https://docs.deno.com/runtime/manual/basics/import_maps),
where you import all external modules and then re-export them or assign
aliases to them.
- so if you'd like to follow the "deps.ts convention" or to use import maps,
Expand Down Expand Up @@ -38,4 +38,4 @@ export {
```

you can refer to the explanation of this convention here
https://deno.land/manual/linking_to_external_code#it-seems-unwieldy-to-import-urls-everywhere
https://docs.deno.com/runtime/manual/basics/modules/#it-seems-unwieldy-to-import-urls-everywhere
2 changes: 1 addition & 1 deletion www/static/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
},
{
"code": "no-external-import",
"docs": "Disallows the use of external imports\n\n- what's the motivation of this lint rule?\n - this rule emits warnings if external modules are imported via URL. \"deps.ts\"\n and import maps are exception.\n- why is linted code considered bad?\n - importing external modules just works fine, but it will take time and effort\n when you want to upgrade those modules if they are imported in multiple\n places in your project.\n- who should use it?\n - to avoid it you could use \"deps.ts convention\" or\n [import maps](https://deno.land/manual/linking_to_external_code/import_maps),\n where you import all external modules and then re-export them or assign\n aliases to them.\n - so if you'd like to follow the \"deps.ts convention\" or to use import maps,\n this rule is for you.\n\n### Invalid:\n\n```typescript\nimport { assertEquals } from \"https://deno.land/[email protected]/testing/asserts.ts\";\n```\n\n### Valid:\n\n```typescript\nimport { assertEquals } from \"./deps.ts\";\n```\n\n```typescript\n// deps.ts\n\nexport {\n assert,\n assertEquals,\n assertStringIncludes,\n} from \"https://deno.land/[email protected]/testing/asserts.ts\";\n```\n\nyou can refer to the explanation of this convention here\nhttps://deno.land/manual/linking_to_external_code#it-seems-unwieldy-to-import-urls-everywhere\n",
"docs": "Disallows the use of external imports\n\n- what's the motivation of this lint rule?\n - this rule emits warnings if external modules are imported via URL. \"deps.ts\"\n and import maps are exception.\n- why is linted code considered bad?\n - importing external modules just works fine, but it will take time and effort\n when you want to upgrade those modules if they are imported in multiple\n places in your project.\n- who should use it?\n - to avoid it you could use \"deps.ts convention\" or\n [import maps](https://docs.deno.com/runtime/manual/basics/import_maps),\n where you import all external modules and then re-export them or assign\n aliases to them.\n - so if you'd like to follow the \"deps.ts convention\" or to use import maps,\n this rule is for you.\n\n### Invalid:\n\n```typescript\nimport { assertEquals } from \"https://deno.land/[email protected]/testing/asserts.ts\";\n```\n\n### Valid:\n\n```typescript\nimport { assertEquals } from \"./deps.ts\";\n```\n\n```typescript\n// deps.ts\n\nexport {\n assert,\n assertEquals,\n assertStringIncludes,\n} from \"https://deno.land/[email protected]/testing/asserts.ts\";\n```\n\nyou can refer to the explanation of this convention here\nhttps://docs.deno.com/runtime/manual/basics/modules/#it-seems-unwieldy-to-import-urls-everywhere\n",
"tags": []
},
{
Expand Down

0 comments on commit d7166fe

Please sign in to comment.