Skip to content

Commit a3ccae0

Browse files
mmdapl142vip.cn
andauthored
refactor: 替换eslint规则,使用antfu/eslint模块 (#138)
* refactor: 替换eslint规则,使用antfu/eslint模块 * chore: update * chore: update * chore: update ci * chore: update * chore: update --------- Co-authored-by: 142vip.cn <fairy@2925.com>
1 parent c0f2d19 commit a3ccae0

File tree

381 files changed

+12227
-11264
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

381 files changed

+12227
-11264
lines changed

.eslintignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 169 deletions
This file was deleted.

.github/workflows/CD.yaml

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
## CD交付流水线
2-
## - 部署到Github Pages
3-
## - 部署到Vercel托管平台
4-
## - 发布新的Github Release
5-
## 参考资料:https://v2.vuepress.vuejs.org/zh/guide/deployment.html#github-pages
1+
# CD交付流水线
2+
# - 部署到Github Pages
3+
# - 部署到Vercel托管平台
4+
# - 发布新的Github Release
5+
# 参考资料:https://v2.vuepress.vuejs.org/zh/guide/deployment.html#github-pages
66

77
name: CD
88
on:
@@ -13,14 +13,14 @@ on:
1313

1414
# 环境变量
1515
env:
16-
## vercel
16+
# vercel
1717
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
1818
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
1919

2020
jobs:
21-
## 部署到Github-Pages
21+
# 部署到Github-Pages
2222
deploy-github:
23-
name: "部署到Github-Pages"
23+
name: 部署到Github-Pages
2424
if: github.repository == '142vip/JavaScriptCollection'
2525
runs-on: ubuntu-latest
2626

@@ -32,21 +32,21 @@ jobs:
3232
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
3333
fetch-depth: 0
3434

35-
## 安装PNPM
35+
# 安装PNPM
3636
- name: PNPM Install
37-
uses: pnpm/action-setup@v2
37+
uses: pnpm/action-setup@v4
3838
with:
39-
version: 8
39+
version: 9.6.0
4040

41-
## 安装Node环境
41+
# 安装Node环境
4242
- name: Install Node.js
43-
uses: actions/setup-node@v3
43+
uses: actions/setup-node@v4
4444
with:
45-
node-version: 18.18.0
46-
## 淘宝镜像加速
45+
node-version: 20.16.0
46+
# 淘宝镜像加速
4747
registry-url: 'https://registry.npmmirror.com'
48-
## 缓存
49-
cache: 'pnpm'
48+
# 缓存
49+
cache: pnpm
5050

5151
- name: Install Dependencies
5252
run: |
@@ -67,15 +67,15 @@ jobs:
6767
with:
6868
pages_threshold: major_outage
6969

70-
## 获取Git提交信息
70+
# 获取Git提交信息
7171
- name: Get Commit Info
7272
id: gitInfo
7373
run: |
7474
echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
7575
echo "author=$(git log -1 --pretty=%an)" >> $GITHUB_OUTPUT
7676
echo "email=$(git log -1 --pretty=%ae)" >> $GITHUB_OUTPUT
7777
78-
## 参考:https://github.com/marketplace/actions/github-pages
78+
# 参考:https://github.com/marketplace/actions/github-pages
7979
- name: Deploy To GitHub Page
8080
uses: crazy-max/ghaction-github-pages@v3
8181
with:
@@ -90,40 +90,40 @@ jobs:
9090
env:
9191
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9292

93-
## 部署到vercel平台
94-
# deploy-vercel:
95-
# name: "部署到Vercel平台"
96-
# needs: install-init
97-
# runs-on: ubuntu-latest
98-
# if: github.repository == '142vip/JavaScriptCollection'
99-
# steps:
100-
# - name: Checkout Code
101-
# uses: actions/checkout@v3
102-
# with:
103-
# fetch-depth: 0
104-
#
105-
# - name: Restore Dependencies From Cache
106-
# uses: actions/cache@v3
107-
# with:
108-
# path: |
109-
# node_modules
110-
# key: ${{ runner.os }}-node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}
111-
#
112-
# - name: Pull Vercel Environment Information
113-
# run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
114-
#
115-
# ## 注意:安装pnpm
116-
# - name: Build Project Artifacts
117-
# run: npm i pnpm@7 -g && vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
118-
#
119-
# - name: Deploy Project Artifacts to Vercel
120-
# run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
121-
122-
## 版本发布
93+
# 部署到vercel平台
94+
# deploy-vercel:
95+
# name: "部署到Vercel平台"
96+
# needs: install-init
97+
# runs-on: ubuntu-latest
98+
# if: github.repository == '142vip/JavaScriptCollection'
99+
# steps:
100+
# - name: Checkout Code
101+
# uses: actions/checkout@v3
102+
# with:
103+
# fetch-depth: 0
104+
#
105+
# - name: Restore Dependencies From Cache
106+
# uses: actions/cache@v3
107+
# with:
108+
# path: |
109+
# node_modules
110+
# key: ${{ runner.os }}-node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}
111+
#
112+
# - name: Pull Vercel Environment Information
113+
# run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
114+
#
115+
# ## 注意:安装pnpm
116+
# - name: Build Project Artifacts
117+
# run: npm i pnpm@7 -g && vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
118+
#
119+
# - name: Deploy Project Artifacts to Vercel
120+
# run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
121+
122+
# 版本发布
123123
release:
124-
name: "创建Github发布"
124+
name: 创建Github发布
125125
runs-on: ubuntu-latest
126-
## 主库next且执行release更新时执行
126+
# 主库next且执行release更新时执行
127127
if: github.repository == '142vip/JavaScriptCollection' && startsWith(github.event.head_commit.message, 'chore(release):')
128128

129129
steps:
@@ -134,12 +134,12 @@ jobs:
134134
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
135135
fetch-depth: 0
136136

137-
### 打成压缩包
137+
# ## 打成压缩包
138138
- name: Create Zip Package
139139
run: |
140140
zip -r JavaScriptCollection.zip . \
141141
-x "node_modules/*" \
142-
-x "*.git*"
142+
-x "*.git*"
143143
144144
# 提取版本号
145145
- name: Get New Version Number
@@ -158,12 +158,12 @@ jobs:
158158
release_name: v${{ steps.releaseVersion.outputs.version }}
159159
body: |
160160
Release ${{ steps.releaseVersion.outputs.version }}
161-
161+
162162
### Features
163163
164164
### Bug Fixes
165165
166-
## 更新资源
166+
# 更新资源
167167
- name: Upload Resource Assets
168168
uses: actions/upload-release-asset@latest
169169
env:
@@ -205,4 +205,4 @@ jobs:
205205
# echo "-----------正在运行的服务--------"
206206
# docker ps
207207
# cd /service_env/ && git reset --hard && git pull origin main
208-
# bash ./scripts/book_doc.deploy.sh jsc ${{steps.version.outputs.value}}
208+
# bash ./scripts/book_doc.deploy.sh jsc ${{steps.version.outputs.value}}

0 commit comments

Comments
 (0)