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

Linting support in vscode #2095

Closed
wemeetagain opened this issue Sep 30, 2023 · 6 comments · Fixed by #2109 or #2122
Closed

Linting support in vscode #2095

wemeetagain opened this issue Sep 30, 2023 · 6 comments · Fixed by #2109 or #2122
Labels
need/triage Needs initial labeling and prioritization

Comments

@wemeetagain
Copy link
Member

  • Version:
    latest master

  • Platform:
    linux

  • Subsystem:
    IDE support

Severity:

?

Description:

My linter is not properly configured, so I can't see linter errors in vscode.
Does anyone else have it working? Are there any specific steps I need to get it working?

Steps to reproduce the error:

  • Open root js-libp2p directory in vscode
  • Open a typescript file, see this:
    Screenshot from 2023-09-30 15-04-08
@SgtPooki
Copy link
Member

SgtPooki commented Oct 2, 2023

@wemeetagain it works well for me only when I open the individual packages in vscode. If I open the repositories root in vscode, linting also fails for me

@wemeetagain
Copy link
Member Author

*cries in devex*

@wemeetagain
Copy link
Member Author

@SgtPooki #2109 seems to work for me, can you test locally and see if it works for you?

@achingbrain
Copy link
Member

achingbrain commented Oct 2, 2023

Is this new? I’ve never had this problem in vscode.

@maschad
Copy link
Member

maschad commented Oct 2, 2023

I had this issue as well when opening at the monorepo level, and it was solved by #2109 🤷🏾

achingbrain added a commit that referenced this issue Oct 4, 2023
The project field causes eslint to look up the closest tsconfig.json
when linting ts files instead of always going to the root of the
project to find it.

Reverts #2109
Fixes #2095
@achingbrain
Copy link
Member

Right, so - it's caused by the eslint vscode plugin which I didn't have installed which is why I haven't seen this error.

The fix in #2109 has some problems outlined here - there's a (I think) better fix here: #2122

wemeetagain pushed a commit that referenced this issue Oct 4, 2023
The project field causes eslint to look up the closest tsconfig.json
when linting ts files instead of always going to the root of the
project to find it.

Reverts #2109
Fixes #2095
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
4 participants