Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .github/workflows/label.yml

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Code Quality Checks

on: [push, pull_request]

permissions:
contents: read

jobs:
lint:
name: Run Linters
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

# 安装 Node.js
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

# 安装并运行 HTMLHint
- name: Install and Run HTMLHint
run: |
npm install htmlhint --save-dev
npx htmlhint "**/*.html" --config .htmlhintrc

# 安装 Stylelint
- name: Install Stylelint
run: |
npm init -y
npm install stylelint stylelint-config-standard --save-dev
# 创建基础配置(如果还没有)
- name: Create default .stylelintrc.json
run: |
echo '{
"extends": "stylelint-config-standard"
}' > .stylelintrc.json
if: ${{ !hashFiles('.stylelintrc.json') }}

# 执行 Stylelint
- name: Run Stylelint
run: npx stylelint "**/*.css"

check-size:
name: Check Bundle Size
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
22 changes: 22 additions & 0 deletions .htmlhintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"tagname-lowercase": true,
"attr-lowercase": true,
"attr-value-double-quotes": true,
"attr-value-not-empty": true,
"attr-no-duplication": true,
"doctype-first": true,
"tag-pair": true,
"tag-self-close": true,
"spec-char-escape": true,
"id-unique": true,
"src-not-empty": true,
"title-require": true,
"alt-require": true,
"doctype-html5": true,
"style-disabled": true,
"inline-style-disabled": true,
"inline-script-disabled": true,
"space-tab-mixed-disabled": "space",
"id-class-ad-disabled": true,
"href-abs-or-rel": false
}
10 changes: 0 additions & 10 deletions size.yml

This file was deleted.

Loading