-
Notifications
You must be signed in to change notification settings - Fork 13
chore: fixed XO warning #5523
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
chore: fixed XO warning #5523
Conversation
All imports in the declaration are only used as types. Use `import type`. (@typescript-eslint/consistent-type-imports)XO@typescript-eslint/consistent-type-imports
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes an XO linting warning by converting a regular import to a type-only import for StorybookConfig in the Angular storybook configuration file. The change ensures that the import statement correctly indicates that StorybookConfig is only used as a type annotation.
Key Changes
- Modified the import statement in
storybooks/angular-storybook/.storybook/main.tsto use a type-only import forStorybookConfig
| @@ -1,4 +1,4 @@ | |||
| import { StorybookConfig } from '@storybook/angular'; | |||
| import { type StorybookConfig } from '@storybook/angular'; | |||
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax import { type StorybookConfig } is inconsistent with all other storybook configuration files in the repository. All other main.ts files in storybooks use import type { StorybookConfig } instead:
storybooks/_storybook/.storybook/main.ts:import type { StorybookConfig }storybooks/react-storybook/.storybook/main.ts:import type { StorybookConfig }storybooks/vue-storybook/.storybook/main.ts:import type { StorybookConfig }
Both syntaxes are valid TypeScript, but for consistency with the rest of the storybook files, please use import type { StorybookConfig } instead of import { type StorybookConfig }.
| import { type StorybookConfig } from '@storybook/angular'; | |
| import type { StorybookConfig } from '@storybook/angular'; |
Proposed changes
Types of changes
Further comments
🔭🐙🐈 Test this branch here: https://design-system.deutschebahn.com/core-web/review/chore-corrected-import