Skip to content

Commit 30b2f6c

Browse files
committed
chore: 使用Prettier格式化代码
Signed-off-by: crrashh1542 <kotsuki@crrashh.com>
1 parent db84c5f commit 30b2f6c

40 files changed

+13194
-9188
lines changed

.eslintrc.json

+2-7
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@
33
"browser": true,
44
"es2021": true
55
},
6-
"extends": [
7-
"eslint:recommended",
8-
"plugin:vue/vue3-essential"
9-
],
6+
"extends": ["eslint:recommended", "plugin:vue/vue3-essential"],
107
"overrides": [],
118
"parserOptions": {
129
"ecmaVersion": "latest",
1310
"sourceType": "module"
1411
},
15-
"plugins": [
16-
"vue"
17-
],
12+
"plugins": ["vue"],
1813
"rules": {}
1914
}

.github/ISSUE_TEMPLATE/bug_report.yml

+45-46
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,53 @@
11
name: 🐛 Bug 反馈
22
description: 遇到的任何问题都可以反馈!
3-
labels: ["Bug"]
4-
title: "【BUG】"
5-
body:
6-
7-
- type: dropdown
8-
attributes:
9-
label: 出现位置
10-
description: 你可以在此处指出该 Bug 出现于本项目的哪个位置。
11-
options:
12-
- 构建过程(Node)
13-
- 生产模式页面(Browser)
14-
- 开发模式页面(Browser)
15-
- 操作逻辑
16-
- 其它,请在后续详细补充
17-
validations:
3+
labels: ['Bug']
4+
title: '【BUG】'
5+
body:
6+
- type: dropdown
7+
attributes:
8+
label: 出现位置
9+
description: 你可以在此处指出该 Bug 出现于本项目的哪个位置。
10+
options:
11+
- 构建过程(Node)
12+
- 生产模式页面(Browser)
13+
- 开发模式页面(Browser)
14+
- 操作逻辑
15+
- 其它,请在后续详细补充
16+
validations:
1817
required: true
1918

20-
- type: input
21-
attributes:
22-
label: 项目版本
23-
description: 你可以在此处输入 Bug 出现时项目的版本。若不填写则默认为 `dev` 分支最新版本。
24-
placeholder: 格式为“包版本@hash (Build 构建数)”
19+
- type: input
20+
attributes:
21+
label: 项目版本
22+
description: 你可以在此处输入 Bug 出现时项目的版本。若不填写则默认为 `dev` 分支最新版本。
23+
placeholder: 格式为“包版本@hash (Build 构建数)”
2524

26-
- type: textarea
27-
attributes:
28-
label: 具体表现
29-
description: 你可以在此处描述该问题出现的具体情况,包括但不限于复现步骤、报错时的提示或日志等等。
30-
validations:
31-
required: true
25+
- type: textarea
26+
attributes:
27+
label: 具体表现
28+
description: 你可以在此处描述该问题出现的具体情况,包括但不限于复现步骤、报错时的提示或日志等等。
29+
validations:
30+
required: true
3231

33-
- type: textarea
34-
attributes:
35-
label: 预期表现
36-
description: 你可以在此处描述你所希望的发生情形。
37-
validations:
38-
required: true
32+
- type: textarea
33+
attributes:
34+
label: 预期表现
35+
description: 你可以在此处描述你所希望的发生情形。
36+
validations:
37+
required: true
3938

40-
- type: dropdown
41-
attributes:
42-
label: 该 Bug 的优先级
43-
description: 你可以在此处表述你希望该 Bug 得到开发者注意的优先级怎么样。
44-
options:
45-
-
46-
-
47-
-
39+
- type: dropdown
40+
attributes:
41+
label: 该 Bug 的优先级
42+
description: 你可以在此处表述你希望该 Bug 得到开发者注意的优先级怎么样。
43+
options:
44+
-
45+
-
46+
-
4847

49-
- type: checkboxes
50-
attributes:
51-
label: 提交 Issue 前须知
52-
options:
53-
- label: 我已经查看近期 Issues(包含 Open 和 Closed),未发现已存在此 Issue 或相似/同类型的 Issue。
54-
required: true
48+
- type: checkboxes
49+
attributes:
50+
label: 提交 Issue 前须知
51+
options:
52+
- label: 我已经查看近期 Issues(包含 Open 和 Closed),未发现已存在此 Issue 或相似/同类型的 Issue。
53+
required: true
+35-36
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,41 @@
11
name: 🚀 新功能提议
22
description: 想要啥新功能都可以建议!
3-
labels: ["Feature"]
4-
title: "【FEAT】"
5-
body:
3+
labels: ['Feature']
4+
title: '【FEAT】'
5+
body:
6+
- type: dropdown
7+
attributes:
8+
label: 类型
9+
description: 你可以在此处指出你想要的功能隶属于哪个类别。
10+
options:
11+
- UI & 设计
12+
- 独立页面(如版本页面)
13+
- 页内大版面组件
14+
- 页内小部件
15+
- 操作逻辑
16+
- 其它,请在后续详细补充
17+
validations:
18+
required: true
619

7-
- type: dropdown
8-
attributes:
9-
label: 类型
10-
description: 你可以在此处指出你想要的功能隶属于哪个类别。
11-
options:
12-
- UI & 设计
13-
- 独立页面(如版本页面)
14-
- 页内大版面组件
15-
- 页内小部件
16-
- 操作逻辑
17-
- 其它,请在后续详细补充
18-
validations:
20+
- type: textarea
21+
attributes:
22+
label: 具体要求
23+
description: 你可以在此处描述你希望增加的功能的具体信息。
24+
validations:
1925
required: true
20-
21-
- type: textarea
22-
attributes:
23-
label: 具体要求
24-
description: 你可以在此处描述你希望增加的功能的具体信息。
25-
validations:
26-
required: true
2726

28-
- type: dropdown
29-
attributes:
30-
label: 该请求的优先级
31-
description: 你可以在此处表述你希望该功能请求得到注意的优先级怎么样。
32-
options:
33-
-
34-
-
35-
-
27+
- type: dropdown
28+
attributes:
29+
label: 该请求的优先级
30+
description: 你可以在此处表述你希望该功能请求得到注意的优先级怎么样。
31+
options:
32+
-
33+
-
34+
-
3635

37-
- type: checkboxes
38-
attributes:
39-
label: 提交 Issue 前须知
40-
options:
41-
- label: 我已经查看近期 Issues(包含 Open 和 Closed),未发现已存在此 Issue 或相似/同类型的 Issue。
42-
required: true
36+
- type: checkboxes
37+
attributes:
38+
label: 提交 Issue 前须知
39+
options:
40+
- label: 我已经查看近期 Issues(包含 Open 和 Closed),未发现已存在此 Issue 或相似/同类型的 Issue。
41+
required: true

.github/workflows/build.yml

+51-51
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
name: Build
2-
on:
2+
on:
33
push:
44
# 由于其它分支为本地测试打包,故只 CI 主线变更
5-
branches: [ wu_main ]
6-
paths-ignore:
7-
- '**.md'
8-
- '**.txt'
9-
- '.github/**'
10-
- '!.github/workflows/**'
5+
branches: [wu_main]
6+
paths-ignore:
7+
- '**.md'
8+
- '**.txt'
9+
- '.github/**'
10+
- '!.github/workflows/**'
1111
jobs:
1212
setup:
13-
name: Setup Project Info
14-
runs-on: ubuntu-latest
15-
outputs:
16-
DIST_SUFFIX: ${{ steps.get-suffix.outputs.DIST_SUFFIX }}
17-
steps:
18-
- name: 🧐 Checkout
19-
id: checkout
20-
uses: actions/checkout@v4
21-
with:
22-
fetch-depth: '0'
13+
name: Setup Project Info
14+
runs-on: ubuntu-latest
15+
outputs:
16+
DIST_SUFFIX: ${{ steps.get-suffix.outputs.DIST_SUFFIX }}
17+
steps:
18+
- name: 🧐 Checkout
19+
id: checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: '0'
23+
24+
- name: 📙 Get Package Suffix
25+
id: get-suffix
26+
run: |
27+
# 此处通过 jq 从 package.json 获取版本,否则在 depth
28+
# 为 1 时通过 git tag 所读取的版本不准确
29+
sudo apt-get install jq
30+
VERSION=$(jq -r '.version' ./package.json)
2331
24-
- name: 📙 Get Package Suffix
25-
id: get-suffix
26-
run: |
27-
# 此处通过 jq 从 package.json 获取版本,否则在 depth
28-
# 为 1 时通过 git tag 所读取的版本不准确
29-
sudo apt-get install jq
30-
VERSION=$(jq -r '.version' ./package.json)
31-
32-
COMMIT_COUNT=$(git rev-list --count HEAD)
33-
BUILD_DATE=$(date "+%y%m%d")
34-
HEAD_SHA=$(git rev-parse --short HEAD)
35-
echo "DIST_SUFFIX=v${VERSION}-${COMMIT_COUNT}-${BUILD_DATE}-${HEAD_SHA}" >> $GITHUB_OUTPUT
32+
COMMIT_COUNT=$(git rev-list --count HEAD)
33+
BUILD_DATE=$(date "+%y%m%d")
34+
HEAD_SHA=$(git rev-parse --short HEAD)
35+
echo "DIST_SUFFIX=v${VERSION}-${COMMIT_COUNT}-${BUILD_DATE}-${HEAD_SHA}" >> $GITHUB_OUTPUT
3636
3737
build:
3838
name: Build Production Page
@@ -41,28 +41,28 @@ jobs:
4141
DIST_NAME: dist-${{ needs.setup.outputs.DIST_SUFFIX }}
4242
runs-on: ubuntu-latest
4343
steps:
44-
- name: 🧐 Checkout
45-
id: checkout
46-
uses: actions/checkout@v4
47-
with:
48-
fetch-depth: '1'
44+
- name: 🧐 Checkout
45+
id: checkout
46+
uses: actions/checkout@v4
47+
with:
48+
fetch-depth: '1'
4949

50-
- name: 🛠️ Setup environment
51-
id: setup
52-
uses: pnpm/action-setup@v3
53-
with:
54-
version: 8
50+
- name: 🛠️ Setup environment
51+
id: setup
52+
uses: pnpm/action-setup@v3
53+
with:
54+
version: 8
5555

56-
- name: ⚙️ Build production pages
57-
id: build
58-
run: |
59-
pnpm install
60-
pnpm add @vue/cli
61-
pnpm build
56+
- name: ⚙️ Build production pages
57+
id: build
58+
run: |
59+
pnpm install
60+
pnpm add @vue/cli
61+
pnpm build
6262
63-
- name: 🌐 Upload the build
64-
id: upload
65-
uses: actions/upload-artifact@v4
66-
with:
67-
name: ${{ env.DIST_NAME }}
68-
path: dist
63+
- name: 🌐 Upload the build
64+
id: upload
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: ${{ env.DIST_NAME }}
68+
path: dist

.prettierrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 3,
4+
"semi": false,
5+
"singleQuote": true
6+
}

README.md

+18-12
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,35 @@
66
![CI状态](https://github.com/crrashh1542/win-up-to-date/actions/workflows/build.yml/badge.svg)
77

88
## 关于
9-
如你所见,Windows Up-to-Date 是一个用于反映 Windows 系统各版本情况实时进展的项目。
10-
11-
这是受到 [ChangeWindows](https://changewindows.org) 启发而制作的一个便民项目,也算作我的一个 [Vue 3](https://github.com/vuejs/core) + [Vue Router 4](https://github.com/vuejs/router) + [Fluent UI Web Component 2](https://github.com/microsoft/fluentui/tree/master/packages/web-components) 的一个练手项目 ~~(为自己代码质量低找借口)~~。由于目前在测试阶段,所以可能会出现较多的 bug,敬请谅解 :(
129

13-
当然,咱也灰常欢迎大佬们的 [issue](https://github.com/crrashh1542/win-up-to-date/issues)[PR](https://github.com/crrashh1542/win-up-to-date/pulls)~
14-
10+
如你所见,Windows Up-to-Date 是一个用于反映 Windows 系统各版本情况实时进展的项目。
11+
12+
这是受到 [ChangeWindows](https://changewindows.org) 启发而制作的一个便民项目,也算作我的一个 [Vue 3](https://github.com/vuejs/core) + [Vue Router 4](https://github.com/vuejs/router) + [Fluent UI Web Component 2](https://github.com/microsoft/fluentui/tree/master/packages/web-components) 的一个练手项目 ~~(为自己代码质量低找借口)~~。由于目前在测试阶段,所以可能会出现较多的 bug,敬请谅解 :(
13+
14+
当然,咱也灰常欢迎大佬们的 [issue](https://github.com/crrashh1542/win-up-to-date/issues)[PR](https://github.com/crrashh1542/win-up-to-date/pulls)~
15+
1516
## 部署
16-
若要下载已打包好的代码,请移步 [Releases](https://github.com/crrashh1542/win-up-to-date/releases)
17-
17+
18+
若要下载已打包好的代码,请移步 [Releases](https://github.com/crrashh1542/win-up-to-date/releases)
19+
1820
若要自行打包,需要注意以下几点:
19-
* 必须要将项目 clone 下来,使用 zip 源代码下载方式会导致 prebuild 环节出错。
20-
* 包管理器使用 PNPM,需要先安装管理器再安装依赖。
21+
22+
- 必须要将项目 clone 下来,使用 zip 源代码下载方式会导致 prebuild 环节出错。
23+
- 包管理器使用 PNPM,需要先安装管理器再安装依赖。
24+
2125
```bash
2226
npm install pnpm -g
2327
pnpm install
2428
```
25-
* 启动各环境的命令详见 [`package.json`](./package.json)~~测试环境以后会加上的!~~
29+
30+
- 启动各环境的命令详见 [`package.json`](./package.json)~~测试环境以后会加上的!~~
2631

2732
## 分支相关
28-
`wu` 开头的分支为开发分支,如
33+
34+
`wu` 开头的分支为开发分支,如
2935
[`wu_main`](https://github.com/crrashh1542/win-up-to-date/tree/wu_main) 是本项目的主线分支。
3036

3137
以代号开头的分支为某版本阶段的发布分支(即所有 Releases 都经由此分支),以下列表内加粗行表示为当前工作进行的分支。
32-
| 代号简写 | 代号 | 范围 |
38+
| 代号简写 | 代号 | 范围 |
3339
|----------|---------------|---------------|
3440
| **`th`** | **Threshold** | **v0 ~ v1.0** |

babel.config.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/* eslint-disable */
22
module.exports = {
3-
presets: [
4-
'@vue/cli-plugin-babel/preset'
5-
]
3+
presets: ['@vue/cli-plugin-babel/preset'],
64
}

0 commit comments

Comments
 (0)