Skip to content

Commit

Permalink
Add prettier GitHub Action (#1879)
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel authored Sep 22, 2023
1 parent e4ec622 commit 27eb9a2
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/prettier-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint JS files with Prettier

# This action works with pull requests and pushes
on:
pull_request:
push:
branches:
- main

jobs:
prettier:
runs-on: ubuntu-latest
continue-on-error: true

steps:
- uses: actions/checkout@v2

- name: Check for prettified code
uses: creyD/[email protected]
with:
dry: True
# This part is also where you can pass other options, for example:
prettier_options: docs/**/*.md
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"autoprefixer": "^10.4.13",
"postcss": "^8.3.7",
"postcss-cli": "^9.1.0",
"prettier": "3.0.3"
"prettier": "^3.0.3"
}
}

0 comments on commit 27eb9a2

Please sign in to comment.