Code Monkey home page Code Monkey logo

Comments (7)

creyD avatar creyD commented on July 20, 2024 2

I think it would be best to let users specify which plugins they want to install..

from prettier_action.

creyD avatar creyD commented on July 20, 2024

Sounds cool, if you want you can create a PR for this!

from prettier_action.

infotexture avatar infotexture commented on July 20, 2024

Parameterizing this might be beyond my ken, but I'll try to put something together and submit for your review.

from prettier_action.

creyD avatar creyD commented on July 20, 2024

Can you provide me with step by step instructions what needs to be done to achieve this?

from prettier_action.

infotexture avatar infotexture commented on July 20, 2024

Prettier plug-ins are installed like Prettier itself, so where you do that on Line 32 of entrypoint.sh, you'd need to add the plug-ins to the list of things to install, like plugin-xml:

 npm install --silent --global prettier @prettier/plugin-xml

But I'm not sure whether you'd want to install all the official plugins, or how to best allow users to specify which plugins they want to install. 🤔

from prettier_action.

stemount avatar stemount commented on July 20, 2024

@creyD @infotexture for sure, checked out the PR.

It'd need to be something that ideally did a regex on another env variable such as...

jobs:
    prettier:
        runs-on: ubuntu-latest

        steps:
            - name: Checkout
              uses: actions/checkout@v2
              with:
                  # Make sure the actual branch is checked out when running on pull requests
                  ref: ${{ github.head_ref }}
                  # This is important to fetch the changes to the previous commit
                  fetch-depth: 0

            - name: Prettify code
              uses: creyD/[email protected]
              with:
                  # You'd wanna ensure this worked out as a nice simple regex
                  # e.g (@prettier\/)+(plugin-[a-z\-]+)
                  plugins:
                      - plugin-xml

from prettier_action.

stemount avatar stemount commented on July 20, 2024

oh damn, I forgot to change the issue to add regex

(@prettier\/)+(plugin-[a-z\-]+)

as suggested to ensure that the plugin could not "expand" out of this other than dashes and a-z chars.

from prettier_action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.