Skip to content

Commit

Permalink
Add Lint workflow
Browse files Browse the repository at this point in the history
Use prettier check as JS linter
  • Loading branch information
tvdeyen committed Oct 30, 2024
1 parent b12fe89 commit 8966363
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,23 @@ jobs:
bundler-cache: true
- name: Lint Ruby files
run: bundle exec standardrb
Prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Restore node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-modules
- name: Install dependencies
run: yarn install
- name: Lint JS files
run: yarn run lint
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
},
"scripts": {
"build": "rollup --config",
"lint": "prettier --check 'src/**/*.js'",
"test": "jest"
},
"browserslist": "> 0.25%, not dead"
Expand Down

0 comments on commit 8966363

Please sign in to comment.