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 through tslint-disable comments can use the same information generated by them.
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 equivalent eslint-disable-next-line: @typescript-eslint/no-floating-promises lines.
The text was updated successfully, but these errors were encountered:
@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.
@JoshuaKGoldberg Don't worry, I made it from the current source code by calling the node ../tslint-to-eslint-config/bin/tslint-to-eslint-config -c command on some test folder and so far, I am getting the comments but still dealing with the for loop logic.
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 convertComments code with some tslint comments 😆