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

Type configs using literal types #182

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

ethanwu10
Copy link
Contributor

Issue: #181

What Changed

By using as const on the string values for each of the rule configs, we ensure that the generated rules have string literal types matching their configured values. This allows it to satisfy the types required by the ESLint config type, which requires 'error' | 'warn' | 'off' | ...

Checklist

Check the ones applicable to your change:

  • Ran pnpm run update-all
  • Tests are updated
  • Documentation is updated

Change Type

Indicate the type of change your pull request is:

  • maintenance
  • documentation
  • patch
  • minor
  • major

By using `as const` on the string values for each of the rule configs,
we ensure that the generated rules have string literal types matching
their configured values.

Fixes storybookjs#181
Copy link
Contributor

@kasperpeulen kasperpeulen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yannbf yannbf added the patch Increment the patch version when merged label Nov 19, 2024
@yannbf yannbf merged commit b498e99 into storybookjs:main Nov 19, 2024
Copy link

🚀 PR was released in v0.11.1 🚀

@github-actions github-actions bot added the released This issue/pull request has been released. label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants