Skip to content

Commit 2d2007d

Browse files
authored
fix: support windows path delimiter (#1124)
1 parent 615e9d3 commit 2d2007d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/eslint-plugin-svelte/src/utils/svelte-context.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function getSvelteFileType(filePath: string): SvelteContext['svelteFileType'] {
6262
}
6363

6464
function getSvelteKitFileTypeFromFilePath(filePath: string): SvelteContext['svelteKitFileType'] {
65-
const fileName = filePath.split('/').pop();
65+
const fileName = filePath.split(/[/\\]/).pop();
6666
switch (fileName) {
6767
case '+page.svelte': {
6868
return '+page.svelte';

0 commit comments

Comments
 (0)