Coder Social home page Coder Social logo

prettier_action's Introduction

GitHub Prettier Action

CodeFactor code style: prettier License MIT Latest Release Contributors Issues

A GitHub action for styling files with prettier.

Usage

Parameters

Parameter Required Default Description
dry False Runs the action in dry mode. Files wont get changed and the action fails if there are unprettified files.
prettier_version False Specific prettier version (by default use latest)
prettier_options --write **/*.js Prettier options (by default it applies to the whole repository)
commit_options - Custom git commit options
commit_message Prettified Code! Custom git commit message
file_pattern * Custom git add file pattern
branch (depreciated with 3.0) - Always set this to ${{ github.head_ref }} in order to work both with pull requests and push events

Example Config

name: Continuous Integration

# This action works with pull requests and pushes
on:
  pull_request:
  push:
    branches:
    - master

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 }}

    - name: Prettify code
      uses: creyD/[email protected]
      with:
        # This part is also where you can pass other options, for example:
        prettier_options: --write **/*.{js,md}

More documentation for writing a workflow can be found here.

Issues

Please report all bugs and feature request using the GitHub issues function. Thanks!

prettier_action's People

Contributors

creyd avatar spawnia avatar tombarta avatar

Watchers

 avatar  avatar

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.