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

Import the globally installed version if XO is not locally installed #79

Closed
auxves opened this issue Mar 11, 2020 · 5 comments
Closed
Assignees
Labels

Comments

@auxves
Copy link

auxves commented Mar 11, 2020

I want to use XO with my Deno project, which almost works perfectly, except this extension requires xo to be listed in package.json. Deno doesn't use package.json, so I have to make a couple of new files just to get XO working.

Here is my current workaround, but as you can see, it's very messy and it would be much cleaner if this extension could use the global installation natively.

package.json:

{
  "devDependencies": {
    "xo": "file:.xo.js"
  }
}

.xo.js:

module.exports = require("xo");

Edit: looking back at older issues, it is probably a good idea to add a new option in the VSCode settings that determines if the extension should check for globally-installed versions, just in case you don't want to use XO in a specific project but you have it globally installed.

@spence-s spence-s self-assigned this Jul 31, 2021
@spence-s spence-s mentioned this issue Jul 31, 2021
12 tasks
@darkred
Copy link

darkred commented Aug 30, 2021

Just wanted to mention that since XO v0.41.0 :

XO can no longer be installed globally.
It caused too many problems. Instead, you can run the local XO binary with $ npx xo.

@spence-s
Copy link
Collaborator

spence-s commented Aug 30, 2021

@darkred thanks - I was still thinking of supporting this since it seemed really easy to do... After further thought, I'm not really sure if the use case is valid or not or if it would cause dependency resolution problems.

I don't use deno. @glossnyx is this something that is still desired in the deno community - esp since deno has its own linter/formatter now built in??

@auxves
Copy link
Author

auxves commented Aug 30, 2021

I wouldn't know, I don't use deno/xo anymore.

@spence-s
Copy link
Collaborator

ok - after thought and seeing that this was the only request for this feature, im going to remove this from the roadmap as it doesn't seem useful enough and isn't inline with the xo philosophy.

@spence-s
Copy link
Collaborator

I ended up adding this anyway for my own uses - you can now supply a custom path to an xo/index.js file

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

No branches or pull requests

3 participants