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

Error messages appear multiple times #49

Closed Gelio closed 1 year ago

Gelio commented 5 years ago

I played around with this plugin and I found a bug. Error messages were duplicated multiple times for one failure.

image

image

It does not go away after restarting the workspace or restarting the TS server.

The problem does not occur when using the regular TSLint extension.

Extension version: 0.4.0 Typescript version: 3.2.4 Typescript tslint plugin version: 0.3.0 Tslint version: 5.12.1

mjbvz commented 5 years ago

Can you please share that example code as text

Gelio commented 5 years ago

I deleted that project. I can still extract the code from the screenshot. Here you go:

const array = [
  1,
  2,
  4,
  5,
  6,
  { object: true },
  ['nested array', { another: { one: 1 } }]
];

I do not think this is a problem with just this exact piece of code. I had the same issue with error messages appearing multiple times with other rule violations.

miafoo commented 5 years ago

We've had this happen multiple times as well. Haven't figured out how to reproduce it yet unfortunately.

adamdry commented 5 years ago

Yeah I get this a lot in our project: image

If I run tslint on the cmd line it only lists the errors once each as you would expect.

mjbvz commented 5 years ago

I'm not able to repro this. @Gelio were you on windows? And are you still seeing this with the latest version of this extension (and of the plugin)?

Gelio commented 5 years ago

Yes, that was on Windows. I have not used this extension recently, so I cannot tell with certainty that the problem no longer occurs. I have created a playground for testing this extension: https://github.com/Gelio/vscode-typescript-tslint-plugin-playground

and after a few minutes of testing, the problem no longer occurs and error messages are listed only once.

I will try to work on a typescript project for longer with this extension enabled and let you know how it goes 🙂 I suggest keeping this issue open for now

adamdry commented 5 years ago

@mjbvz I will try and create an example project from my current project which shows the issue and share it. I should have it done by middle of next week.

michaelkolber commented 4 years ago

This is still occurring for me on Windows in all projects. Each error appears 7 times.

ale8k commented 4 years ago

Still happening on windows, some 4 times, some 9 times, it's inconsistent as to what's causing it. Restarting VSC seems to solve it for a couple mins though.

mjbvz commented 1 year ago

Closing as TSLint has been deprecated in favor of ESLint and this extension is no longer being maintained

Please look into migrating to use ESLint and the ESLint VS Code extension