From 070df55f67990d25e456fe82be179f1ef58a4220 Mon Sep 17 00:00:00 2001 From: CirnoV Date: Mon, 29 Apr 2024 20:04:46 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AA=A8=EB=85=B8=EB=A0=88=ED=8F=AC=EA=B0=80?= =?UTF-8?q?=20workspace-root=EC=99=80=20tsconfig=20=EC=84=A4=EC=A0=95?= =?UTF-8?q?=EC=9D=84=20=EA=B3=B5=EC=9C=A0=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/remark-lint-local-links-valid/src/index.ts | 2 +- packages/remark-lint-local-links-valid/tsconfig.json | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/remark-lint-local-links-valid/src/index.ts b/packages/remark-lint-local-links-valid/src/index.ts index e781d6228..53d7a6747 100644 --- a/packages/remark-lint-local-links-valid/src/index.ts +++ b/packages/remark-lint-local-links-valid/src/index.ts @@ -75,7 +75,7 @@ const resolveRedirect = ( ): string => { let resolved = url; while (redirects[resolved]) { - resolved = redirects[resolved].split(/[#?]/)[0]; + resolved = redirects[resolved]?.split(/[#?]/)[0] ?? resolved; } return resolved; }; diff --git a/packages/remark-lint-local-links-valid/tsconfig.json b/packages/remark-lint-local-links-valid/tsconfig.json index f81bb51ef..ec6e74ebe 100644 --- a/packages/remark-lint-local-links-valid/tsconfig.json +++ b/packages/remark-lint-local-links-valid/tsconfig.json @@ -1,7 +1,9 @@ { + "extends": "../../tsconfig.json", "compilerOptions": { "target": "ESNext", - "module": "commonjs", + "module": "NodeNext", + "moduleResolution": "NodeNext", "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "strict": true,