-
Notifications
You must be signed in to change notification settings - Fork 101
Add obsolete rule converter #1063
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
Add obsolete rule converter #1063
Conversation
Used for prefer-inline-decorators and import-destructuring-spacing converters
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.
Love it. Just the one request, I think it's a little odd to use ""
when what we really want is for the rule name to not exist.
expect(result).toEqual({ | ||
rules: [ | ||
{ | ||
ruleName: "", |
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.
Ha, I guess it does make sense that we would want to output something that has no output rule.
How difficult would it be to make the ruleName
an optional string?
ruleName: "", |
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.
I was awaiting for your suggestion, I guess there is no harm making it optional? :D Haven't tried it and got lazy at the time being.
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.
@KingDarBoja do you plan on adding that in? I can if you don't have the time!
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.
Hmm, I'm playing around with this and it looks like it's a non-trivial. In convertRules.ts
the output rules
from the converters are stored in a converted
map that stores by output ESLint name.
I'll try spinning up a changeset that shows not outputting any output ESLint rules
for obsolete TSLint inputs.
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.
Thanks!
#1148 was merged; closing this in favor of it. Thanks! |
Used for prefer-inline-decorators and import-destructuring-spacing converters
PR Checklist
status: accepting prs
Overview
Also includes a obsolete rule function and test stub for making it easier to use.