Skip to content

Commit f14b2da

Browse files
mactanxinhaoqunjiang
authored andcommitted
docs: update zh-cn translation in config lintOnSave section (#5031) [ci skip]
* 修正lintOnSave的默认type类型 * 修正lint编译错误时新增warning类型 * 修正md内字符串需要引号 * trim line ending space
1 parent 3b7227d commit f14b2da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/zh/config/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ module.exports = {
138138

139139
### lintOnSave
140140

141-
- Type: `boolean` | `'error'`
141+
- Type: `boolean` | `'warning'` | `'default'` | `'error'`
142142
- Default: `true`
143143

144144
是否在开发环境下通过 [eslint-loader](https://github.com/webpack-contrib/eslint-loader) 在每次保存时 lint 代码。这个值会在 [`@vue/cli-plugin-eslint`](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint) 被安装之后生效。
145145

146-
设置为 `true` 时,`eslint-loader` 会将 lint 错误输出为编译警告。默认情况下,警告仅仅会被输出到命令行,且不会使得编译失败。
146+
设置为 `true` `'warning'` 时,`eslint-loader` 会将 lint 错误输出为编译警告。默认情况下,警告仅仅会被输出到命令行,且不会使得编译失败。
147147

148148
如果你希望让 lint 错误在开发时直接显示在浏览器中,你可以使用 `lintOnSave: 'error'`。这会强制 `eslint-loader` 将 lint 错误输出为编译错误,同时也意味着 lint 错误将会导致编译失败。
149149

0 commit comments

Comments
 (0)