-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 975 Bytes
/
npm-lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# This is the workflow to lint the source code
name: Lint Code
# Controls when the action will run.
on:
# Allows you to call this workflow from other workflows
workflow_call:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
lint:
name: '🕵️♂️ Lint Code'
runs-on: ubuntu-latest
container: node:lts-bullseye
steps:
- name: '☁️ Checkout repository'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: '⚙️ Use Node.js'
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
check-latest: true
cache: 'npm'
- name: '⛓️ Install dependencies'
env:
HUSKY: 0
run: npm ci --no-audit --prefer-offline --progress=false
- name: '✅ Lint code'
run: npm run lint -- --reporter=github