-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: fix link rot on
no-external-import
(#1219)
- Loading branch information
1 parent
9cd4fb2
commit d7166fe
Showing
2 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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": [] | ||
}, | ||
{ | ||
|