Skip to content

Commit 2f5b26e

Browse files
committed
lint
1 parent f116a61 commit 2f5b26e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/svelte/scripts/process-messages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ function transform(name, dest) {
176176
for (let i = 0; i < parts.length; i += 1) {
177177
const part = parts[i];
178178
if (i % 2 === 0) {
179-
const str = part.replace(/(`|\$)/g, '\\$1');
179+
const str = part.replace(/(`|\${)/g, '\\$1');
180180
quasis.push({
181181
type: 'TemplateElement',
182182
value: { raw: str, cooked: str },

packages/svelte/src/compiler/warnings.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ export function avoid_nested_class(node) {
574574
* @param {string} name
575575
*/
576576
export function store_with_rune_name(node, name) {
577-
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`);
577+
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`);
578578
}
579579

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

589589
/**

0 commit comments

Comments
 (0)