avinashkranjan / Friday

🎓 Friday - Your Personal Class Manager Assistant, It'll never let you miss another assignment deadline or upcoming test. https://friday.avinashranjan.com
https://play.google.com/store/apps/details?id=com.avinashkranjan.friday
MIT License
108 stars 153 forks source link

Feat: Enhance your code formatting with prettier Workflow ✨ #310

Closed Nishitbaria closed 1 year ago

Nishitbaria commented 1 year ago

Describe the feature

Description

I would like to propose the addition of a Prettier GitHub Action to our repository. This action will automate code formatting using the Prettier tool, ensuring consistent and standardized code across your project.

Acceptance Criteria:

  1. The Prettier GitHub Action should be added to your repository's workflow.
  2. The action should be triggered on every push and pull request to your repository.
  3. The action should run Prettier with the necessary configuration for your project.
  4. The action should provide a clear and concise output indicating the changes made by Prettier, if any.
  5. The action should fail if there are any Prettier-related errors or if the code needs formatting changes.

GitHub Workflow

name: prettier

on: [push, pull_request]

jobs:

  Linting:

    runs-on: ubuntu-latest

    steps:

      - name: Checkout
        uses: actions/checkout@v3
        with:
          ref: ${{ github.head_ref }}

      - name: Lint code with prettier
        uses: creyD/prettier_action@v4.3
        with:
          prettier_options: --write **/*.{js,md}

Record

avinashkranjan commented 1 year ago

Go Ahead @Nishitbaria