diff --git a/README.md b/README.md index 59cd93690..6fb2aef0e 100644 --- a/README.md +++ b/README.md @@ -188,12 +188,6 @@ See also . You can change the behavior of this plugin with some settings. -- `ignoreWarnings` (optional) ... Specifies an array of rules that ignore reports in the template. - For example, set rules on the template that cannot avoid false positives. -- `compileOptions` (optional) ... Specifies options for Svelte compile. Effects rules that use Svelte compile. The target rules are [svelte/valid-compile](https://ota-meshi.github.io/eslint-plugin-svelte/rules/valid-compile/) and [svelte/no-unused-svelte-ignore](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-unused-svelte-ignore/). **Note that it has no effect on ESLint's custom parser**. - - `postcss` (optional) ... Specifies options related to PostCSS. You can disable the PostCSS process by specifying `false`. - - `configFilePath` (optional) ... Specifies the path of the directory containing the PostCSS configuration. - e.g. ```js @@ -210,13 +204,30 @@ module.exports = { configFilePath: "./path/to/my/postcss.config.js", }, }, + kit: { + files: { + routes: "src/routes", + }, + }, }, }, // ... } ``` -#### settings.kit +#### settings.svelte.ignoreWarnings + +Specifies an array of rules that ignore reports in the template. +For example, set rules on the template that cannot avoid false positives. + +#### settings.svelte.compileOptions + +Specifies options for Svelte compile. Effects rules that use Svelte compile. The target rules are [svelte/valid-compile](https://ota-meshi.github.io/eslint-plugin-svelte/rules/valid-compile/) and [svelte/no-unused-svelte-ignore](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-unused-svelte-ignore/). **Note that it has no effect on ESLint's custom parser**. + +- `postcss` ... Specifies options related to PostCSS. You can disable the PostCSS process by specifying `false`. + - `configFilePath` ... Specifies the path of the directory containing the PostCSS configuration. + +#### settings.svelte.kit If you use SvelteKit with not default configuration, you need to set below configurations. The schema is subset of SvelteKit's configuration. @@ -228,9 +239,11 @@ e.g. module.exports = { // ... settings: { - kit: { - files: { - routes: "src/routes", + svelte: { + kit: { + files: { + routes: "src/routes", + }, }, }, }, @@ -294,7 +307,7 @@ These rules relate to possible syntax or logic errors in Svelte code: | [svelte/no-shorthand-style-property-overrides](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-shorthand-style-property-overrides/) | disallow shorthand style properties that override related longhand properties | :star: | | [svelte/no-store-async](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-store-async/) | disallow using async/await inside svelte stores because it causes issues with the auto-unsubscribing features | | | [svelte/no-unknown-style-directive-property](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-unknown-style-directive-property/) | disallow unknown `style:property` | :star: | -| [svelte/require-store-callbacks-use-set-param](https://ota-meshi.github.io/eslint-plugin-svelte/rules/require-store-callbacks-use-set-param/) | (no description) | | +| [svelte/require-store-callbacks-use-set-param](https://ota-meshi.github.io/eslint-plugin-svelte/rules/require-store-callbacks-use-set-param/) | store callbacks must use `set` param | | | [svelte/valid-compile](https://ota-meshi.github.io/eslint-plugin-svelte/rules/valid-compile/) | disallow warnings when compiling. | :star: | ## Security Vulnerability diff --git a/docs/rules.md b/docs/rules.md index ca416ad8c..49d86c64e 100644 --- a/docs/rules.md +++ b/docs/rules.md @@ -25,7 +25,7 @@ These rules relate to possible syntax or logic errors in Svelte code: | [svelte/no-shorthand-style-property-overrides](./rules/no-shorthand-style-property-overrides.md) | disallow shorthand style properties that override related longhand properties | :star: | | [svelte/no-store-async](./rules/no-store-async.md) | disallow using async/await inside svelte stores because it causes issues with the auto-unsubscribing features | | | [svelte/no-unknown-style-directive-property](./rules/no-unknown-style-directive-property.md) | disallow unknown `style:property` | :star: | -| [svelte/require-store-callbacks-use-set-param](./rules/require-store-callbacks-use-set-param.md) | (no description) | | +| [svelte/require-store-callbacks-use-set-param](./rules/require-store-callbacks-use-set-param.md) | store callbacks must use `set` param | | | [svelte/valid-compile](./rules/valid-compile.md) | disallow warnings when compiling. | :star: | ## Security Vulnerability diff --git a/docs/rules/no-export-load-in-svelte-module-in-kit-pages.md b/docs/rules/no-export-load-in-svelte-module-in-kit-pages.md index 55008c12f..f7994cc20 100644 --- a/docs/rules/no-export-load-in-svelte-module-in-kit-pages.md +++ b/docs/rules/no-export-load-in-svelte-module-in-kit-pages.md @@ -20,9 +20,11 @@ And the API has changed.