fix most of the autoFix issues using TSLint 4.0#138
fix most of the autoFix issues using TSLint 4.0#138rlasjunies wants to merge 1 commit intomicrosoft:masterfrom rlasjunies:master
Conversation
|
@rlasjunies thanks for looking into this. Regarding
sigh, tslint broke the API between version 4.0.1 and 4.0.2 palantir/tslint#1789. I'll try to work around it. |
|
that pretty good, I've seen you have fixed the innerText and the "error". For the no_var_keyword, I think we need time to fix it. I do not understand what is provided by tslint innerReplacements. Do you know what is expected when there are several several records in the innerReplacements array. In all the case, I believe it better to publish the fixes as they support the other autoFix rules from tslint 4.0 ( even import-ordered ). |
|
@rlasjunies I've manually merged the changes, thanks 🌷 The tslint-tests are good, we should look into automating these tests. I'll look into this.
From looking at how the replacements are constructed for some rules in tslint I assume that the idea is that the replacements are applied in sequence. This means we need support creating multiple edits in record actions. Applying multiple (non-overlapping) edits is supported by the editor. I agree that we should publish this improved version. I'll do so today. Closing this PR. |
Hi @egamma
Here is a proposal of fix for most of the autoFix issue identified since TSLint 4.0. #135
Actions done:
tslint-testsat the root of vscode-tslint to collect some tests cases used in these daysRemaining activities identified:
no-var-keywordstill not supported. This autoFix need more work in the alogrithm. This is the only one not working. => To Do : support multiple inner replacementsI let you have trial on this proposal, it should help.
BR