Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ugrades/eslint #19601

Merged
merged 10 commits into from
Oct 26, 2022
Merged

Ugrades/eslint #19601

merged 10 commits into from
Oct 26, 2022

Conversation

ndelangen
Copy link
Member

@ndelangen ndelangen commented Oct 24, 2022

Unblock the TS4.9 upgrade by upgrading to ESlint v8

@kasperpeulen I hope this helps you.

For those trying to review:
99.8% of the changes are just to make TS/ESlint happy.
This commit does the actual upgrade: a889dac

@ndelangen ndelangen self-assigned this Oct 24, 2022
@ndelangen ndelangen added the build Internal-facing build tooling & test updates label Oct 24, 2022
@ndelangen
Copy link
Member Author

@storybookjs/angular Can someone, perhaps @kroeder assist with these errors I'm getting during the build-sandboxes step in CI:

ERR! => Failed to build the preview
ERR! src/stories/frameworks/angular/basics/component-with-ng-content/ng-content-about-parent.stories.ts:32:41 - error TS4111: Property 'color' comes from an index signature, so it must be accessed with ['color'].
ERR! 
ERR! 32       ({ args }) => ({ propsColor: args.color })
ERR!                                            ~~~~~
ERR! 
ERR! src/stories/frameworks/angular/basics/component-with-ng-content/ng-content-about-parent.stories.ts:49:21 - error TS4111: Property 'content' comes from an index signature, so it must be accessed with ['content'].
ERR! 
ERR! 49   template: `${args.content}`,
ERR!                        ~~~~~~~
ERR! 
ERR! src/stories/frameworks/angular/basics/component-with-ng-content/ng-content-simple.stories.ts:24:52 - error TS4111: Property 'content' comes from an index signature, so it must be accessed with ['content'].
ERR! 
ERR! 24   template: `<storybook-with-ng-content><h1>${args.content}</h1></storybook-with-ng-content>`,
ERR!                                                       ~~~~~~~
ERR! 
ERR! src/stories/frameworks/angular/basics/component-without-selector/without-selector-ng-component-outlet.stories.ts:70:17 - error TS4111: Property 'color' comes from an index signature, so it must be accessed with ['color'].
ERR! 
ERR! 70     color: args.color,
ERR!                    ~~~~~
ERR! 
ERR! src/stories/frameworks/angular/basics/component-without-selector/without-selector.stories.ts:22:65 - error TS4111: Property 'color' comes from an index signature, so it must be accessed with ['color'].
ERR! 
ERR! 22       { provide: WITHOUT_SELECTOR_DATA, useValue: { color: args.color, name: args.name } },
ERR!                                                                    ~~~~~
ERR! 
ERR! src/stories/frameworks/angular/basics/component-without-selector/without-selector.stories.ts:22:83 - error TS4111: Property 'name' comes from an index signature, so it must be accessed with ['name'].
ERR! 
ERR! 22       { provide: WITHOUT_SELECTOR_DATA, useValue: { color: args.color, name: args.name } },
ERR!                                                                                      ~~~~
ERR! 
ERR! src/stories/frameworks/angular/core/decorators/theme-decorator/decorators.stories.ts:17:47 - error TS4111: Property 'theme' comes from an index signature, so it must be accessed with ['theme'].
ERR! 
ERR! 17       ({ globals }) => ({ myTheme: `${globals.theme}-theme` })
ERR!        

See: https://app.circleci.com/pipelines/github/storybookjs/storybook/30773/workflows/9c10a080-17a1-44e2-80c5-22b0427ef88c/jobs/431068/parallel-runs/1?filterBy=FAILED

@ndelangen
Copy link
Member Author

@ndelangen
Copy link
Member Author

And this might be a solution:

"compilerOptions": {
// ...
  "noPropertyAccessFromIndexSignature": false,
// ...
}

found on:
https://stackoverflow.com/questions/70106472/property-fname-comes-from-an-index-signature-so-it-must-be-accessed-with-fn

@ndelangen
Copy link
Member Author

@ndelangen ndelangen merged commit fd2ce3f into next Oct 26, 2022
@ndelangen ndelangen deleted the ugrades/eslint branch October 26, 2022 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants