Skip to content

Commit

Permalink
Separate lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed May 28, 2023
1 parent 2a553d9 commit 7dc17c6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint

on: [push, pull_request, workflow_dispatch]

env:
FORCE_COLOR: 2
NODE: 18 # The Node.js version to run lint on

jobs:
run:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE }}
cache: npm

- name: Install npm dependencies
run: npm ci

- name: Run lint
run: npm run lint
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
},
"scripts": {
"ava": "ava",
"lint": "xo",
"xo": "xo",
"fix": "xo --fix",
"test": "npm run xo && npm run ava",
"test-ci": "npm run xo && c8 ava"
"test-ci": "c8 ava"
},
"main": "index.js",
"type": "module",
Expand Down

0 comments on commit 7dc17c6

Please sign in to comment.