ci: add prettier formatting (#130)
This commit is contained in:
parent
d7f460f308
commit
79d77568ad
22
.github/workflows/format.yml
vendored
Normal file
22
.github/workflows/format.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: Prettier
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
prettier:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
# Make sure the actual branch is checked out when running on pull requests
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
|
|
||||||
|
- name: Run prettier
|
||||||
|
uses: creyD/prettier_action@v4.3
|
||||||
|
with:
|
||||||
|
commit_message: "style: format code with prettier"
|
||||||
|
prettier_options: "--write styles/**/*.css"
|
2
.prettierignore
Normal file
2
.prettierignore
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/styles/codeberg/
|
||||||
|
/styles/reddit/
|
10
.prettierrc
Normal file
10
.prettierrc
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": "styles/**/*.css",
|
||||||
|
"options": {
|
||||||
|
"parser": "less"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user