From 340df293bad31b40e6010380bab51be6f5402107 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 25 Jun 2024 14:46:51 -0700 Subject: [PATCH] Add check-format script and update lint-js.yml (#2357) * chore: Add check-format script to package.json for code formatting consistency * chore: Update lint-js.yml to use npm run check-format instead of npm run format --- .github/workflows/lint-js.yml | 8 ++------ src/frontend/package.json | 3 ++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index 11156c8b8..aafd15f4a 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -45,10 +45,6 @@ jobs: - name: Run Prettier run: | cd src/frontend - npm run format - - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: Apply Prettier formatting - branch: ${{ github.head_ref }} + npm run check-format + diff --git a/src/frontend/package.json b/src/frontend/package.json index 219b5c7d4..42752d9c4 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -83,6 +83,7 @@ "build": "vite build", "serve": "vite preview", "format": "npx prettier --write \"{tests,src}/**/*.{js,jsx,ts,tsx,json,md}\" --ignore-path .prettierignore", + "check-format": "npx prettier --check \"{tests,src}/**/*.{js,jsx,ts,tsx,json,md}\" --ignore-path .prettierignore", "type-check": "tsc --noEmit --pretty --project tsconfig.json && vite" }, "eslintConfig": { @@ -132,4 +133,4 @@ "ua-parser-js": "^1.0.38", "vite": "^5.3.1" } -} +} \ No newline at end of file