feat(vscode): add workspaceRoot config option to enable use in a VSCode workspace that does not have package.json at the workspace root#1667
Conversation
workspaceRoot config for VSCode open in non-root workspaceworkspaceRoot config option to customize workspace root
workspaceRoot config option to customize workspace rootworkspaceRoot config option to enable opening a VSCode workspace that does not have package.json at the workspace root
workspaceRoot config option to enable opening a VSCode workspace that does not have package.json at the workspace rootworkspaceRoot config option to enable use in a VSCode workspace that does not have package.json at the workspace root
2842c6f to
1803f9f
Compare
67650e2 to
c226a72
Compare
|
Thanks for PR! Agreed this is good to have. Took the time to dive into the VS Code extension, and this is a slightly more minimal version. Can you please confirm this works for you as well? |
commit: |
|
@webpro thanks, lgtm. I had to make a slight adjustment to the reproduction code workspace file, setting when opening the workspace from the file. |
|
The settings you've changed in the fixture are both default values. Can you please verify this version works with only the |
|
You are correct. I did not realize that my user level vscode settings were set and overriding the default values for Removing those user level settings resulted in this working as-is. I have reverted the workspace file settings from 96b6f0e. |
|
Thanks Albert! 🚀 |
…Code workspace that does not have package.json at the workspace root (#1667)
Problem
When opening a VSCode workspace of the following structure with the extension, where the workspace root does not contain a package manifest file
Knip will fail with
Solution
This adds a
workspaceRootoption to the VSCode settings config to specify a knip root other than the currently open VSCode workspace.This config:
Yields