Resolve FIXME
s related to estree
#74
Annotations
6 errors
src/compiler/transform/index.test.ts#L47
Error: Snapshot `transformStoriesCode > transformed code matches inlined snapshot 1` mismatched
- Expected
+ Received
@@ -4,17 +4,17 @@
Example_stories.filename = 'stories/Example.stories.svelte';
import * as $ from 'svelte/internal/client';
var Example_default = $.add_locations(
- $.template(`<p> </p> <p> </p> <br>`, 1),
- Example_stories.filename,
- [
- [45, 4],
- [46, 4],
- [47, 24],
- ]
+ $.template(`<p> </p> <p> </p> <br>`, 1),
+ Example_stories.filename,
+ [
+ [45, 4],
+ [46, 4],
+ [47, 24],
+ ]
);
var Example_default_1 = $.add_locations($.template(`Label`, 1), Example_stories.filename, []);
var root = $.add_locations($.template(`<!> <!> <!> <!>`, 1), Example_stories.filename, []);
import { action } from '@storybook/addon-actions';
@@ -29,180 +29,179 @@
* * **Bold**,
* * _Italic_,
* * `Code`.
*/
const {Story, meta} = defineMeta({
- title: 'Example',
- component: Example,
- tags: ['autodocs'],
- args: {
- onclick: action('onclick'),
- onmouseenter: action('onmouseenter'),
- onmouseleave: action('onmouseleave')
- },
- parameters: {
- docs: {
- description: {
- component: "Description set explicitly in the comment above `defineMeta`.\n\nMultiline supported. And also Markdown syntax:\n\n* **Bold**,\n* _Italic_,\n* `Code`."
+ title: 'Example',
+ component: Example,
+ tags: ['autodocs'],
+ args: {
+ onclick: action('onclick'),
+ onmouseenter: action('onmouseenter'),
+ onmouseleave: action('onmouseleave')
+ },
+ parameters: {
+ docs: {
+ description: {
+ component: "Description set explicitly in the comment above `defineMeta`.\n\nMultiline supported. And also Markdown syntax:\n\n* **Bold**,\n* _Italic_,\n* `Code`."
+ }
}
}
- }
});
-
function Example_stories($$anchor, $$props) {
- if (new.target === Example_stories)
- throw new Error(
- 'Instantiating a component with `new` is no longer valid in Svelte 5. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more information'
- );
- $.push($$props, true, Example_stories);
+ if (new.target === Example_stories)
+ throw new Error(
+ 'Instantiating a component with `new` is no longer valid in Svelte 5. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more information'
+ );
+ $.push($$props, true, Example_stories);
- var render = $.wrap_snippet(($$anchor, args = $.noop, context = $.noop) => {
- var fragment = $.comment();
- var node = $.first_child(fragment);
+ var render = $.wrap_snippet(($$anchor, args = $.noop, context = $.noop) => {
+ var fragment = $.comment();
+ var node = $.first_child(fragment);
- $.validate_component(Example)(
- node,
- $.spread_props(args, {
- onclick: handleClick,
- children: $.wrap_snippet(($$anchor, $$slotProps) => {
- var fragment_1 = Example_default();
- var p = $.first_child(fragment_1);
- var text = $.child(p);
- var p_1 = $.sibling($.sibling(p, true));
- var text_1 = $.child(p_1);
- var text_2 = $.sibling(p_1, true);
- var br = $.sibling(text_2);
+ $.validate_component(Example)(
+ node,
+ $.spread_props(args, {
+ onclick: handleClick,
+ children: $.wrap_snippet(($$anchor, $$slotProps) => {
+ var fragment_1 = Example_default();
+ var p = $.first_child(fragment_1);
+ var text = $.child(p);
+ var p_1 = $.sibling($.sibling(p, true));
+ var text_1 = $.child(p_1);
+ var text_2 = $.sibling(p_1, true);
+ var br = $.sibling(text_2);
- $.template_effect(() => {
- $.set_text(text, args()?.id);
- $.set_text(text_1, context().name);
- $.set_text(text_2, ` You clicked: ${$.stringify($.get(count))}`);
- });
+ $.template_effect(() => {
+ $.set_text(text, args()?.id);
+ $.set_text(text_1, context().name);
+ $.set_text(te
|
src/parser/analyse/story/attributes/identifiers.test.ts#L92
Error: Snapshot `getStoryIdentifiers > throws when '<Story />' doesn't provide an 'exportName' or 'name' attribute prop 1` mismatched
- Expected
+ Received
- [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0004 (NoStoryIdentifierError): Missing 'name' or 'exportName' attribute (prop) in a '<Story />' definition in the stories file: 'file:///Users/xeho91/Nextcloud/Projects/oss/addon-svelte-csf/invalid.stories.svelte'.
+ [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0004 (NoStoryIdentifierError): Missing 'name' or 'exportName' attribute (prop) in a '<Story />' definition in the stories file: 'file:///home/runner/work/addon-svelte-csf/addon-svelte-csf/invalid.stories.svelte'.
All stories must either have a 'name' or an 'exportName' prop.]
❯ src/parser/analyse/story/attributes/identifiers.test.ts:92:7
|
src/parser/analyse/story/attributes/identifiers.test.ts#L213
Error: Snapshot `getStoryIdentifiers > throws when 'exportName' is not a valid JavaScript variable name 1` mismatched
- Expected
+ Received
- [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0005 (InvalidStoryExportNameError): Invalid attribute 'exportName' value 'default' found in '<Story />' component inside stories file: file:///Users/xeho91/Nextcloud/Projects/oss/addon-svelte-csf/invalid.stories.svelte
+ [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0005 (InvalidStoryExportNameError): Invalid attribute 'exportName' value 'default' found in '<Story />' component inside stories file: file:///home/runner/work/addon-svelte-csf/addon-svelte-csf/invalid.stories.svelte
'exportName' alue must be a valid JavaScript variable name.
It must start with a letter, $ or _, followed by letters, numbers, $ or _.
Reserved words like 'default' are also not allowed (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#reserved_words)]
❯ src/parser/analyse/story/attributes/identifiers.test.ts:213:7
|
src/parser/analyse/story/attributes/identifiers.test.ts#L282
Error: Snapshot `getStoriesIdentifiers > throws on identical 'exportName' attributes 1` mismatched
- Expected
+ Received
@@ -1,6 +1,6 @@
- [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0006 (DuplicateStoryIdentifiersError): Duplicate exportNames found between two '<Story />' definitions in stories file: file:///Users/xeho91/Nextcloud/Projects/oss/addon-svelte-csf/duplicate-identifiers.stories.svelte
+ [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0006 (DuplicateStoryIdentifiersError): Duplicate exportNames found between two '<Story />' definitions in stories file: file:///home/runner/work/addon-svelte-csf/addon-svelte-csf/duplicate-identifiers.stories.svelte
First instance: <Story name={undefined} exportName="SomeExportName" ... />
Second instance: <Story name={undefined} exportName="SomeExportName" ... />
This can happen when 'exportName' is implicitly derived by 'name'.
❯ src/parser/analyse/story/attributes/identifiers.test.ts:282:7
|
src/parser/analyse/story/attributes/identifiers.test.ts#L315
Error: Snapshot `getStoriesIdentifiers > throws on identical 'exportName' attributes when deriving from 'name' attributes 1` mismatched
- Expected
+ Received
@@ -1,6 +1,6 @@
- [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0006 (DuplicateStoryIdentifiersError): Duplicate exportNames found between two '<Story />' definitions in stories file: file:///Users/xeho91/Nextcloud/Projects/oss/addon-svelte-csf/duplicate-identifiers.stories.svelte
+ [SB_SVELTE_CSF_PARSER_ANALYSE_STORY_0006 (DuplicateStoryIdentifiersError): Duplicate exportNames found between two '<Story />' definitions in stories file: file:///home/runner/work/addon-svelte-csf/addon-svelte-csf/duplicate-identifiers.stories.svelte
First instance: <Story name={undefined} exportName="SomeStoryName" ... />
Second instance: <Story name="some story name!!!" exportName="SomeStoryName" ... />
This can happen when 'exportName' is implicitly derived by 'name'.
❯ src/parser/analyse/story/attributes/identifiers.test.ts:315:7
|
|
This job failed
Loading