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

Could ESLint error messages be moved from a popup dialog to the status bar? #1322

Closed
justingrant opened this issue Aug 23, 2021 · 2 comments
Closed
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@justingrant
Copy link

When ESLint encounters an exception, it will show a popup warning box in the IDE which must be manually dismissed by the user. For example, when I typed const on a new line in a JS file, I got an error dialog.

image

image

Obviously ESLint itself or its plugins (e.g. typescript-eslint) has a bug here and shouldn't be crashing. But IMHO it's not good to subject VSCode IDE users to dialogs caused by bugs in linters that most users can't fix, especially when most of these problems fix themselves once the user edits their code to fix the problem that caused ESLint to crash.

The same is true for "can't load config" errors as described in #1182 (comment). The VSCode user can't do anything to fix someone else's code, so putting up an error box isn't helpful.

IMHO, a better UX would be to report errors without requiring the user to dismiss them. Then, even if ESLint is temporarily broken (or broken for just one file), the developer could still keep working without interruption.

The VSCode Prettier extension handles this nicely. Instead of a modal, it shows status using an icon in the status bar, e.g.
image - ignored file
image - OK
image - file can't be parsed

If the user wants to see details behind problems, they can click the status bar to get taken to the output pane to see details.

Could vscode-eslint do something similar?

@dbaeumer
Copy link
Member

The problem is that these errors usually get unnoticed and users then file issues that something is not working. If such an error occurs it usually isn't anything the extension can fix.

In this specific case though we could ignore the error since it is not a setup problem. But sometimes hard to tell.

In general a dup of #1238.

@dbaeumer dbaeumer added the *duplicate Issue identified as a duplicate of another issue(s) label Aug 24, 2021
@justingrant
Copy link
Author

OK, glad it's being tracked over in #1238. I'll merge this content in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

2 participants