microsoft / vscode-typescript-tslint-plugin

VS Code extension that provides TSLint support using the typescript-tslint-plugin
https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin
MIT License
188 stars 35 forks source link

Revert "Use find": Fixes scenarios where "fix all" doesn't fix anything #96

Closed lawrence-yu closed 5 years ago

lawrence-yu commented 5 years ago

Take the following scenario:

Current problem

With the change to find, this block will short-circuit and return undefined when processing the first tslint diagnostic without any matching code actions. This means that it will not end up checking the later tslint diagnostics that do have the expected code action. And then since this returns undefined, nothing ends up fixed.

This pull request reverts that change to .find, going back to the .filter logic that correctly proceeded to check further diagnostics when no matching code actions are found.

Potentially related issues

76

mjbvz commented 5 years ago

Thanks!