-
Notifications
You must be signed in to change notification settings - Fork 10
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
Generate string literal types for configs #740
Conversation
🦋 Changeset detectedLatest commit: 71e159a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Thank you for this PR!
That file is automatically updated by tools/update-rulesets.ts
, so could you please fix that as well?
Also, if there is a similar problem in lib/configs/rules/all.ts
, could you please fix it as well?
@ota-meshi thanks for the feedback! I've added a |
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.
LGTM! Thank you!
Thanks for the review, merge and publish in I can confirm that this fixed the type error mentioned above with |
Hi there, first of all thanks for this ESLint plugin, great to learn about regular expression antipatterns!
Using the
tseslint.config()
config helper function fromtypescript-eslint
leads to an error:Error message:
This is because the types for
typescript-eslint
require a string of'error'
,'off'
or'warn'
To avoid the type mismatch when using
typescript-eslint
, this PR aims to generate string literal config property values instead of the current property values ofstring