lint, tests

pull/8457/head
Simon Holthausen 3 years ago
parent 5804b695e7
commit ad003924c3

@ -1577,7 +1577,7 @@ function process_component_options(component: Component, nodes) {
switch (name) { switch (name) {
case 'tag': { case 'tag': {
component.warn(attribute, compiler_warnings.tag_option_deprecated) component.warn(attribute, compiler_warnings.tag_option_deprecated);
parse_tag(attribute, get_value(attribute, compiler_errors.invalid_tag_attribute)); parse_tag(attribute, get_value(attribute, compiler_errors.invalid_tag_attribute));
break; break;
} }

@ -204,7 +204,7 @@ export default {
}, },
invalid_customElement_attribute: { invalid_customElement_attribute: {
code: 'invalid-customElement-attribute', code: 'invalid-customElement-attribute',
message: "'customElement' must be a string literal defining a valid custom element name or an object of the form "+ message: "'customElement' must be a string literal defining a valid custom element name or an object of the form " +
"{ tag: string; shadow?: 'open' | 'none'; props?: { [key: string]: { attribute?: string; reflect?: boolean; type: .. } } }" "{ tag: string; shadow?: 'open' | 'none'; props?: { [key: string]: { attribute?: string; reflect?: boolean; type: .. } } }"
}, },
invalid_tag_attribute: { invalid_tag_attribute: {

@ -32,7 +32,7 @@ export default {
}), }),
missing_custom_element_compile_options: { missing_custom_element_compile_options: {
code: 'missing-custom-element-compile-options', code: 'missing-custom-element-compile-options',
message: "The 'tag' option is used when generating a custom element. Did you forget the 'customElement: true' compile option?" message: "The 'customElement' option is used when generating a custom element. Did you forget the 'customElement: true' compile option?"
}, },
css_unused_selector: (selector: string) => ({ css_unused_selector: (selector: string) => ({
code: 'css-unused-selector', code: 'css-unused-selector',

@ -13,7 +13,7 @@ import {
} from "svelte/internal"; } from "svelte/internal";
function add_css(target) { function add_css(target) {
append_styles(target, "svelte-66l35w", "div.svelte-66l35w{animation:svelte-66l35w-foo 1s}@keyframes svelte-66l35w-foo{0%{opacity:0}100%{opacity:1}}"); append_styles(target, "svelte-10axo0s", "div.svelte-10axo0s{animation:svelte-10axo0s-foo 1s}@keyframes svelte-10axo0s-foo{0%{opacity:0}100%{opacity:1}}");
} }
function create_fragment(ctx) { function create_fragment(ctx) {
@ -23,7 +23,7 @@ function create_fragment(ctx) {
c() { c() {
div = element("div"); div = element("div");
div.textContent = "fades in"; div.textContent = "fades in";
attr(div, "class", "svelte-66l35w"); attr(div, "class", "svelte-10axo0s");
}, },
m(target, anchor) { m(target, anchor) {
insert(target, div, anchor); insert(target, div, anchor);

@ -2,10 +2,10 @@
{ {
"code": "missing-custom-element-compile-options", "code": "missing-custom-element-compile-options",
"end": { "end": {
"column": 36, "column": 46,
"line": 1 "line": 1
}, },
"message": "The 'tag' option is used when generating a custom element. Did you forget the 'customElement: true' compile option?", "message": "The 'customElement' option is used when generating a custom element. Did you forget the 'customElement: true' compile option?",
"start": { "start": {
"column": 16, "column": 16,
"line": 1 "line": 1

@ -1,12 +1,12 @@
[{ [{
"code": "missing-custom-element-compile-options", "code": "missing-custom-element-compile-options",
"message": "The 'tag' option is used when generating a custom element. Did you forget the 'customElement: true' compile option?", "message": "The 'customElement' option is used when generating a custom element. Did you forget the 'customElement: true' compile option?",
"start": { "start": {
"line": 1, "line": 1,
"column": 16 "column": 16
}, },
"end": { "end": {
"line": 1, "line": 1,
"column": 36 "column": 46
} }
}] }]

@ -7,6 +7,6 @@
}, },
"end": { "end": {
"line": 1, "line": 1,
"column": 29 "column": 39
} }
}] }]

Loading…
Cancel
Save