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

Does not activate if package.json is in a subdirectory #18

Closed
jasononeil opened this issue Aug 17, 2016 · 6 comments
Closed

Does not activate if package.json is in a subdirectory #18

jasononeil opened this issue Aug 17, 2016 · 6 comments

Comments

@jasononeil
Copy link

Hey thanks for the plugin!

I have a project repo which is structured:

/
/application <- PHP files
/angular <- JS files
/angular/package.json

If I open ./angular/ as the VSC workspace then the linter works correctly. But if I open the main repo, the linter doesn't seem to activate at all, with no error message given. Is there any way I can look into what's going on?

If a patch would be needed to support this I'm happy to give it a go!

@SamVerschueren
Copy link
Collaborator

Thanks for reporting this. You are right that it's not working at the moment. It was reported in the VSCode ESLint repository as well microsoft/vscode-eslint#32. These projects are quite similar. I would be happy to receive a good PR but I'm not sure if it's that easy to do.

@wmertens
Copy link

as a workaround, you can symlink your node_modules and package.json in the project root, that makes it work for now but of course clutters your git status.

@wmertens
Copy link

@SamVerschueren You can use the pkg-dir package to find the directory containing the nearest package.json, but it seems that your extension assumes a single xo that applies to the whole repo.

I think the extension will need to look up the xo from the correct pkgdir on every call, maybe keeping a cache if that gets slow.

@oscar-b
Copy link

oscar-b commented Mar 22, 2017

Any update on this issue? The linked microsoft/vscode-eslint#32 issue is solved already.

I'm also seeing this error from the plugin:

[Error - 00:47:00] Request textDocument/codeAction failed.
  Message: Unhandled method textDocument/codeAction
  Code: -32601 

@thiagodebastos
Copy link

Same issue here:

[Error - 14:41:14] Request textDocument/codeAction failed.
  Message: Unhandled method textDocument/codeAction
  Code: -32601 

@SamVerschueren
Copy link
Collaborator

Tracking that issue here #28 now as it is unrelated to this one.

I'm all open for help on this issue as I don't really have much time to look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants