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 34 forks source link

`ordered-imports` causes imports to freak out upon formatting. #46

Closed trulysinclair closed 5 years ago

trulysinclair commented 5 years ago

When you have imports that are out of order, you get this warning: screenshot_11 But if you format the document, your imports become scrambled like this: screenshot_12 This stems from TSLint trying to auto-fix this issue, but for some reason it can't seem to get it right.

I know this extension is expiremental, I'm not complaining at all. Just a simple heads up. Shift+CTRL+O easily fixes this, as long as you run it before formatting.

mjbvz commented 5 years ago

Which VS Code version are you using? VS Code 1.31 (current insiders) fixes a few edge cases that exist in the stable VS Code build.

Also, do you have organize imports on save and/or format on save enabled?

mjbvz commented 5 years ago

Closing as more information is needed to investigate this