Closed yarick123 closed 1 year ago
@yarick123 I'll take a look. I'm pretty sure I'll have to bundle ESLint and Prettier with the extension and I'd rather not do that. Would installing them globally work?
@yarick123 I think this may do the trick. Run the following inside your project directory:
yarn dlx @yarnpkg/pnpify --sdk vscode
See https://github.com/prettier/prettier-vscode/issues/1502#issuecomment-728376262 for more details
@idahogurl in yarn 3 the command should be yarn dlx @yarnpkg/sdks vscode
, executing the command you sugesst produces the following output:
> yarn dlx @yarnpkg/pnpify --sdk vscode
...
Usage Error: The 'pnpify --sdk ...' command has been moved to the '@yarnpkg/sdks' package - use 'yarn dlx @yarnpkg/sdks ...' instead
And yes, I executed this command before creating the issue :)
@yarick123 I'll take a look. I'm pretty sure I'll have to bundle ESLint and Prettier with the extension and I'd rather not do that. Would installing them globally work?
@idahogurl Unfortunately installing prettier and eslint globally does not help either. The error output was also not changed.
Hmmm... the problem seems to go away after installing esbenp.prettier-vscode
plugin
Hmmm... the problem seems to go away after installing
esbenp.prettier-vscode
plugin
I saw that extension is officially supported by Yarn PnP (see https://yarnpkg.com/getting-started/editor-sdks#tools-currently-supported) I looked through their issues and code and tried to figure out what they did to get it functioning. I found that ticket I linked earlier so I thought that is all they did was run that command.
This issue is stale because it has been open for 14 days with no activity.
@yarick123 Are you sure it's my extension that is formatting the document and not the esbenp.prettier-vscode
extension?
@yarick123 Also, is your project using Yarn workspaces? Or is it a single project?
@idahogurl
@yarick123 Are you sure it's my extension that is formatting the document and not the
esbenp.prettier-vscode
extension? after installing esbenp.prettier-vscode I am not sure, if your plugin does something. Only one thing I am sure is, that the exception is not there any more :)@yarick123 Also, is your project using Yarn workspaces? Or is it a single project? It is a single project
This issue is stale because it has been open for 14 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Can confirm this is an issue with this extension. Tried installing the yarn sdk's for VSCode and installing eslint/prettier globally but it didn't work sadly
If vs-code-prettier-eslint is used with projects managed by yarn 3 in PnP mode, the extension does not work. Here is the output:
Versions:
System Specifications: