Skip to content

[BUG] Community plugin not recognized as valid #78

Closed
@slaght

Description

@slaght

Hello,

First let me just say thank you for being such an active maintainer. This project looks amazing.

I'm trying to set this action up in a repository that hosts a Salesforce project. I'm trying to install prettier-plugin-apex, which is listed under the community plugins section of the official Prettier documentation.
However, the action doesn't seem to recognize this plugin as valid:

Screen Shot 2021-12-07 at 10 39 31 AM

It looks like entrypoint.sh is looking for the plugin string to contain @prettier/... although plugins named prettier-plugin-... are also valid according to Prettier's docs. Is this possible to do via this action or is it unable to install unofficial pugins?

Here is my full action for reference:

name: Prettify Code

on: [pull_request]

jobs:
  prettier:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Repository
        uses: actions/checkout@v2
        with:
          # Incremental diffs require fetch depth to be at 0 to grab the target branch
          fetch-depth: "0"

      - name: Prettify Modified Code
        uses: creyD/prettier_action@v4.1
        with:
          same_commit: true
          only_changed: true
          prettier_plugins: prettier-plugin-apex
          prettier_options: --write --config .prettierrc {html, cls, trigger, apex, cmp, page, component}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions