diff --git a/.github/workflows/pint.yml b/.github/workflows/pint.yml index 48ffb4a..7fed9c2 100644 --- a/.github/workflows/pint.yml +++ b/.github/workflows/pint.yml @@ -1,16 +1,15 @@ -name: Check & Fix Styling with Pint +name: Lint with Pint on: - push: - branches: [ main ] pull_request: - branches: [ main ] workflow_call: + workflow_dispatch: jobs: pint: name: Run Pint runs-on: ubuntu-latest + steps: - name: Checkout code uses: actions/checkout@v3 @@ -18,9 +17,11 @@ jobs: ref: ${{ github.head_ref }} - name: Run Pint - uses: aglipanci/laravel-pint-action@2.3.0 + uses: aglipanci/laravel-pint-action@latest + with: + verboseMode: true - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "style: apply Pint" \ No newline at end of file diff --git a/pint.json b/pint.json new file mode 100644 index 0000000..e0aa46e --- /dev/null +++ b/pint.json @@ -0,0 +1,19 @@ +{ + "preset": "laravel", + "rules": { + "no_superfluous_phpdoc_tags": true, + "concat_space": { + "spacing": "one" + }, + "single_quote": true, + "combine_consecutive_issets": true, + "combine_consecutive_unsets": true, + "explicit_string_variable": true, + "global_namespace_import": true, + "single_trait_insert_per_statement": true, + "ordered_traits": true, + "types_spaces": { + "space": "single" + } + } +} \ No newline at end of file