This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch tech-debt-metrics
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/tech-debt-metrics by this push:
     new 37da7a7  AntD rule
37da7a7 is described below

commit 37da7a7604619a7434800769dd40603188edf9b3
Author: Evan Rusackas <[email protected]>
AuthorDate: Tue Jan 11 10:59:34 2022 -0700

    AntD rule
---
 superset-frontend/scripts/eslintrc_metrics.js | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/superset-frontend/scripts/eslintrc_metrics.js 
b/superset-frontend/scripts/eslintrc_metrics.js
index d142573..9d0d3d1 100644
--- a/superset-frontend/scripts/eslintrc_metrics.js
+++ b/superset-frontend/scripts/eslintrc_metrics.js
@@ -62,11 +62,19 @@ module.exports = {
     'react-prefer-function-component/react-prefer-function-component': 1,
     'react/jsx-filename-extension': [1, { extensions: ['.tsx'] }],
     'react/forbid-component-props': 1,
-    "no-restricted-imports": ["error", {
-        "patterns": [{
-          "group": ["**/*.less"],
-          "message": "Please reduce/remove reliance on LESS files - move 
approprate styles to Emotion"
-        }]
-    }]
+    "no-restricted-imports": [
+      "warn", {
+        "patterns": [
+          {
+            "group": ["**/*.less"],
+            "message": "Please reduce/remove reliance on LESS files - move 
approprate styles to Emotion"
+          },
+          {
+            "name": "antd",
+            "message": "Please do not use AntD directly, but instead import 
through src/common/components"
+          }
+        ]
+      }
+    ]
   },
 };

Reply via email to