This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
eslint #82034
Workflow file for this run
This file contains 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: Format all files nicely | |
# This action works with pull requests and pushes | |
on: | |
push: | |
branches-ignore: | |
- main | |
jobs: | |
prettier: | |
runs-on: ubuntu-latest | |
env: | |
FORCE_COLOR: 3 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
# Make sure the actual branch is checked out when running on pull requests | |
ref: ${{ github.head_ref }} | |
persist-credentials: false | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: package.json | |
- uses: pnpm/action-setup@v2 | |
with: | |
run_install: true | |
- name: Read prettier version | |
id: prettier_version | |
uses: notiz-dev/github-action-json-property@release | |
with: | |
path: package.json | |
prop_path: devDependencies.prettier | |
- name: Prettier | |
uses: creyD/[email protected] | |
with: | |
# Take prettier version from package.json to stay in sync and support upgrades through Renovate | |
prettier_version: ${{steps.prettier_version.outputs.prop}} | |
prettier_options: --write **/*.{js,mjs,css,scss,ts,tsx,md,html,yml,yaml,json} | |
commit_message: squash! Prettier | |
env: | |
GITHUB_TOKEN: ${{ secrets.WRITE_ACCESS_GITHUB_TOKEN }} |