From 3bf68b47655cfa6fa3a9da25a26b860817f49eb8 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 15 May 2024 21:04:44 -0400 Subject: [PATCH] fix: make messages more consistent (#11643) --- .changeset/cyan-ducks-teach.md | 5 +++ .../messages/compile-errors/template.md | 4 +- .../svelte/messages/compile-warnings/a11y.md | 10 ++--- .../messages/compile-warnings/template.md | 4 +- packages/svelte/src/compiler/errors.js | 8 ++-- packages/svelte/src/compiler/warnings.js | 28 ++++++------- .../_config.js | 2 +- .../warnings.json | 16 +++---- .../a11y-img-redundant-alt/warnings.json | 6 +-- .../warnings.json | 42 +++++++++---------- .../warnings.json | 4 +- .../warnings.json | 10 ++--- .../warnings.json | 2 +- .../errors.json | 2 +- .../warnings.json | 6 +-- .../samples/slot-warning/warnings.json | 2 +- .../samples/slot-warning2/warnings.json | 2 +- 17 files changed, 79 insertions(+), 74 deletions(-) create mode 100644 .changeset/cyan-ducks-teach.md diff --git a/.changeset/cyan-ducks-teach.md b/.changeset/cyan-ducks-teach.md new file mode 100644 index 0000000000..e33663e61d --- /dev/null +++ b/.changeset/cyan-ducks-teach.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +fix: make messages more consistent diff --git a/packages/svelte/messages/compile-errors/template.md b/packages/svelte/messages/compile-errors/template.md index 5c7b620125..df80eadbe4 100644 --- a/packages/svelte/messages/compile-errors/template.md +++ b/packages/svelte/messages/compile-errors/template.md @@ -174,7 +174,7 @@ ## mixed_event_handler_syntaxes -> Mixing old (on:%name%) and new syntaxes for event handling is not allowed. Use only the on%name% syntax. +> Mixing old (on:%name%) and new syntaxes for event handling is not allowed. Use only the on%name% syntax ## node_invalid_placement @@ -230,7 +230,7 @@ ## slot_snippet_conflict -> Cannot use `` syntax and `{@render ...}` tags in the same component. Migrate towards `{@render ...}` tags completely. +> Cannot use `` syntax and `{@render ...}` tags in the same component. Migrate towards `{@render ...}` tags completely ## snippet_conflict diff --git a/packages/svelte/messages/compile-warnings/a11y.md b/packages/svelte/messages/compile-warnings/a11y.md index 26023d28f3..490a015693 100644 --- a/packages/svelte/messages/compile-warnings/a11y.md +++ b/packages/svelte/messages/compile-warnings/a11y.md @@ -20,7 +20,7 @@ ## a11y_click_events_have_key_events -> Visible, non-interactive elements with a click event must be accompanied by a keyboard event handler. Consider whether an interactive element such as `