Skip to content

Commit

Permalink
Check prettier on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
cawabunga committed Sep 19, 2023
1 parent 77734c7 commit f3d9433
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 5 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Lint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
timeout-minutes: 10

strategy:
matrix:
os: [ubuntu-latest]
node-version: [18]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
# This is important to fetch the changes to the previous commit
fetch-depth: 0

- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Install dependencies
run: yarn install

- name: Prettify code
uses: creyD/[email protected]
with:
only_changed: True
dry: True
prettier_options: --check **/*.ts
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"printWidth": 80,
"semi": false,
"singleQuote": true
}
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,5 @@
"prettier": "^2.7.1",
"tsx": "^3.12.10",
"typescript": "~4.7.0"
},
"prettier": {
"printWidth": 80,
"semi": false,
"singleQuote": true
}
}

0 comments on commit f3d9433

Please sign in to comment.