From 080d94f75453c7faf579b5ad3ea32ee4e58ccef8 Mon Sep 17 00:00:00 2001 From: Masaya Suzuki <15100604+massongit@users.noreply.github.com> Date: Mon, 9 Sep 2024 03:45:30 +0900 Subject: [PATCH] =?UTF-8?q?super-linter=E3=82=A2=E3=83=83=E3=83=97?= =?UTF-8?q?=E3=83=87=E3=83=BC=E3=83=88=E3=83=BBprettier=E3=82=92=E4=BD=BF?= =?UTF-8?q?=E3=81=86=20(#1398)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update super-linter/super-linter action to v7 * Add prettier * formatが間違ってたので直してあげたよ! (#1399) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * 処理修正 * setupを先頭に移動 * 順序統一 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: dev-hato-app[bot] <111467236+dev-hato-app[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Goryudyuma(Kei.Matsumoto) <6211370+Goryudyuma@users.noreply.github.com> --- .../github-actions-cache-cleaner.yml | 2 +- .github/workflows/super-linter.yml | 2 +- action.yml | 19 +++++++++++++++---- package-lock.json | 17 +++++++++++++++++ package.json | 1 + renovate.json | 4 +--- 6 files changed, 36 insertions(+), 9 deletions(-) diff --git a/.github/workflows/github-actions-cache-cleaner.yml b/.github/workflows/github-actions-cache-cleaner.yml index db465f314..409a11cea 100644 --- a/.github/workflows/github-actions-cache-cleaner.yml +++ b/.github/workflows/github-actions-cache-cleaner.yml @@ -5,7 +5,7 @@ on: branches: - main schedule: - - cron: '0 21 * * *' # 06:00 JST + - cron: "0 21 * * *" # 06:00 JST workflow_dispatch: permissions: read-all jobs: diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index 2abb453bf..9229ab5b4 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -52,7 +52,7 @@ jobs: # Run Linter against code base # ################################ - name: Lint Code Base - uses: super-linter/super-linter/slim@v6.9.0 + uses: super-linter/super-linter/slim@v7.1.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DEFAULT_BRANCH: main diff --git a/action.yml b/action.yml index 6dded6212..ca15f4b3f 100644 --- a/action.yml +++ b/action.yml @@ -1,18 +1,29 @@ -name: 'format-json-yml' -author: 'dev-hato Development Team' -description: 'JSONやYAMLのフォーマットを整える' +name: "format-json-yml" +author: "dev-hato Development Team" +description: "JSONやYAMLのフォーマットを整える" inputs: github-token: # id of input - description: 'GITHUB_TOKEN' + description: "GITHUB_TOKEN" required: true runs: using: "composite" steps: + - uses: actions/setup-node@v4.0.3 + if: github.event_name != 'pull_request' || github.event.action != 'closed' + with: + cache: npm - shell: bash if: github.event_name != 'pull_request' || github.event.action != 'closed' run: bash "${{ github.action_path }}/scripts/action/format.sh" + - shell: bash + if: github.event_name != 'pull_request' || github.event.action != 'closed' + run: npm ci + - shell: bash + if: github.event_name != 'pull_request' || github.event.action != 'closed' + run: npx prettier --write . - uses: dev-hato/actions-diff-pr-management@v1.1.12 with: github-token: ${{inputs.github-token}} branch-name-prefix: fix-format-json-yml pr-title-prefix: formatが間違ってたので直してあげたよ! + pr-description-prefix: formatが間違ってたので直してあげたよ! diff --git a/package-lock.json b/package-lock.json index 2feb2be82..d9ec5e985 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "devDependencies": { "@proofdict/textlint-rule-proofdict": "3.1.2", "@textlint-ja/textlint-rule-no-insert-dropping-sa": "2.0.1", + "prettier": "^3.3.3", "textlint": "14.2.0", "textlint-filter-rule-comments": "1.2.2", "textlint-rule-abbr-within-parentheses": "1.0.2", @@ -3892,6 +3893,22 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/prh": { "version": "5.4.4", "resolved": "https://registry.npmjs.org/prh/-/prh-5.4.4.tgz", diff --git a/package.json b/package.json index e60d1a519..740352731 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "devDependencies": { "@proofdict/textlint-rule-proofdict": "3.1.2", "@textlint-ja/textlint-rule-no-insert-dropping-sa": "2.0.1", + "prettier": "^3.3.3", "textlint": "14.2.0", "textlint-filter-rule-comments": "1.2.2", "textlint-rule-abbr-within-parentheses": "1.0.2", diff --git a/renovate.json b/renovate.json index 749421aa6..3fac3313d 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,4 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "github>dev-hato/renovate-config" - ] + "extends": ["github>dev-hato/renovate-config"] }