From e54ef19a72e30f54741dbe49f32afdc5798031ab Mon Sep 17 00:00:00 2001 From: Tobias Date: Sat, 28 Dec 2024 07:41:59 +0100 Subject: [PATCH 1/3] Docs: NoResolution: Hint at how to ignore the issue --- docs/problems/NoResolution.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/problems/NoResolution.md b/docs/problems/NoResolution.md index 1fcdc17..7a4984b 100644 --- a/docs/problems/NoResolution.md +++ b/docs/problems/NoResolution.md @@ -37,3 +37,7 @@ When this problem occurs for the `node10` resolution option but not any others, In this example, an import of `"pkg/subpath"` can be used in Node 12+ and modern bundlers, but would fail to resolve in Node 10. Accordingly, TypeScript’s `--moduleResolution node10` (also confusingly known as `node`, because history) does not resolve `"exports"` either. While few libraries care about supporting a long-past EOL version of Node, maintainers of very popular libraries should be aware that many TypeScript users are still using `--moduleResolution node`. If they aren’t literally using Node 10, they really should move away from it, but sometimes migrating can be difficult because it introduces new errors caused by _incorrect dependency typings_—the problem this tool was made to diagnose. Popular libraries often choose to adopt a strategy that allows `--moduleResolution node10` to work even without `"exports"` support. https://github.com/andrewbranch/example-subpath-exports-ts-compat demonstrates several such strategies. + +## Ignore issue + +You can use the `profile` `node16` to ignore this issue. It will be reported as `node10: (ignored) 💀 Resolution failed` with a red export path but it the check will not exit with an error anymore. [Learn more in the CLI Readme](https://github.com/jason-ha/arethetypeswrong/blob/8f9afe019ade7d25ef81da7c50f819328edcecae/packages/cli/README.md#profiles). From 4dabec83a1dc0a849ab90ed7cd9b52f7cb79c499 Mon Sep 17 00:00:00 2001 From: Tobias Date: Sat, 28 Dec 2024 07:48:00 +0100 Subject: [PATCH 2/3] Docs: NoResolution: Fix URL --- docs/problems/NoResolution.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/problems/NoResolution.md b/docs/problems/NoResolution.md index 7a4984b..6d77ced 100644 --- a/docs/problems/NoResolution.md +++ b/docs/problems/NoResolution.md @@ -40,4 +40,4 @@ While few libraries care about supporting a long-past EOL version of Node, maint ## Ignore issue -You can use the `profile` `node16` to ignore this issue. It will be reported as `node10: (ignored) 💀 Resolution failed` with a red export path but it the check will not exit with an error anymore. [Learn more in the CLI Readme](https://github.com/jason-ha/arethetypeswrong/blob/8f9afe019ade7d25ef81da7c50f819328edcecae/packages/cli/README.md#profiles). +You can use the `profile` `node16` to ignore this issue. It will be reported as `node10: (ignored) 💀 Resolution failed` with a red export path but it the check will not exit with an error anymore. [Learn more in the CLI Readme](https://github.com/arethetypeswrong/arethetypeswrong.github.io/tree/main/packages/cli#profiles). From f66f316c6d2dc7e97bf9c3065261c1a43c94f578 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Sun, 12 Jan 2025 19:29:18 -0800 Subject: [PATCH 3/3] Update docs/problems/NoResolution.md --- docs/problems/NoResolution.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/problems/NoResolution.md b/docs/problems/NoResolution.md index 6d77ced..b677066 100644 --- a/docs/problems/NoResolution.md +++ b/docs/problems/NoResolution.md @@ -38,6 +38,5 @@ In this example, an import of `"pkg/subpath"` can be used in Node 12+ and modern While few libraries care about supporting a long-past EOL version of Node, maintainers of very popular libraries should be aware that many TypeScript users are still using `--moduleResolution node`. If they aren’t literally using Node 10, they really should move away from it, but sometimes migrating can be difficult because it introduces new errors caused by _incorrect dependency typings_—the problem this tool was made to diagnose. Popular libraries often choose to adopt a strategy that allows `--moduleResolution node10` to work even without `"exports"` support. https://github.com/andrewbranch/example-subpath-exports-ts-compat demonstrates several such strategies. -## Ignore issue -You can use the `profile` `node16` to ignore this issue. It will be reported as `node10: (ignored) 💀 Resolution failed` with a red export path but it the check will not exit with an error anymore. [Learn more in the CLI Readme](https://github.com/arethetypeswrong/arethetypeswrong.github.io/tree/main/packages/cli#profiles). +> You can use the [`--profile node16` option on the CLI](https://github.com/arethetypeswrong/arethetypeswrong.github.io/tree/main/packages/cli#profiles) to ignore issues that only affect `--moduleResolution node10`.