diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 89d9776..35acd65 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,11 +16,11 @@ jobs: - name: Test run: npm run test - name: Format - run: npm run fmt - - name: "check for uncommitted changes" - # Ensure no changes, but ignore node_modules dir since dev/fresh ci deps installed. - run: | - git diff --exit-code --stat -- . ':!node_modules' \ - || (echo "##[error] found changed files after build. please 'npm run build && npm run fmt'" \ - "and check in all changes" \ - && exit 1) \ No newline at end of file + run: npm run fmtcheck + # - name: "check for uncommitted changes" + # # Ensure no changes, but ignore node_modules dir since dev/fresh ci deps installed. + # run: | + # git diff --exit-code --stat -- . ':!node_modules' \ + # || (echo "##[error] found changed files after build. please 'npm run build && npm run fmt'" \ + # "and check in all changes" \ + # && exit 1) \ No newline at end of file diff --git a/package.json b/package.json index ea4cddd..58a7a8b 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "scripts": { "build": "ncc build src/main.ts --minify", "test": "jest", - "fmt": "prettier --write 'src/**/*.ts' '__tests__/**/*.ts'" + "fmt": "prettier --write 'src/**/*.ts' '__tests__/**/*.ts'", + "fmtcheck": "prettier --check 'src/**/*.ts' '__tests__/**/*.ts'" }, "repository": { "type": "git",