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

Do not lint outside current project workspace directory #1805

Open
sequencerr opened this issue Mar 11, 2024 · 2 comments
Open

Do not lint outside current project workspace directory #1805

sequencerr opened this issue Mar 11, 2024 · 2 comments
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities
Milestone

Comments

@sequencerr
Copy link

Maybe related: #196
https://www.reddit.com/r/learnjavascript/comments/xsiowg/i_need_some_help_configuring_my_eslint_correctly/
https://stackoverflow.com/questions/49422058/vscode-eslint-not-ignoring-directory

The problem is that extension keeps linting files outside current project's root directory.
For example if I have
D:\projects\A (vscode cwd) ${workspaceFolder}
D:\projects\B (eslint config defined) (and a file opened in A project)

@dbaeumer dbaeumer added feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities labels Mar 12, 2024
@dbaeumer dbaeumer added this to the Backlog milestone Mar 12, 2024
@dbaeumer
Copy link
Member

This can only be behind an option since the current behavior is intended.

@sequencerr
Copy link
Author

sequencerr commented Mar 12, 2024

This can only be behind an option since the current behavior is intended.

Would glad too see it as an option.

  • In my opinion ide may be ide for current project, not when you just open file to view it.
  • While you work on project A, you might not want to fix problems in others.
  • It's also weird that of course it does not respect B/.vscode/settings.json (where I configured eslint to be silent).
  • Also not sure about performance, just imagining how opening single from each other project would load eslint.config and applying all rules while some (like imports resolving) cannot be accurately linted without whole project structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

2 participants