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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ethanwu10
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant