From f14b2da97333afc78afa3fbe3e8b1e5f52303a7c Mon Sep 17 00:00:00 2001 From: Xin Tan Date: Thu, 9 Jan 2020 22:19:18 +0800 Subject: [PATCH] docs: update zh-cn translation in config lintOnSave section (#5031) [ci skip] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 修正lintOnSave的默认type类型 * 修正lint编译错误时新增warning类型 * 修正md内字符串需要引号 * trim line ending space --- docs/zh/config/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zh/config/README.md b/docs/zh/config/README.md index 94d131fa26..74d4eff725 100644 --- a/docs/zh/config/README.md +++ b/docs/zh/config/README.md @@ -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 错误将会导致编译失败。