-
Notifications
You must be signed in to change notification settings - Fork 14
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
ESLint Errors/Warnings Not Showing In VS Code #14
Comments
thanks for reporting this! looking into it |
I think the issue here is that the files are untracked, which means they won’t be linted. |
The errors don't show up for the tracked files either. They do show up in the shell when trying to commit, and it works perfectly at that time. Just not in VS Code when editing the file. |
I've released a new (alpha) version: https://www.npmjs.com/package/eslint-plugin-diff/v/1.0.13-0 If it's still not working for you in VSCode, could you please paste your ESLint output? You can copy/paste it from Thanks in advance! |
1.0.13-0 didn't change anything for me. The output from ESLint -
Let me know if I can help in any way. I made changes that should throw up linting errors in both tracked and untracked files. The errors get flagged to prevent the commit, but they still don't show up in VS Code. |
Hi! Please try https://www.npmjs.com/package/eslint-plugin-diff/v/1.0.13-3 I think the reason we got this bug was because the ESLint plugin for VSCode is a long-running process. I was able to replicate the issue locally and it should be fixed now. Please give it a try and let me know if it works. Note: because the plugin is using git under the hood, it won’t be able to start showing the linter errors until after you’ve saved your file. |
On initial testing, it doesn't seem to be fixed. 😞 |
Still no change in behaviour for me 😓 |
Hi @paleite , I tested the latest version (1.0.13-4) but at least on my side the wrong behaviour is still there. I noticed that if I change a line (introducing an error) and then save the file, VSC plugin does not highlight the error. Then if I restart the ESLint server (from VSC) it starts to show the issue on the IDE. Could it be a cache issue maybe? |
Same with 1.0.13-4 {
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
"plugin:react/recommended", // see https://github.com/jsx-eslint/eslint-plugin-react#configuration. React good practices
"plugin:diff/diff" // see https://github.com/paleite/eslint-plugin-diff. Lint only changed files.
],
"settings": {
"react": {
"version": "16.9"
}
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
// HACK: one day, enable those rules
"@typescript-eslint/explicit-member-accessibility": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-unused-vars": 0
}
} |
Work now in 1.0.15 |
To me it is sill not working. My staging area is empty and VSC shows me linting errors in files that are not touched at all. Same if I change a file introducing some linting issues, save it and the VSC linter does not show me anything. I can see from VSC logs that the plugin is correctly activated but for some reasons it is not working as it will when we run it from the command line |
@marmaak Which OS are you running? WSL? Which version of the plugin are you running? |
Sure, sorry if I didn't do this before, my bad:
This is my VSC logs. I started from a clean situation, then I introduced a long line that should be linted (I even tried to save the file). If a turn the plugin off the error appears properly the IDE |
I can try to debug it if you give a reproducible repo ;) |
Yes, if you could provide a repository for us to debug, that would be immensely helpful. Could you create a Codespace on GitHub which reproduces the issue? And thanks for your patience. I know how frustrating it can be when something doesn't work properly and it's hard to reproduce. |
I have the same issue. Eslint plugin for vscode starts highlighting errors if I Restart Extension Host UPD: But through few seconds it fails again UPD: In same time eslint-webpack-plugin shows errors correctly |
I have the same issue as @skycrazyk 's. |
@IsLand-x could you provide me with a reproduction repo, so i can debug it and finally find a fix for this? It's really annoying that it's been an issue for so long. i wanna make sure my plugin works well for you, as well! |
@paleite I think i find the bug in the source code. If you're not urgent, I'll try to make a pr to fix it this weekend. The simplest way to fix the bug is NOT to cache the untracked file list when get the processor. Instead, getting untracked file every time preprocess the text. (To get better performance, can cache the file list here) |
I'll provide a minimal reproduction repo late when I arrive home today. I'm still working at company now. |
Hey, here's the repo: https://github.com/IsLand-x/eslint-plugin-diff-bug-repoduce |
Heres a pr to fix the bug #27 |
Thanks @IsLand-x for debugging and providing a fix! I've released a pre-release version of it so you can try it out now: And I'll release a stable version soon |
Was trying the new release and the issue is still not fixed. |
Also seeing this issue in the latest version |
restarting eslint server in vs code worked for me |
I'm also facing this issue. Restarting also does not help. |
Mine is a bit different. I see errors fine. No warnings though. And I've checked to make sure in the plugin settings I don't have quiet mode enabled. |
When using the plugin, no warnings show up in the editor at all. The linting does work as expected, but the errors or warnings that show up in the editor disappear completely. I've attached a video of the ESLint errors showing up in VS code when the plugin is not present.
vs-code-eslint-plugin-diff-bug.mp4
The text was updated successfully, but these errors were encountered: