update the warning message

pull/5836/head
Tan Li Hau 5 years ago
parent e4e239859e
commit 92a4beac15

@ -451,8 +451,8 @@ export default class Element extends Node {
if (react_attributes.has(attribute.name)) { if (react_attributes.has(attribute.name)) {
component.warn(attribute, { component.warn(attribute, {
code: 'use-the-platform', code: 'invalid-html-attribute',
message: `'${attribute.name}' is not a valid html attribute. Did you mean '${react_attributes.get(attribute.name)}'? If you are a recovering React developer, remember, Svelte actually uses the web platform.` message: `'${attribute.name}' is not a valid html attribute. Did you mean '${react_attributes.get(attribute.name)}'?`
}); });
} }

@ -1,7 +1,7 @@
[ [
{ {
"code": "use-the-platform", "code": "invalid-html-attribute",
"message": "'className' is not a valid html attribute. Did you mean 'class'? If you are a recovering React developer, remember, Svelte actually uses the web platform.", "message": "'className' is not a valid html attribute. Did you mean 'class'?",
"pos": 5, "pos": 5,
"start": { "start": {
"character": 5, "character": 5,
@ -15,8 +15,8 @@
} }
}, },
{ {
"code": "use-the-platform", "code": "invalid-html-attribute",
"message": "'htmlFor' is not a valid html attribute. Did you mean 'for'? If you are a recovering React developer, remember, Svelte actually uses the web platform.", "message": "'htmlFor' is not a valid html attribute. Did you mean 'for'?",
"pos": 35, "pos": 35,
"start": { "start": {
"character": 35, "character": 35,

Loading…
Cancel
Save