tide icon indicating copy to clipboard operation
tide copied to clipboard

tide-fix and typescript-tslint-plugin

Open jupl opened this issue 7 years ago • 0 comments

When submitting issues to this project, please include the following information.

Checklist

  • [x] I can reproduce the problem with the latest version of the relevant packages.
  • [x] I have searched both open and closed issues and cannot find a duplicate.
  • [x] The problem still occurs after I issued M-x tide-restart-server in the buffer where I had the problem.
  • [x] I verified that the version and the configuration file path reported by M-x tide-verify-setup are correct.
  • [x] If tide is reporting an error or warning I think should not be reported, I can run tsc (and tslint, if applicable) without the error or warning I'm seeing in tide.
  • [x] If tide is not reporting an error or warning I think should be reported, tsc (or tslint, if applicable) reports the error or warning I was expecting to see.
  • [x] I am positive the problem does not belong to typescript-mode or tsserver.

Relevant Version Numbers

  • Tide: 20181025.1201
  • TypeScript: 3.1.6
  • Emacs: 26.1

(The list above is minimal. Make sure to include any other version numbers relevant to your report.)

Steps to Reproduce the Bug

I have been using this plugin to view TSLint violations in different editors, and for me it works better with a project over Flycheck. I noticed that there is a tide-fix command and when I run it I do get options to fix the command under the cursor.

screen shot 2018-11-22 at 9 07 30 pm

If I select a or s then the fixes work as expected.

screen shot 2018-11-22 at 9 07 40 pm

However, in the scenario below where I have multiple violations:

screen shot 2018-11-22 at 9 09 29 pm

When I try to fix violations I get unexpected results:

screen shot 2018-11-22 at 9 09 39 pm

I have not gotten this issue with other editors so I can't say it's necessarily it's because of the typescript-tslint-plugin. I'm suspecting that tide own formatting fixes could be interfering.

Also, it would be nice if I can invoke these fixes without having to move my cursor under an error in question.

jupl avatar Nov 23 '18 03:11 jupl