Describe the bug
netlify recipes vscode fails to read .vscode/settings.json when it contains comments.
› Error: Could not open VS Code settings file: Unexpected token / in JSON at position 4
I'd recommend using the comment-json npm package instead of native JSON to parse, patch, and stringify settings.json while preserving comments.
Steps to reproduce
- Add
// comment at the top of .vscode/settings.json
- Run
netlify recipes vscode
Environment
System:
OS: macOS 13.1
CPU: (10) arm64 Apple M1 Pro
Memory: 1.86 GB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v18.12.1/bin/yarn
npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
npmPackages:
netlify-cli: 12.5.0 => 12.5.0