feat: 增加lint

This commit is contained in:
sudoooooo 2024-05-17 11:04:17 +08:00
parent 56b0ba2a09
commit 23e69988e1
2 changed files with 68 additions and 0 deletions

34
.github/workflows/server-lint.yml vendored Normal file
View File

@ -0,0 +1,34 @@
# Lint
name: Server Lint
on:
pull_request:
branches:
- feature/workflow
- develop
- main
- releases/**
- feature/**
paths:
- server/**
workflow_dispatch:
jobs:
build:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: cd server && npm install
- name: Lint
run: npm run lint

34
.github/workflows/web-lint.yml vendored Normal file
View File

@ -0,0 +1,34 @@
# Lint
name: Web Lint
on:
pull_request:
branches:
- feature/workflow
- develop
- main
- releases/**
- feature/**
paths:
- server/**
workflow_dispatch:
jobs:
build:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: cd web && npm install
- name: Lint
run: npm run lint