Browse Source

feat: 加入标签自闭合规则

lanjianrong 4 years ago
parent
commit
1d3d2b8980
1 changed files with 5 additions and 1 deletions
  1. 5 1
      .eslintrc

+ 5 - 1
.eslintrc

@@ -24,7 +24,11 @@
     "react/prop-types": 0,
     "array-bracket-spacing": ["error", "always"],
     "object-curly-spacing": ["error", "always"],
-    "react-hooks/rules-of-hooks": "error"
+    "react-hooks/rules-of-hooks": "error",
+    "react/self-closing-comp": ["error", {
+      "component": true,
+      "html": true
+    }]
     // "react-hooks/exhaustive-deps": "warn"
   },
   "settings": {