mirror of
https://github.com/SrIzan10/templates.git
synced 2026-05-01 11:05:17 +00:00
32 lines
694 B
YAML
32 lines
694 B
YAML
name: Lint
|
|
|
|
on:
|
|
# Trigger the workflow on push or pull request,
|
|
# but only for the main branch
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
run-linters:
|
|
name: Run linters
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out Git repository
|
|
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748 # tag=v3
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # tag=v3
|
|
with:
|
|
node-version: 17
|
|
|
|
# Prettier must be in `package.json`
|
|
- name: Install Node.js dependencies
|
|
run: npm i
|
|
|
|
- name: Run linters
|
|
run: npm run format |