diff --git a/packages/textlint/.vscode/tasks.json b/packages/textlint/.vscode/tasks.json index 34395cf..c3085cd 100644 --- a/packages/textlint/.vscode/tasks.json +++ b/packages/textlint/.vscode/tasks.json @@ -6,12 +6,16 @@ // ${fileExtname}: the current opened file's extension // ${cwd}: the current working directory of the spawned process // A task runner that calls a custom npm script that compiles the extension. + +// NOTE: We do not use `"type": "npm"` because VS Code may incorrectly choose the package manager. +// cf. https://github.com/microsoft/vscode/issues/170101 { "version": "2.0.0", "tasks": [ { - "type": "npm", - "script": "tsc", + "label": "npm: tsc", + "type": "shell", + "command": "npm run tsc", "group": "build", "presentation": { "panel": "dedicated", @@ -20,8 +24,9 @@ "problemMatcher": ["$tsc", "$ts-webpack"] }, { - "type": "npm", - "script": "watch", + "label": "npm: watch", + "type": "shell", + "command": "npm --prefix ${workspaceFolder}/../../ run watch", "isBackground": true, "group": { "kind": "build", diff --git a/vscode-textlint.code-workspace b/vscode-textlint.code-workspace index 335a36e..dd8e74b 100644 --- a/vscode-textlint.code-workspace +++ b/vscode-textlint.code-workspace @@ -37,7 +37,8 @@ "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true }, - "typescript.tsdk": "./node_modules/typescript/lib" + "typescript.tsdk": "./node_modules/typescript/lib", + "npm.packageManager": "npm" }, "extensions": { "recommendations": [