mirror of
https://github.com/hi2shark/nazhua.git
synced 2026-01-12 15:20:43 +08:00
32 lines
555 B
YAML
32 lines
555 B
YAML
name: ESLint Lint for Pull Requests
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- '**/*.js'
|
|
- '**/*.ts'
|
|
- '**/*.vue'
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
# 检出代码
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
# 设置 Node.js 环境
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '20'
|
|
|
|
# 安装依赖
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
# 运行 ESLint
|
|
- name: Run ESLint
|
|
run: npm run lint
|