Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Apr 24, 2024
1 parent f116a61 commit 2f5b26e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/svelte/scripts/process-messages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function transform(name, dest) {
for (let i = 0; i < parts.length; i += 1) {
const part = parts[i];
if (i % 2 === 0) {
const str = part.replace(/(`|\$)/g, '\\$1');
const str = part.replace(/(`|\${)/g, '\\$1');
quasis.push({
type: 'TemplateElement',
value: { raw: str, cooked: str },
Expand Down
4 changes: 2 additions & 2 deletions packages/svelte/src/compiler/warnings.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ export function avoid_nested_class(node) {
* @param {string} name
*/
export function store_with_rune_name(node, name) {
w(node, "store_with_rune_name", `It looks like you're using the \`\$${name}\` rune, but there is a local binding called \`${name}\`. Referencing a local variable with a \`\$\` prefix will create a store subscription. Please rename \`${name}\` to avoid the ambiguity`);
w(node, "store_with_rune_name", `It looks like you're using the \`$${name}\` rune, but there is a local binding called \`${name}\`. Referencing a local variable with a \`$\` prefix will create a store subscription. Please rename \`${name}\` to avoid the ambiguity`);
}

/**
Expand All @@ -583,7 +583,7 @@ export function store_with_rune_name(node, name) {
* @param {string} name
*/
export function non_state_reference(node, name) {
w(node, "non_state_reference", `\`${name}\` is updated, but is not declared with \`\$state(...)\`. Changing its value will not correctly trigger updates`);
w(node, "non_state_reference", `\`${name}\` is updated, but is not declared with \`$state(...)\`. Changing its value will not correctly trigger updates`);
}

/**
Expand Down

0 comments on commit 2f5b26e

Please sign in to comment.