Skip to content

Commit 21046f5

Browse files
committed
test(no-navigation-without-base): added test for pushState, replaceState and links
1 parent e6949ea commit 21046f5

32 files changed

+141
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<script>
2+
import { base } from '$app/paths';
3+
</script>
4+
5+
<a href={'/foo/' + base}>Click me!</a>
6+
<a href={`/foo/${base}`}>Click me!</a>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<a href="/foo">Click me!</a>
2+
<a href={'/foo'}>Click me!</a>
3+
<a href={'/' + 'foo'}>Click me!</a>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- message: Found a pushState() call with a url that isn't prefixed with the base path.
2+
line: 4
3+
column: 8
4+
suggestions: null
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<script>
2+
import { pushState as alias } from '$app/navigation';
3+
4+
alias('/foo');
5+
</script>

0 commit comments

Comments
 (0)