From 34a16667d8384ffc87fdf12ee89cc8056458388c Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 16 Dec 2021 10:47:22 -0800 Subject: [PATCH] Adds github workflow --- .github/workflows/prettier.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/prettier.yaml diff --git a/.github/workflows/prettier.yaml b/.github/workflows/prettier.yaml new file mode 100644 index 000000000..806960607 --- /dev/null +++ b/.github/workflows/prettier.yaml @@ -0,0 +1,24 @@ +# @url https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions +name: JavaScript Prettier (run ./bw-dev prettier to fix) + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + lint: + name: Lint with Prettier + runs-on: ubuntu-20.04 + + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it. + - uses: actions/checkout@v2 + + - name: Install modules + run: npm install . + + # See .stylelintignore for files that are not linted. + - name: Run Prettier + run: npx prettier --check bookwyrm/static/js/*.js