Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer working for recent ESLint and TS extensions #4

Open
ADTC opened this issue Jul 2, 2024 · 9 comments
Open

No longer working for recent ESLint and TS extensions #4

ADTC opened this issue Jul 2, 2024 · 9 comments

Comments

@ADTC
Copy link

ADTC commented Jul 2, 2024

I made a change that should have obviously created errors in multiple files, but when I run the extension, it doesn't open the files with errors. If I open the files manually, they are showing errors.

It also seems that if I open a file with error manually and close it, then run the extension, it opens that file again, but it still doesn't open other files that I didn't open yet.

VS Code:

Version: 1.90.2
Commit: 5437499feb04f7a586f677b155b039bc2b3669eb
Date: 2024-06-18T22:54:35.075Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Darwin arm64 23.5.0

@marinaglancy
Copy link
Owner

Hello @ADTC , thank you for reporting it.
I was able to reproduce the problem. It looks like something changed in the way VSCode opens files and emits the events. I will look at it ASAP

@marinaglancy
Copy link
Owner

hi @ADTC , I tested it a little more and I noticed that "Bulk problem diagnostics" still reports problems raised by some extensions but it does not show problems raised by eslint extension.

If I roll back the ESLint to version 2.4.4 , then the "Bulk problem diagnostics" works again.

Can you please tell me, which problems are not detected for you? Are they from ESLint or any other extension?

@ADTC
Copy link
Author

ADTC commented Jul 3, 2024

@marinaglancy I'm not sure if it is ESLint. The error (when manually checked) has a ts code which is TypeScript.

image

My ESLint version is 3.0.10 (the VS Code extension) and these are in package.json:

// Dev dependencies:
"@typescript-eslint/eslint-plugin": "^6.18.1",
"@typescript-eslint/parser": "^6.18.1",
"eslint": "^8.56.0",
"typescript": "^5.4.2"

I tried increasing delay to 500 (wow it took 4 minutes to run through 550+ files), but still nothing.

My file limit is 1000, and severity level is 3 (notices) which if I'm right, should include 1 (errors) and 2 (warnings) too.

marinaglancy added a commit that referenced this issue Jul 3, 2024
@marinaglancy
Copy link
Owner

Thank you. This is a problem raised by the 'ts' extension - you can see the name of the extension in the dimmed font after the error message.

I have just released version 1.0.7 of the "Bulk problem diagnostics" extension, see CHANGELOG

I also noticed that it may be necessary to increase the delay, in my case 150ms worked fine but I changed the default to 200ms just in case.

@ADTC
Copy link
Author

ADTC commented Jul 3, 2024

Hmm, I don't have any TypeScript-specific extension in VS Code, although I believe ESLint checks TS errors too? Not sure. As far as I know, TS is only configured in the project and installed as a node module.

Anyway, I'll try the update, though I'm sad that now it would take double the time to run. It was already taking almost a minute for me. :(

Rant: This entire hack would be unnecessary if VS Code just reported all problems without having to open files... Argh!

@marinaglancy
Copy link
Owner

marinaglancy commented Jul 3, 2024

I guess it's vscode.typescript - one of the built-in extensions that come with vscode. You can see all built-in extensions in you filter your extension list by "@builtin" (also there is an item in the extension filters menu).

Try to set the 'delay' setting to lower than 200, ti could work for you.

Yes, it is a hack unfortunately. But at the same time, I know from working on my other extension MDLCode that it would not be possible to constantly analyse all files. It would just take very long time and slow down everything else.

@ADTC
Copy link
Author

ADTC commented Jul 3, 2024

I tried delay 100, which seems to have worked for me and it detected all the problem files. But the visual feedback of opening and closing has increased the time required to be almost double still. (And I don't like having the visual feedback anyway. There's no way to do this without it, I guess?)

@marinaglancy
Copy link
Owner

that's what I had to change, unfortunately. I could not find the way to make eslint/ts extensions report the problems if the file is not actually opened in the tab.

Like I said above, for problems reported by other extensions it still worked

@ADTC
Copy link
Author

ADTC commented Jul 3, 2024

Understood. Maybe the visual feedback could be an option, on by default, but for those not using ESLint/ts they can choose to turn it off if they are only using other extensions. With a note saying the extension would run faster with the option turned off but it wouldn't work correctly for ESLint and TS.

This is just for your consideration.

@ADTC ADTC changed the title No longer working for recent VS Code versions No longer working for recent ESLint and TS extensions Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants