Last active
January 13, 2024 14:58
-
-
Save SamuelMwangiW/d1ae4dae443cc395b64a34d4b6392107 to your computer and use it in GitHub Desktop.
A Laravel pint config json and Github workflow to ensure every push is formated uniformly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check & fix styling | |
| on: [push] | |
| permissions: | |
| contents: write | |
| jobs: | |
| pint-fixer: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| - name: Install Dependencies | |
| run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
| - name: Run Pint | |
| run: ./vendor/bin/pint --test | |
| # - name: Commit changes | |
| # uses: stefanzweifel/git-auto-commit-action@v4 | |
| # with: | |
| # commit_message: Fix styling |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "preset": "psr12", | |
| "rules": { | |
| "single_quote": { | |
| "strings_containing_single_quote_chars": true | |
| }, | |
| "blank_line_before_statement": { | |
| "statements": [ | |
| "break", | |
| "continue", | |
| "declare", | |
| "return", | |
| "throw", | |
| "try" | |
| ] | |
| }, | |
| "declare_strict_types": true, | |
| "not_operator_with_successor_space": true | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment