From 0ebad7708391126fde6f2b2689ead398734398d4 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sat, 29 Apr 2023 07:09:57 +0530 Subject: [PATCH] One more try --- .github/workflows/prettier.yml | 22 ++++++++++++++++++++++ package.json | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/prettier.yml diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml new file mode 100644 index 00000000..2ea9aab9 --- /dev/null +++ b/.github/workflows/prettier.yml @@ -0,0 +1,22 @@ +name: Check JavaScript for conformance with Prettier + +on: + push: + pull_request: + +jobs: + prettier: + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@v2 + - uses: actions/cache@v2 + name: Configure npm caching + with: + path: ~/.npm + key: ${{ runner.os }}-npm-${{ hashFiles('**/workflows/prettier.yml') }} + restore-keys: | + ${{ runner.os }}-npm- + - name: Run prettier + run: |- + npm run prettier-check \ No newline at end of file diff --git a/package.json b/package.json index cedf812b..fbf1dadb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "scripts": { - "prettier-fix": "npx prettier --write -c ui", - "prettier-check": "npx prettier --check -c ui" + "prettier-fix": "npx prettier --write \"./**/*.js\"", + "prettier-check": "npx prettier --check \"./**/*.js\"" }, "devDependencies": { "prettier": "^1.19.1"