-
Notifications
You must be signed in to change notification settings - Fork 334
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
Add option for project level diagnostics #323
Conversation
This reverts commit 0cf66e9.
@i328638 thanks a lot for the PR. I looked at it and I think project level diagnostics would be cool for ESLint. However they way it is implemented will not scale very good since you read all files into memory (and this even happens sync) on server start. The ESLint API offers to validate files using a path. It even offers wild card support. So if we implement such a feature it should make used of the ESLint API. In addition VS Code settings like |
@dbaeumer , Can you please give me some more information of the files.exclude settings? |
I looked at the code and we should clearly separate project validation from single file navigation. For example the setting validateProject should not be a TextDocumentSettings since it is a global setting. And the triggering of a project validation shouldn't be faked as a TextDocument validation. Here is how I as a user would expect project validation to work:
Can you check your implementation how it will behave in the above user scenarios. The setting I was referring is |
}); | ||
validateMany(documents.all()); | ||
} | ||
if(projectValidationUri && fsPath.indexOf(".eslintrc") !== -1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe the file name should be exactly .eslintrc and not contain
In addition I noticed lately that ESLint does some cross file checking on imports. This complicates things a lot for proper project validation since we would need to build a dependency graph to proper solve this efficiently on typing. |
@dbaeumer does it mean that eslint LSP shouldn't be considered as a single file anymore but as a language with project system? |
@amiramw yes that would be the consequence. |
Hi, any updates on the PR? |
Hi, Thanks, |
There are a couple of things that have changed which we need to take into consideration
|
I will close the PR since it doesn't have any traction. Please ping if you want to continue working on this. |
No description provided.