This commit is contained in:
parent
d0117a1be4
commit
60d16aba2f
38
.gitea/workflows/lint.yaml
Normal file
38
.gitea/workflows/lint.yaml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
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: Install Dependencies
|
||||||
|
run: apt update; apt install -y nodejs
|
||||||
|
|
||||||
|
- name: Check out Git repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 14
|
||||||
|
|
||||||
|
# ESLint and Prettier must be in `package.json`
|
||||||
|
- name: Install Node.js dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Run linters
|
||||||
|
uses: https://github.com/wearerequired/lint-action@v2
|
||||||
|
with:
|
||||||
|
eslint: true
|
||||||
|
prettier: true
|
Loading…
Reference in New Issue
Block a user