CIでPrettierを実行する
非公式ベータ版翻訳
このページは PageTurner AI で翻訳されました(ベータ版)。プロジェクト公式の承認はありません。 エラーを見つけましたか? 問題を報告 →
GitHub Actions
GitHub ActionsからPrettierの自動修正を適用するには、以下の手順を実行します:
-
autofix.ciGitHubアプリをインストールします。 -
リポジトリにPrettierのバージョンを固定したものをインストールしておいてください。
-
以下の内容で
.github/workflows/prettier.ymlを作成します:.github/workflows/prettier.ymlname: autofix.cion:pull_request:push:permissions: {}jobs:prettier:runs-on: ubuntu-lateststeps:- uses: actions/checkout@v4- uses: actions/setup-node@v4- run: |yarnyarn prettier . --write- uses: autofix-ci/action@v1with:commit-message: "Apply Prettier format"
詳細については autofix.ci のウェブサイトを参照してください。