prettier-vscode
prettier-vscode copied to clipboard
Module path can be a dir when loading prettier version
It is possible that the modulePath argument passed to loadPrettierVersionFromPackageJson is already a directory (as stated in the prettierPath documentation). In that case, the upwards lookup should start from that directory - not its parent.
- [x] Run tests
- [x] Update the
CHANGELOG.mdwith a summary of your changes
yeah it'd be really great to get this merged, because currently prettierPath does not work
well, i guess it works if you point it to /prettier/index.cjs - in which case the documentation is incorrect.
Any news? @ntotten
This pull request has been labeled as stale due to inactivity. Reply to keep this pull request open.
:U
Bad bot!
@enisdenjo thanks for contributing this!
@ntotten we'd love to see this merged. We've got branches of our repo on 2.8.8 and 3.1.1, and we'd love to be able to use the same VSCode workspace settings for both versions.
Right now, we have to use this for 3.1.1
{
"prettier.prettierPath": "${workspaceFolder}/path/to/node_modules/prettier/index.cjs"
}
And this for 2.8.8
{
"prettier.prettierPath": "${workspaceFolder}/path/to/node_modules/prettier/"
}
This pull request has been labeled as stale due to inactivity. Reply to keep this pull request open.
Please merge...