Skip to content

Commit abbcfdd

Browse files
authored
feat(no-navigation-without-resolve): added to recommended rule set (#1308)
1 parent e2e791f commit abbcfdd

File tree

6 files changed

+10
-3
lines changed

6 files changed

+10
-3
lines changed

.changeset/bitter-aliens-relax.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'eslint-plugin-svelte': minor
3+
---
4+
5+
feat(no-navigation-without-resolve): added to recommended rule set

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ These rules relate to SvelteKit and its best Practices.
363363
| Rule ID | Description | |
364364
|:--------|:------------|:---|
365365
| [svelte/no-export-load-in-svelte-module-in-kit-pages](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-export-load-in-svelte-module-in-kit-pages/) | disallow exporting load functions in `*.svelte` module in SvelteKit page components. | :star: |
366-
| [svelte/no-navigation-without-resolve](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-resolve/) | disallow using navigation (links, goto, pushState, replaceState) without a resolve() | |
366+
| [svelte/no-navigation-without-resolve](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-resolve/) | disallow using navigation (links, goto, pushState, replaceState) without a resolve() | :star: |
367367
| [svelte/valid-prop-names-in-kit-pages](https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-prop-names-in-kit-pages/) | disallow props other than data or errors in SvelteKit page components. | :star: |
368368

369369
## Experimental

docs/rules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ These rules relate to SvelteKit and its best Practices.
120120
| Rule ID | Description | |
121121
| :------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------- | :----- |
122122
| [svelte/no-export-load-in-svelte-module-in-kit-pages](./rules/no-export-load-in-svelte-module-in-kit-pages.md) | disallow exporting load functions in `*.svelte` module in SvelteKit page components. | :star: |
123-
| [svelte/no-navigation-without-resolve](./rules/no-navigation-without-resolve.md) | disallow using navigation (links, goto, pushState, replaceState) without a resolve() | |
123+
| [svelte/no-navigation-without-resolve](./rules/no-navigation-without-resolve.md) | disallow using navigation (links, goto, pushState, replaceState) without a resolve() | :star: |
124124
| [svelte/valid-prop-names-in-kit-pages](./rules/valid-prop-names-in-kit-pages.md) | disallow props other than data or errors in SvelteKit page components. | :star: |
125125

126126
## Experimental

docs/rules/no-navigation-without-resolve.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ description: 'disallow using navigation (links, goto, pushState, replaceState) w
1010
> disallow using navigation (links, goto, pushState, replaceState) without a resolve()
1111
1212
- :exclamation: <badge text="This rule has not been released yet." vertical="middle" type="error"> **_This rule has not been released yet._** </badge>
13+
- :gear: This rule is included in `"plugin:svelte/recommended"`.
1314

1415
## :book: Rule Details
1516

packages/eslint-plugin-svelte/src/configs/flat/recommended.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const config: Linter.Config[] = [
2222
'svelte/no-immutable-reactive-statements': 'error',
2323
'svelte/no-inner-declarations': 'error',
2424
'svelte/no-inspect': 'warn',
25+
'svelte/no-navigation-without-resolve': 'error',
2526
'svelte/no-not-function-handler': 'error',
2627
'svelte/no-object-in-text-mustaches': 'error',
2728
'svelte/no-raw-special-elements': 'error',

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default createRule('no-navigation-without-resolve', {
1111
description:
1212
'disallow using navigation (links, goto, pushState, replaceState) without a resolve()',
1313
category: 'SvelteKit',
14-
recommended: false
14+
recommended: true
1515
},
1616
schema: [
1717
{

0 commit comments

Comments
 (0)