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

Can't get it to work with xo #30

Open
tommy-mitchell opened this issue Sep 19, 2023 · 3 comments
Open

Can't get it to work with xo #30

tommy-mitchell opened this issue Sep 19, 2023 · 3 comments

Comments

@tommy-mitchell
Copy link

I'm trying to format with xo using this plugin, but it seems like xo is never being called.

Minimal config:

{
	"excludes": ["**/node_modules"],
	"plugins": [
		"https://plugins.dprint.dev/typescript-0.87.1.wasm",
		"https://plugins.dprint.dev/exec-0.4.3.json@42343548b8022c99b1d750be6b894fe6b6c7ee25f72ae9f9082226dd2e515072"
	],
	"exec": {
		"commands": [{
			"command": "xo --fix --stdin --stdin-filename={{file_path}}",
			"exts": ["js", "jsx", "ts", "tsx"]
		}]
	}
}

Minimal repro: https://github.com/tommy-mitchell/dprint-repro-exec-xo

@Silic0nS0ldier
Copy link
Sponsor

Try using associations instead of exts. I'm unable to reproduce the issue with your repro, however I have observed the reported behaviour in a separate repo.

@tommy-mitchell
Copy link
Author

I was still able to reproduce my repro locally, but the associations option worked perfectly, thanks!

@tommy-mitchell
Copy link
Author

Hm, so weirdly enough, this works great from the CLI (dprint fmt foo.js), but the VS Code extension gives the error:

[ERROR] Error formatting text. Error: Cannot start formatter process: No such file or directory (os error 2)

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

No branches or pull requests

2 participants