-
-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
add paths option to vti diagnostics #2825
Conversation
Maybe clarify how to pass multiple files? Separate paths with some delimiter or specify multiple |
Hum... no. It accepts an array of files. So you can do Or you prefer another API maybe? |
Are you sure that even works? Typically in CLIs only one value is allowed for each option. So you would have to quote the value if you would want to include spaces in the value. So I think that's not clear as it's against my expectations how CLIs work, at least.
I'll leave the final decision to the project owners. |
And since an optional |
Yep, it works, it was running fine locally. For the workspace I was putting it before the vti diagnostics src/ --files a.vue b.vue c.vue It's a valid behavior of commander: https://github.com/tj/commander.js#variadic-option But you're right. I'm not sure of what to do, I need guidance here. Let me know how the API should look like 🙂 |
From commander's documentation, you can also use the special argument vti diagnostics --files a.vue b.vue c.vue -- src/ |
Ultimately it's up for module owners to decide but if it's supported by the CLI library used then I guess it's fine. But I think the new option should be at least documented in https://github.com/vuejs/vetur/blob/master/docs/guide/vti.md, if not in the CLI itself. |
Also, it's maybe not clear what's the interaction when both the I mean:
and then maybe one could also specify both directories and files together:
|
With this syntax, how to distinguish the workspace from the first file? With the
And with this one, it might suggest that you can more than one workspace, no? Which isn't supported in VTI. Or that you can mix files and folders? If this is the preferred way, I'm fine with it. Should I update the PR? Or should I wait for the project owner's feedback as you suggested once? |
Maybe don't listen to me but wait for owners of the code. |
I think it would be nice to be consistent with the ESLint CLI. Thank for your PR. 👍 |
I've updated the PR to try to match ESLint syntax, as suggested. I haven't implemented the glob syntax, though.
From my understanding, VTI can't work without a workspace, right? Because it needs to find the Now after the workspace, you can add a list of files and/or directories. Their paths are relative to the workspace.
What do you think? |
It's well. |
Hi. Is there anything I can do to help move this topic forward? 😄 |
LGTM, I merged it. |
Resolves #2455
vti diagnostics --files src/App.vue src/Form.vue
to run VTI only on those two files