Skip to content

Commit 3bba7e8

Browse files
committed
🎨 use prettier
1 parent ca61bda commit 3bba7e8

Some content is hidden

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

50 files changed

+2134
-1924
lines changed

.eslintrc.json

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
{
2-
"root": true,
3-
"parser": "@typescript-eslint/parser",
4-
"parserOptions": {
5-
"ecmaVersion": 6,
6-
"sourceType": "module"
7-
},
8-
"plugins": [
9-
"@typescript-eslint"
10-
],
11-
"rules": {
12-
"@typescript-eslint/naming-convention": "warn",
13-
"@typescript-eslint/semi": "warn",
14-
"curly": "warn",
15-
"eqeqeq": "warn",
16-
"no-throw-literal": "warn",
17-
"semi": "off"
18-
},
19-
"ignorePatterns": [
20-
"**/*.d.ts",
21-
"src/emulators"
22-
]
23-
}
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module"
7+
},
8+
"plugins": ["@typescript-eslint"],
9+
"rules": {
10+
"@typescript-eslint/naming-convention": "warn",
11+
"@typescript-eslint/semi": "warn",
12+
"curly": "warn",
13+
"eqeqeq": "warn",
14+
"no-throw-literal": "warn",
15+
"semi": "off"
16+
},
17+
"extends": ["prettier"],
18+
"ignorePatterns": ["**/*.d.ts", "src/emulators"]
19+
}

.github/workflows/ci.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
3939
echo ">>> Started xvfb"
4040
if: runner.os == 'Linux'
41-
4241

4342
- uses: actions/checkout@v2
4443
with:
@@ -51,7 +50,7 @@ jobs:
5150
working-directory: ./vscode-dosbox
5251
env:
5352
DISPLAY: ":99.0"
54-
53+
5554
- name: Checkout masm-tasm repo
5655
uses: actions/checkout@v2
5756
with:
@@ -93,10 +92,8 @@ jobs:
9392
with:
9493
name: "vscepackages"
9594
path: "*.vsix"
96-
95+
9796
- run: npx vsce publish --packagePath $(find . -iname "*.vsix")
9897
env:
9998
VSCE_PAT: ${{ secrets.VSCE_PAT }}
10099
if: success() && startsWith( github.ref, 'refs/tags/')
101-
102-

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.vscode*/
2+
.git/
3+
out/
4+
dist/
5+
emu/
6+
src/emulators/

.vscode/settings.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,5 @@
99
},
1010
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
1111
"typescript.tsc.autoDetect": "off",
12-
"[typescript]": {
13-
"editor.formatOnSave": true,
14-
}
12+
"editor.defaultFormatter": "esbenp.prettier-vscode",
1513
}

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## preview
44

5-
- 0.0.1: offer basic commands
5+
- 0.0.1: offer basic commands

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ you may need to change output of SDL for better screen effect
9292

9393
This extension contributes the following settings:
9494

95-
* `vscode-dosbox.command.dosbox`: customize your command to open dosbox
96-
* `vscode-dosbox.command.dosboxX`: customize your command to open dosbox-x
95+
- `vscode-dosbox.command.dosbox`: customize your command to open dosbox
96+
- `vscode-dosbox.command.dosboxX`: customize your command to open dosbox-x
9797

9898
## Report
9999

@@ -104,4 +104,3 @@ report bugs in [github issues](https://github.com/dosasm/vscode-dosbox/issues)
104104
Calling out known issues can help limit users opening duplicate issues against your extension.
105105

106106
## Release Notes
107-

README.zh.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,77 @@
11
# vscode-DOSBox
22

3-
提供一个在VSCode中运行DOSBox及其变体的接口
3+
提供一个在 VSCode 中运行 DOSBox 及其变体的接口
44

5-
## 支持的DOSBox和VSCode平台
5+
## 支持的 DOSBox 和 VSCode 平台
66

7-
- [JSDos](https://js-dos.com/): 支持包括web端的所有平台
8-
- [DOSBox](https://www.dosbox.com/): windows系统下打包了可执行文件,linux和macOS系统需要手动安装
9-
- [DOSBox-x](https://dosbox-x.com/): windows系统下打包了可执行文件,linux和macOS系统需要手动安装
10-
- [MSDos-player](http://takeda-toshiya.my.coocan.jp/msdos/index.html): windows系统下打包了可执行文件,其他平台无相应程序
7+
- [JSDos](https://js-dos.com/): 支持包括 web 端的所有平台
8+
- [DOSBox](https://www.dosbox.com/): windows 系统下打包了可执行文件,linux 和 macOS 系统需要手动安装
9+
- [DOSBox-x](https://dosbox-x.com/): windows 系统下打包了可执行文件,linux 和 macOS 系统需要手动安装
10+
- [MSDos-player](http://takeda-toshiya.my.coocan.jp/msdos/index.html): windows 系统下打包了可执行文件,其他平台无相应程序
1111

1212
## 功能
1313

14-
- 提供打开相关DOS模拟器的简单接口,参看 [api.ts](src/api.ts)
15-
- 提供打开相关DOS模拟器的简单命令,可以在命令面板测试与调用
14+
- 提供打开相关 DOS 模拟器的简单接口,参看 [api.ts](src/api.ts)
15+
- 提供打开相关 DOS 模拟器的简单命令,可以在命令面板测试与调用
1616

1717
## 安装依赖
1818

19-
### Windows系统用户
19+
### Windows 系统用户
2020

2121
所有的可执行文件都已经打包在安装包中。可以通过修改设置来使用不同的模拟器
2222

23-
### 在mac平台使用homebrew安装DOSBox和DOSBox-x (推荐)
23+
### 在 mac 平台使用 homebrew 安装 DOSBox 和 DOSBox-x (推荐)
2424

2525
```sh
2626
brew install dosbox
2727
brew install dosbox-x
2828
```
2929

30-
[homebrew](https://brew.sh/)官网有安装homebrew的详细教程[tuna](https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/)也提供了镜像安装和换源方法。
30+
[homebrew](https://brew.sh/)官网有安装 homebrew 的详细教程[tuna](https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/)也提供了镜像安装和换源方法。
3131

32-
### 在mac平台从dmg文件安装DOSBox
32+
### 在 mac 平台从 dmg 文件安装 DOSBox
3333

34-
1. 从DOSBox的[官网](https://www.dosbox.com/download.php?main=1)下载DMG文件
35-
2. 点击dmg文件
34+
1. 从 DOSBox 的[官网](https://www.dosbox.com/download.php?main=1)下载 DMG 文件
35+
2. 点击 dmg 文件
3636
3. 将程序拖拽到`/Applications`文件夹
37-
4. 在VSCode中添加如下设置,配置用于打开DOSBox的命令
37+
4. 在 VSCode 中添加如下设置,配置用于打开 DOSBox 的命令
3838

3939
```json
4040
"vscode-dosbox.command.dosbox":"open -a dosbox --args",
4141
```
4242

43-
可能需要修改sdl输出方式,来使显示效果满意,例如:
43+
可能需要修改 sdl 输出方式,来使显示效果满意,例如:
4444

4545
```json
4646
"vscode-dosbox.dosbox.config": {
4747
"SDL.output":"overlay",
4848
}
4949
```
5050

51-
### 在mac平台从zip文件安装DOSBox-x
51+
### 在 mac 平台从 zip 文件安装 DOSBox-x
5252

53-
1. 从dosbox-x的 [官网](https://dosbox-x.com) 下载zip压缩包文件
53+
1. 从 dosbox-x 的 [官网](https://dosbox-x.com) 下载 zip 压缩包文件
5454
2. 解压并将需要的话`.app`文件拖拽到 `/Applications`文件夹
55-
3. 按照[macOS的文档](https://support.apple.com/zh-cn/HT202491)设置安全选项
55+
3. 按照[macOS 的文档](https://support.apple.com/zh-cn/HT202491)设置安全选项
5656
1. 在“系统偏好设置”中,前往“安全性与隐私”。
5757
1. 点按“通用”面板中的“仍要打开”按钮,以确认您打算打开或安装这个 App。
58-
4. 在VSCode中添加如下设置,配置用于打开DOSBox的命令
58+
4. 在 VSCode 中添加如下设置,配置用于打开 DOSBox 的命令
5959

6060
```json
6161
"vscode-dosbox.command.dosboxX":"open -a dosbox-x --args",
6262
```
6363

64-
### 在Linux平台安装dosbox
64+
### 在 Linux 平台安装 dosbox
6565

66-
Ubuntu等可以使用apt的发行版可以使用如下命令安装
66+
Ubuntu 等可以使用 apt 的发行版可以使用如下命令安装
6767

6868
```sh
6969
sudo apt install dosbox
7070
```
7171

7272
参看[DOSBox's website](https://www.dosbox.com/download.php?main=1)
7373

74-
### 在Linux平台安装dosbox-x
74+
### 在 Linux 平台安装 dosbox-x
7575

7676
根据[dosbox-x's instructions](https://github.com/joncampbell123/dosbox-x/blob/master/INSTALL.md#linux-packages-flatpak-and-more),
7777
我们可以使用[flatpak](https://www.flatpak.org/setup/)来安装 DOSBox-X.
@@ -83,7 +83,7 @@ sudo apt install flatpak
8383
flatpak install flathub com.dosbox_x.DOSBox-X
8484
```
8585

86-
最后在VSCode的设置中添加如下内容
86+
最后在 VSCode 的设置中添加如下内容
8787

8888
```json
8989
"vscode-dosbox.command.dosboxX":"flatpak run com.dosbox_x.DOSBox-X",
@@ -93,12 +93,11 @@ flatpak install flathub com.dosbox_x.DOSBox-X
9393

9494
该插件主要包括如下设置:
9595

96-
* `vscode-dosbox.command.dosbox`: 自定义打开dosbox的命令
97-
* `vscode-dosbox.command.dosboxX`: 自定义打开dosbox-x的命令
96+
- `vscode-dosbox.command.dosbox`: 自定义打开 dosbox 的命令
97+
- `vscode-dosbox.command.dosboxX`: 自定义打开 dosbox-x 的命令
9898

9999
## 报告问题
100100

101101
[github issues](https://github.com/dosasm/vscode-dosbox/issues)中,提交遇到的问题。
102102

103103
## Release Notes
104-

0 commit comments

Comments
 (0)