浏览代码

chore: .eslintrc.js

Casper Dai 2 年之前
父节点
当前提交
d0fe8a8ef6
共有 1 个文件被更改,包括 10 次插入2 次删除
  1. 10 2
      .eslintrc.js

+ 10 - 2
.eslintrc.js

@@ -29,8 +29,16 @@ module.exports = {
       'singleline': 1,
       'multiline': 1
     }],
-    'vue/singleline-html-element-content-newline': 0,
-    'vue/multiline-html-element-content-newline': 0,
+    'vue/singleline-html-element-content-newline': [2, {
+      'ignoreWhenNoAttributes': true,
+      'ignoreWhenEmpty': true,
+      'ignores': ['pre']
+    }],
+    'vue/multiline-html-element-content-newline': [2, {
+      'ignoreWhenEmpty': true,
+      'allowEmptyLines': false,
+      'ignores': ['pre']
+    }],
     'vue/component-definition-name-casing': [2, 'PascalCase'],
     'vue/no-v-html': 0,
     // 8.17.0