diff --git a/test/validator/samples/tag-custom-element-options-missing/input.svelte b/test/validator/samples/tag-custom-element-options-missing/input.svelte new file mode 100644 index 0000000000..f5f5d74270 --- /dev/null +++ b/test/validator/samples/tag-custom-element-options-missing/input.svelte @@ -0,0 +1 @@ + diff --git a/test/validator/samples/tag-custom-element-options-missing/warnings.json b/test/validator/samples/tag-custom-element-options-missing/warnings.json new file mode 100644 index 0000000000..505f44e5d1 --- /dev/null +++ b/test/validator/samples/tag-custom-element-options-missing/warnings.json @@ -0,0 +1,15 @@ +[{ + "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?", + "start": { + "line": 1, + "column": 16, + "character": 16 + }, + "end": { + "line": 1, + "column": 36, + "character": 36 + }, + "pos": 16 +}] diff --git a/test/validator/samples/tag-custom-element-options-true/_config.js b/test/validator/samples/tag-custom-element-options-true/_config.js new file mode 100644 index 0000000000..b3c6532042 --- /dev/null +++ b/test/validator/samples/tag-custom-element-options-true/_config.js @@ -0,0 +1,3 @@ +export default { + customElement: true, +}; diff --git a/test/validator/samples/tag-custom-element-options-true/input.svelte b/test/validator/samples/tag-custom-element-options-true/input.svelte new file mode 100644 index 0000000000..f5f5d74270 --- /dev/null +++ b/test/validator/samples/tag-custom-element-options-true/input.svelte @@ -0,0 +1 @@ +