Skip to content

Commit a48f722

Browse files
committed
翻译 eslint-js、eslint-vue 并替换部分截图 (未完成)
1 parent 84228ba commit a48f722

File tree

9 files changed

+30
-30
lines changed

9 files changed

+30
-30
lines changed

en/Tutorial/extension/eslint-js.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ ESLint is an open source JavaScript linting utility.
88

99
As shown in the figure below, when an error is detected, a red wavy line will appear.
1010

11-
<img src="/static/snapshots/tutorial/eslint-error.png" />
11+
<img src="/static/snapshots/tutorial/plugins/eslint-js-error.png" class="hd-img" />
1212

1313
## ESLint Plugin configuration
1414

1515
Click the menu [Tools] [Settings -> Plugin] [eslint-js], you can see the eslint-js related configuration.
1616

17-
<img src="/static/snapshots/tutorial/eslint-js.png" />
17+
<img src="/static/snapshots/tutorial/plugins/settings_eslint_en.png" class="hd-img"/>
1818

1919
**实时校验、自动修复**
2020

en/Tutorial/extension/eslint-vue.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
## eslint-vue简介
1+
# eslint-vue
22

3-
此插件用于vue语法校验。[eslint-vue插件安装地址](https://ext.dcloud.net.cn/plugin?id=2005)
3+
This plugin is used for Vue syntax verification. [eslint-vue install](https://ext.dcloud.net.cn/plugin?id=2005)
44

5-
和eslint-js搭配使用,[eslint-js插件安装地址](https://ext.dcloud.net.cn/plugin?id=2037)
5+
It needs to be used with eslint-js, [eslint-js plug-in installation address](https://ext.dcloud.net.cn/plugin?id=2037)
66

7-
## 错误提示
7+
## Error message
88

9-
如下图所示,编写完代码,保存文件,当检查到错误时,会出现红色波浪线
9+
As shown in the figure below, when an error is detected, a red wavy line will appear.
1010

11-
<img src="/static/snapshots/tutorial/eslint-error.png" />
11+
<img src="/static/snapshots/tutorial/plugins/eslint-vue-error.png" class="hd-img" />
1212

13-
## 插件配置
13+
## Plugin configuration
1414

15-
点击菜单【工具】【插件配置】【eslint-vue】,即可看到eslint-vue相关配置。
15+
Click the menu [Tools] [Settings -> Plugin] [eslint-vue], you can see the eslint-vue related configuration.
1616

17-
<img src="/static/snapshots/tutorial/eslint-js.png" />
17+
<img src="/static/snapshots/tutorial/plugins/settings_eslint_en.png" class="hd-img"/>
1818

1919
**实时校验、自动修复**
2020

@@ -25,35 +25,35 @@
2525
3. 若满足上述条件,当编写完代码,保存时,若代码中存在错误,自动修复;
2626
4. 实时校验功能,默认未开启,需要手动开启此功能
2727

28-
## 配置文件
28+
## eslint-vue config file
2929

30-
eslint-vue的配置文件为.eslintrc.js
30+
The configuration file of eslint-vue is `.eslintrc.js`.
3131

32-
点击菜单工具 -> 设置 -> 插件配置 -> eslint-vue -> .eslintrc.js,即可打开.eslintrc.js文件。
32+
Click on the menu Tools -> Settings -> Plugins -> eslint-vue -> .eslintrc.js to open the `.eslintrc.js` file.
3333

34-
选项对应说明如下
34+
The configuration file is as follows
3535

3636
```
3737
module.exports = {
3838
"extends": "plugin:vue/essential",
3939
"parserOptions": {},
40-
"rules": {} //规则
40+
"rules": {}
4141
};
4242
```
4343

44-
更多配置说明可以参考[options](http://eslint.org/docs/user-guide/configuring)
44+
More configuration instructions can refer to [options](http://eslint.org/docs/user-guide/configuring)
4545

4646

47-
## 如何增加规则
47+
## how to add rules
4848

49-
[官方规则列表](https://github.com/vuejs/eslint-plugin-vue#gear-configs)
49+
[rules list](https://github.com/vuejs/eslint-plugin-vue#gear-configs)
5050

51-
规则设置
52-
- "off" 0 - 关闭规则
53-
- "warn" 1 - 开启规则,使用警告级别的错误:warn (不会导致程序退出)
54-
- "error" 2 - 开启规则,使用错误级别的错误:error (当被触发的时候,程序会退出)
51+
Rule setting
52+
- "off" or 0 - close rules
53+
- "warn" or 1 - open rules,使用警告级别的错误:warn (不会导致程序退出)
54+
- "error" or 2 - open rules,使用错误级别的错误:error (当被触发的时候,程序会退出)
5555

56-
修改.eslintrc.js文件,添加规则,比如:
56+
Modify the .eslintrc.js file and add rules, such as:
5757

5858
```js
5959
{
@@ -122,7 +122,7 @@ eslint-vue的配置文件为.eslintrc.js。
122122
```
123123

124124

125-
## 示例:uni-app项目
125+
## Example:uni-app project
126126

127127
特别说明:
128128
- vue文件,校验vue语法,需要安装`eslint-vue`插件,[插件地址](https://ext.dcloud.net.cn/plugin?id=2005)
@@ -135,7 +135,7 @@ eslint-vue的配置文件为.eslintrc.js。
135135
<img src="/static/snapshots/tutorial/eslint-uniapp-example.gif" style="zoom: 90%; border: 1px solid #eee;" />
136136

137137

138-
## 示例:cli项目
138+
## Example:vue-cli project
139139

140140
vue-cli项目,如果使用项目下的配置规则,需要安装相关库、并在项目根目录创建`.eslintrc.js`文件
141141

15.7 KB
Loading
22.8 KB
Loading
45.2 KB
Loading

zh-cn/Tutorial/extension/eslint-js.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ eslint-js, 用于校验js和html中的js代码
88

99
如下图所示,当检查到错误时,会出现红色波浪线
1010

11-
<img src="/static/snapshots/tutorial/eslint-error.png" />
11+
<img src="/static/snapshots/tutorial/plugins/eslint-js-error.png" class="hd-img" />
1212

1313
## 插件配置
1414

zh-cn/Tutorial/extension/eslint-vue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
如下图所示,编写完代码,保存文件,当检查到错误时,会出现红色波浪线
1010

11-
<img src="/static/snapshots/tutorial/eslint-error.png" />
11+
<img src="/static/snapshots/tutorial/plugins/eslint-vue-error.png" class="hd-img" />
1212

1313
## 插件配置
1414

zh-hant/Tutorial/extension/eslint-js.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ eslint-js, 用於校驗js和html中的js代碼
88

99
如下圖所示,當檢查到錯誤時,會出現紅色波浪線
1010

11-
<img src="/static/snapshots/tutorial/eslint-error.png" />
11+
<img src="/static/snapshots/tutorial/plugins/eslint-js-error.png" class="hd-img" />
1212

1313
## 插件配置
1414

zh-hant/Tutorial/extension/eslint-vue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
如下圖所示,編寫完代碼,保存文件,當檢查到錯誤時,會出現紅色波浪線
1010

11-
<img src="/static/snapshots/tutorial/eslint-error.png" />
11+
<img src="/static/snapshots/tutorial/plugins/eslint-vue-error.png" class="hd-img" />
1212

1313
## 插件配置
1414

0 commit comments

Comments
 (0)