Skip to content

[Bug?] Symlink'd plugins in node_modules are not auto detected. #8056

@benallfree

Description

@benallfree

Environments:

  • Prettier Version: 2.0.4
  • Running Prettier via: VSCode, CLI
  • Runtime: Node 12.16.2
  • Operating System: OS X

Steps to reproduce:

  1. Use npm to install prettier-plugin-organize-imports
  2. Run prettier foo.txs
  3. Observe that imports are correctly organized

This time, use pnpm which uses symlinks instead of copying packages to node_modules:

  1. Use pnpm to install prettier-plugin-organize-imports
  2. Run prettier foo.tsx from the command line
  3. Observe that imports are NOT organized

Now, add the plugin explicitly to package.json:

  "prettier": {
    "plugins": [
      "./node_modules/prettier-plugin-organize-imports"
    ]
  }

Repeat step 2 above and observe that plugins are now organized.

Expected behavior:

Symlink'd plugins in node_modules are auto detected.

Actual behavior:

Symlink'd plugins in node_modules are not auto detected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiIssues with Prettier's Application Programming Interfacearea:plugin apilocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions