Skip to content

Commit 4e0b350

Browse files
kongo09claude
andcommitted
Use default import for node:path to satisfy oxlint
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 9baa68d commit 4e0b350

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/.vitepress/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details.
66
*/
77

88
import { existsSync } from "node:fs";
9-
import { join, posix } from "node:path";
9+
import path from "node:path";
1010
import { fileURLToPath } from "node:url";
1111
import { withMermaid } from "vitepress-plugin-mermaid";
1212

@@ -32,8 +32,8 @@ function customPathResolver(href: string, currentPath: string): string {
3232

3333
default: {
3434
// Relative links between pages within docs/ are resolved by VitePress natively
35-
const resolved = posix.normalize(posix.join(posix.dirname(currentPath), link));
36-
if (!resolved.startsWith("..") && existsSync(join(docsDir, resolved))) {
35+
const resolved = path.posix.normalize(path.posix.join(path.posix.dirname(currentPath), link));
36+
if (!resolved.startsWith("..") && existsSync(path.join(docsDir, resolved))) {
3737
return href;
3838
}
3939
return `https://github.com/element-hq/element-web/blob/develop/${href.split("/").pop()}`;

0 commit comments

Comments
 (0)