From 1aa8b2396d9069188b1352dfbcb59981e5fdc1f9 Mon Sep 17 00:00:00 2001 From: maskeynihal <26411488+maskeynihal@users.noreply.github.com> Date: Thu, 12 Oct 2023 11:48:36 +0545 Subject: [PATCH] add-prettier: Add github action to check by prettier --- .github/workflows/test-workflow.yml | 19 +++++++++++++++++++ package.json | 1 + 2 files changed, 20 insertions(+) diff --git a/.github/workflows/test-workflow.yml b/.github/workflows/test-workflow.yml index 818c015..e86718e 100644 --- a/.github/workflows/test-workflow.yml +++ b/.github/workflows/test-workflow.yml @@ -59,3 +59,22 @@ jobs: - name: Test i18n packs integrity run: npm run test:i18n-packs + + prettier: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version-file: .nvmrc + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Test with prettier + run: npm run test:prettier diff --git a/package.json b/package.json index 995701d..8785496 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "test:eslint:fix": "npm run test:eslint -- --fix", "test:stylelint": "stylelint 'src/**/*.scss' --config node_modules/do-bulma/.stylelintrc.json", "test:i18n-packs": "node --es-module-specifier-resolution=node src/nginxconfig/i18n/verify.js", + "test:prettier": "npm run prettier:check", "prepare": "husky install", "prettier": "prettier --write 'src/**/*.{js,vue}'", "prettier:check": "prettier 'src/**/*.{js,vue}' --check"