From 39e6823e3622ca29397e9d1d7e8c6addd664911a Mon Sep 17 00:00:00 2001 From: zyn Date: Fri, 15 Dec 2023 15:15:46 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20eslint=E5=A2=9E=E5=8A=A0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 3ad517a41..25c291162 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -29,7 +29,7 @@ module.exports = { 'quotes': ['error', 'single'], // 强制使用单引号 "spaced-comment": ["error", "always"], // 注释后面需要有空格 "prefer-template": "error", // 字符串拼接使用模版字符串 'hello' + world => `hello${world}` - // "template-curly-spacing": ["error", "never"], // 模版字符串中{}前后不能有空格 `hello${ world }` => `hello${world}` + "template-curly-spacing": ["error", "always"], // 模版字符串中{}前后内有一个或多个空格 `hello${ world }` => `hello${ world }` "key-spacing": ["error", { mode: "strict" }], // 对象字面量中冒号的前后空格 { "foo" : 42 } => { "foo": 42 } "comma-spacing": ["error", { "before": false, "after": true }], // 逗号前面不能有空格,后面需要有空格 [1, 2 , 3 ,4] => [1, 2, 4, 4] "array-bracket-spacing": ["error","always"], // 数组前后需要有空格 [ 1,2 ] => [ 1,2 ]