Skip to content

Commit 3de2f82

Browse files
committed
feat: restricting SvelteKit rules to SvelteKit
1 parent 3a88dbc commit 3de2f82

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

packages/eslint-plugin-svelte/src/rules/no-goto-without-base.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ export default createRule('no-goto-without-base', {
1818
isNotPrefixedWithBasePath:
1919
"Found a goto() call with a url that isn't prefixed with the base path."
2020
},
21-
type: 'suggestion'
21+
type: 'suggestion',
22+
conditions: [
23+
{
24+
svelteKitVersions: ['1.0.0-next', '1', '2']
25+
}
26+
]
2227
},
2328
create(context) {
2429
return {

packages/eslint-plugin-svelte/src/rules/no-navigation-without-base.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ export default createRule('no-navigation-without-base', {
4242
replaceStateNotPrefixed:
4343
"Found a replaceState() call with a url that isn't prefixed with the base path."
4444
},
45-
type: 'suggestion'
45+
type: 'suggestion',
46+
conditions: [
47+
{
48+
svelteKitVersions: ['1.0.0-next', '1', '2']
49+
}
50+
]
4651
},
4752
create(context) {
4853
let basePathNames: Set<TSESTree.Identifier> = new Set<TSESTree.Identifier>();

0 commit comments

Comments
 (0)