refactor(setup): consolidate prettier config and streamline CI

- Replace scattered .prettierignore files with a single root config
- Add scripts/ci.js to orchestrate lint, format, typecheck, commitlint, and build
- Simplify ci.yml to use ci.js and npm ci
- Apply prettier formatting to docs, locales, and HTML files
This commit is contained in:
Simon
2026-04-16 17:04:23 +08:00
parent e626e0b8ce
commit 5809fe3249
18 changed files with 255 additions and 182 deletions

View File

@@ -1,6 +1,6 @@
name: CI
permissions:
contents: read
name: CI
on:
push:
@@ -17,6 +17,8 @@ jobs:
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
@@ -24,18 +26,8 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'npm'
# test on default version of npm
# - 9.6~10.8 on node@20
# - 11.3~11.6 on node@24
- name: Node and NPM version
run: node --version && npm --version
- name: Install dependencies
run: npm install
run: npm ci
- name: Lint
run: npx eslint . && npx prettier --check **/*.ts
- name: Build
run: npm run build
- name: CI checks
run: node scripts/ci.js