mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-28 15:59:34 -05:00
docs: update zh-cn translation in config lintOnSave section (#5031) [ci skip]
* 修正lintOnSave的默认type类型 * 修正lint编译错误时新增warning类型 * 修正md内字符串需要引号 * trim line ending space
This commit is contained in:
@@ -138,12 +138,12 @@ module.exports = {
|
||||
|
||||
### lintOnSave
|
||||
|
||||
- Type: `boolean` | `'error'`
|
||||
- Type: `boolean` | `'warning'` | `'default'` | `'error'`
|
||||
- Default: `true`
|
||||
|
||||
是否在开发环境下通过 [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) 被安装之后生效。
|
||||
|
||||
设置为 `true` 时,`eslint-loader` 会将 lint 错误输出为编译警告。默认情况下,警告仅仅会被输出到命令行,且不会使得编译失败。
|
||||
设置为 `true` 或 `'warning'` 时,`eslint-loader` 会将 lint 错误输出为编译警告。默认情况下,警告仅仅会被输出到命令行,且不会使得编译失败。
|
||||
|
||||
如果你希望让 lint 错误在开发时直接显示在浏览器中,你可以使用 `lintOnSave: 'error'`。这会强制 `eslint-loader` 将 lint 错误输出为编译错误,同时也意味着 lint 错误将会导致编译失败。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user