Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/bitter-aliens-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'eslint-plugin-svelte': minor
---

feat(no-navigation-without-resolve): added to recommended rule set
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ These rules relate to SvelteKit and its best Practices.
| Rule ID | Description | |
|:--------|:------------|:---|
| [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: |
| [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() | |
| [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: |
| [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: |

## Experimental
Expand Down
2 changes: 1 addition & 1 deletion docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ These rules relate to SvelteKit and its best Practices.
| Rule ID | Description | |
| :------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------- | :----- |
| [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: |
| [svelte/no-navigation-without-resolve](./rules/no-navigation-without-resolve.md) | disallow using navigation (links, goto, pushState, replaceState) without a resolve() | |
| [svelte/no-navigation-without-resolve](./rules/no-navigation-without-resolve.md) | disallow using navigation (links, goto, pushState, replaceState) without a resolve() | :star: |
| [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: |

## Experimental
Expand Down
1 change: 1 addition & 0 deletions docs/rules/no-navigation-without-resolve.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ description: 'disallow using navigation (links, goto, pushState, replaceState) w
> disallow using navigation (links, goto, pushState, replaceState) without a resolve()

- :exclamation: <badge text="This rule has not been released yet." vertical="middle" type="error"> **_This rule has not been released yet._** </badge>
- :gear: This rule is included in `"plugin:svelte/recommended"`.

## :book: Rule Details

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const config: Linter.Config[] = [
'svelte/no-immutable-reactive-statements': 'error',
'svelte/no-inner-declarations': 'error',
'svelte/no-inspect': 'warn',
'svelte/no-navigation-without-resolve': 'error',
'svelte/no-not-function-handler': 'error',
'svelte/no-object-in-text-mustaches': 'error',
'svelte/no-raw-special-elements': 'error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default createRule('no-navigation-without-resolve', {
description:
'disallow using navigation (links, goto, pushState, replaceState) without a resolve()',
category: 'SvelteKit',
recommended: false
recommended: true
},
schema: [
{
Expand Down
Loading