From 284eb7528869f1e7388c2110e913c69db3d368d2 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Sun, 12 Jan 2025 18:37:27 +0900 Subject: [PATCH] chore: change the rule category of `valid-prop-names-in-kit-pages` to `SvelteKit` --- .changeset/cool-tomatoes-fry.md | 5 +++++ README.md | 2 +- docs/rules.md | 8 ++++---- .../src/rules/valid-prop-names-in-kit-pages.ts | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 .changeset/cool-tomatoes-fry.md 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 5caad4691..d9eeb95fa 100644 --- a/README.md +++ b/README.md @@ -337,7 +337,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. | Rule ID | Description | | |:--------|:------------|:---| | [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 73dcbdf8b..d85a2aea0 100644 --- a/docs/rules.md +++ b/docs/rules.md @@ -34,7 +34,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 @@ -111,9 +110,10 @@ These rules extend the rules provided by ESLint itself, or other plugins to work These rules relate to SvelteKit and its best Practices. -| Rule ID | Description | | -| :------------------------------------------------------------------------- | :------------------------------------------------------------------------------------- | :-- | -| [svelte/no-navigation-without-base](./rules/no-navigation-without-base.md) | disallow using navigation (links, goto, pushState, replaceState) without the base path | | +| Rule ID | Description | | +| :------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------- | :-- | +| [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 },