diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts index 355ad0c423..f267b7c3a5 100644 --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -163,7 +163,7 @@ export default class Component { const svelteOptions = ast.html.children.find(child => child.name === 'svelte:options') || { start: 0, end: 0 }; this.warn(svelteOptions, { code: 'custom-element-no-tag', - message: `No custom element 'tag' option was specified. To automatically register a custom element, specify a name with a hyphen in it, e.g. . To hide this warning, use ` + message: 'No custom element \'tag\' option was specified. To automatically register a custom element, specify a name with a hyphen in it, e.g. . To hide this warning, use ' }); } this.tag = this.component_options.tag || compile_options.tag; @@ -256,7 +256,7 @@ export default class Component { const { compile_options, name } = this; const { format = 'esm' } = compile_options; - const banner = `/* ${this.file ? `${this.file} ` : ``}generated by Svelte v${"__VERSION__"} */`; + const banner = `/* ${this.file ? `${this.file} ` : ''}generated by Svelte v${'__VERSION__'} */`; result = result .replace(/__svelte:self__/g, this.name) @@ -488,16 +488,16 @@ export default class Component { content.body.forEach(node => { if (node.type === 'ExportDefaultDeclaration') { this.error(node, { - code: `default-export`, - message: `A component cannot have a default export` + code: 'default-export', + message: 'A component cannot have a default export' }); } if (node.type === 'ExportNamedDeclaration') { if (node.source) { this.error(node, { - code: `not-implemented`, - message: `A component currently cannot have an export ... from` + code: 'not-implemented', + message: 'A component currently cannot have an export ... from' }); } if (node.declaration) { @@ -594,7 +594,7 @@ export default class Component { if (name[0] === '$') { this.error(node, { code: 'illegal-declaration', - message: `The $ prefix is reserved, and cannot be used for variable and import names` + message: 'The $ prefix is reserved, and cannot be used for variable and import names' }); } @@ -610,7 +610,7 @@ export default class Component { if (name[0] === '$') { this.error(node, { code: 'illegal-subscription', - message: `Cannot reference store value inside