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 opt-in flag to convert tslint:disable
comments to eslint-disable
#136
Comments
@JoshuaKGoldberg I think I have a basic setup but not sure how to test it without relying on making a separate test file since I am not confident if it gonna work. You can check out this branch what I have done so far. |
@KingDarBoja That looks like a great start. Now that you mention it, it does seem like a For testing it, a good start might be to try splitting
YMMV. Btw, maybe |
@JoshuaKGoldberg Don't worry, I made it from the current source code by calling the I will push new changes in few minutes, ahd to fix the regex pattern and the source dirname, in the meantime, look at the output: I am properly extracting the source file regex match and I do have some information of where the comments are located. Just as extra info, my test file is a copy-paste of the |
it's so beautiful |
I fixed already the regex pattern, at the end, had to play a little with it because I am not so skilled with it. Now we get the proper Now the next thing would be the rule change logic and overwriting the file with the proper path (which looks like it is not being taken into account). Cheers! |
Oh hey I just stumbled upon https://github.com/sunnyone/tslint-comment-to-eslint. That's a really nifty package, and really impressive in its brevity. FYI @sunnyone! |
Per a comment in sourcegraph/sourcegraph#5072 - it'd be swell to automate that process as well.
tslint-to-eslint-config
already has data from rule mergers, so when the config is generated, mapping throughtslint-disable
comments can use the same information generated by them.Existing Behavior
Nothing happens.
Change Proposal
Add an optional CLI flag that takes in a glob or globs of source files to convert, and changes
tslint:disable-next-line: no-floating-promises
to the equivalenteslint-disable-next-line: @typescript-eslint/no-floating-promises
lines.The text was updated successfully, but these errors were encountered: