diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts index f31d4fa1e1..42df22767a 100644 --- a/src/compiler/compile/nodes/Element.ts +++ b/src/compiler/compile/nodes/Element.ts @@ -451,8 +451,8 @@ export default class Element extends Node { if (react_attributes.has(attribute.name)) { component.warn(attribute, { - code: 'use-the-platform', - 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.` + code: 'invalid-html-attribute', + message: `'${attribute.name}' is not a valid html attribute. Did you mean '${react_attributes.get(attribute.name)}'?` }); } diff --git a/test/validator/samples/use-the-platform/warnings.json b/test/validator/samples/use-the-platform/warnings.json index e377a98ecf..c382ae0333 100644 --- a/test/validator/samples/use-the-platform/warnings.json +++ b/test/validator/samples/use-the-platform/warnings.json @@ -1,7 +1,7 @@ [ { - "code": "use-the-platform", - "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.", + "code": "invalid-html-attribute", + "message": "'className' is not a valid html attribute. Did you mean 'class'?", "pos": 5, "start": { "character": 5, @@ -15,8 +15,8 @@ } }, { - "code": "use-the-platform", - "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.", + "code": "invalid-html-attribute", + "message": "'htmlFor' is not a valid html attribute. Did you mean 'for'?", "pos": 35, "start": { "character": 35,