diff --git a/.changeset/cool-tomatoes-fry.md b/.changeset/cool-tomatoes-fry.md new file mode 100644 index 000000000..f61cd8f03 --- /dev/null +++ b/.changeset/cool-tomatoes-fry.md @@ -0,0 +1,5 @@ +--- +'eslint-plugin-svelte': patch +--- + +chore: change the rule category of `valid-prop-names-in-kit-pages` to `SvelteKit` diff --git a/README.md b/README.md index 9f3165fd6..b2bac0116 100644 --- a/README.md +++ b/README.md @@ -336,7 +336,6 @@ These rules relate to possible syntax or logic errors in Svelte code: | [svelte/require-store-callbacks-use-set-param](https://sveltejs.github.io/eslint-plugin-svelte/rules/require-store-callbacks-use-set-param/) | store callbacks must use `set` param | | | [svelte/require-store-reactive-access](https://sveltejs.github.io/eslint-plugin-svelte/rules/require-store-reactive-access/) | disallow to use of the store itself as an operand. Need to use $ prefix or get function. | :wrench: | | [svelte/valid-compile](https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-compile/) | disallow warnings when compiling. | :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. | | ## Security Vulnerability @@ -417,6 +416,7 @@ These rules relate to SvelteKit and its best Practices. |:--------|:------------|:---| | [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. | | | [svelte/no-navigation-without-base](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-base/) | disallow using navigation (links, goto, pushState, replaceState) without the base path | | +| [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. | | ## Experimental diff --git a/docs/rules.md b/docs/rules.md index ddd0d5929..f07b703a2 100644 --- a/docs/rules.md +++ b/docs/rules.md @@ -33,7 +33,6 @@ These rules relate to possible syntax or logic errors in Svelte code: | [svelte/require-store-callbacks-use-set-param](./rules/require-store-callbacks-use-set-param.md) | store callbacks must use `set` param | | | [svelte/require-store-reactive-access](./rules/require-store-reactive-access.md) | disallow to use of the store itself as an operand. Need to use $ prefix or get function. | :wrench: | | [svelte/valid-compile](./rules/valid-compile.md) | disallow warnings when compiling. | :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. | | ## Security Vulnerability @@ -114,6 +113,7 @@ These rules relate to SvelteKit and its best Practices. | :------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------- | :-- | | [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. | | | [svelte/no-navigation-without-base](./rules/no-navigation-without-base.md) | disallow using navigation (links, goto, pushState, replaceState) without the base path | | +| [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. | | ## Experimental diff --git a/packages/eslint-plugin-svelte/src/rules/valid-prop-names-in-kit-pages.ts b/packages/eslint-plugin-svelte/src/rules/valid-prop-names-in-kit-pages.ts index e23455da6..9519414d6 100644 --- a/packages/eslint-plugin-svelte/src/rules/valid-prop-names-in-kit-pages.ts +++ b/packages/eslint-plugin-svelte/src/rules/valid-prop-names-in-kit-pages.ts @@ -26,7 +26,7 @@ export default createRule('valid-prop-names-in-kit-pages', { meta: { docs: { description: 'disallow props other than data or errors in SvelteKit page components.', - category: 'Possible Errors', + category: 'SvelteKit', // TODO Switch to recommended in the major version. recommended: false },