From 5ee00cdeb15818506ec80b8068a673be9dd4126b Mon Sep 17 00:00:00 2001 From: paoloricciuti Date: Mon, 26 May 2025 15:30:56 +0200 Subject: [PATCH] chore: update message --- .../docs/98-reference/.generated/compile-warnings.md | 2 +- packages/svelte/messages/compile-warnings/script.md | 2 +- packages/svelte/src/compiler/warnings.js | 4 ++-- .../custom-element-props-identifier-rest/warnings.json | 2 +- .../samples/custom-element-props-identifier/warnings.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/documentation/docs/98-reference/.generated/compile-warnings.md b/documentation/docs/98-reference/.generated/compile-warnings.md index dab819a5f9..732bb92f07 100644 --- a/documentation/docs/98-reference/.generated/compile-warnings.md +++ b/documentation/docs/98-reference/.generated/compile-warnings.md @@ -635,7 +635,7 @@ In some situations a selector may target an element that is not 'visible' to the ### custom_element_props_identifier ``` -Using an identifier or a rest element as the declarator for `$props` when compiling to custom elements without declaring `props` in the component options means that Svelte can't know which props to expose as properties on the DOM element. Consider explicitly destructure all the props or add the `customElement.props` option. +Using an identifier or a rest element as the declarator for `$props` when compiling to custom elements without declaring `props` in the component options means that Svelte can't know which props to expose as properties on the DOM element. Consider explicitly destructuring all the props or add the `customElement.props` option. ``` ### element_implicitly_closed diff --git a/packages/svelte/messages/compile-warnings/script.md b/packages/svelte/messages/compile-warnings/script.md index d12cb3a64a..66aff9188e 100644 --- a/packages/svelte/messages/compile-warnings/script.md +++ b/packages/svelte/messages/compile-warnings/script.md @@ -1,6 +1,6 @@ ## custom_element_props_identifier -> Using an identifier or a rest element as the declarator for `$props` when compiling to custom elements without declaring `props` in the component options means that Svelte can't know which props to expose as properties on the DOM element. Consider explicitly destructure all the props or add the `customElement.props` option. +> Using an identifier or a rest element as the declarator for `$props` when compiling to custom elements without declaring `props` in the component options means that Svelte can't know which props to expose as properties on the DOM element. Consider explicitly destructuring all the props or add the `customElement.props` option. ## export_let_unused diff --git a/packages/svelte/src/compiler/warnings.js b/packages/svelte/src/compiler/warnings.js index 1627bc61c8..e8b89a9b22 100644 --- a/packages/svelte/src/compiler/warnings.js +++ b/packages/svelte/src/compiler/warnings.js @@ -594,11 +594,11 @@ export function options_renamed_ssr_dom(node) { } /** - * Using an identifier or a rest element as the declarator for `$props` when compiling to custom elements without declaring `props` in the component options means that Svelte can't know which props to expose as properties on the DOM element. Consider explicitly destructure all the props or add the `customElement.props` option. + * Using an identifier or a rest element as the declarator for `$props` when compiling to custom elements without declaring `props` in the component options means that Svelte can't know which props to expose as properties on the DOM element. Consider explicitly destructuring all the props or add the `customElement.props` option. * @param {null | NodeLike} node */ export function custom_element_props_identifier(node) { - w(node, 'custom_element_props_identifier', `Using an identifier or a rest element as the declarator for \`$props\` when compiling to custom elements without declaring \`props\` in the component options means that Svelte can't know which props to expose as properties on the DOM element. Consider explicitly destructure all the props or add the \`customElement.props\` option.\nhttps://svelte.dev/e/custom_element_props_identifier`); + w(node, 'custom_element_props_identifier', `Using an identifier or a rest element as the declarator for \`$props\` when compiling to custom elements without declaring \`props\` in the component options means that Svelte can't know which props to expose as properties on the DOM element. Consider explicitly destructuring all the props or add the \`customElement.props\` option.\nhttps://svelte.dev/e/custom_element_props_identifier`); } /** diff --git a/packages/svelte/tests/validator/samples/custom-element-props-identifier-rest/warnings.json b/packages/svelte/tests/validator/samples/custom-element-props-identifier-rest/warnings.json index ebeebfb944..db034df8e8 100644 --- a/packages/svelte/tests/validator/samples/custom-element-props-identifier-rest/warnings.json +++ b/packages/svelte/tests/validator/samples/custom-element-props-identifier-rest/warnings.json @@ -17,7 +17,7 @@ "column": 15, "line": 4 }, - "message": "Using an identifier or a rest element as the declarator for `$props` when compiling to custom elements without declaring `props` in the component options means that Svelte can't know which props to expose as properties on the DOM element. Consider explicitly destructure all the props or add the `customElement.props` option.", + "message": "Using an identifier or a rest element as the declarator for `$props` when compiling to custom elements without declaring `props` in the component options means that Svelte can't know which props to expose as properties on the DOM element. Consider explicitly destructuring all the props or add the `customElement.props` option.", "start": { "column": 7, "line": 4 diff --git a/packages/svelte/tests/validator/samples/custom-element-props-identifier/warnings.json b/packages/svelte/tests/validator/samples/custom-element-props-identifier/warnings.json index fe2449a155..e7c637cd03 100644 --- a/packages/svelte/tests/validator/samples/custom-element-props-identifier/warnings.json +++ b/packages/svelte/tests/validator/samples/custom-element-props-identifier/warnings.json @@ -17,7 +17,7 @@ "column": 10, "line": 4 }, - "message": "Using an identifier or a rest element as the declarator for `$props` when compiling to custom elements without declaring `props` in the component options means that Svelte can't know which props to expose as properties on the DOM element. Consider explicitly destructure all the props or add the `customElement.props` option.", + "message": "Using an identifier or a rest element as the declarator for `$props` when compiling to custom elements without declaring `props` in the component options means that Svelte can't know which props to expose as properties on the DOM element. Consider explicitly destructuring all the props or add the `customElement.props` option.", "start": { "column": 5, "line": 4