nazhua/.github/workflows/eslint.yml

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