]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: add tslint rule to prevent import with more than 1 parent e.g '..... 37918/head
authorĐặng Minh Dũng <dungdm93@live.com>
Wed, 4 Nov 2020 04:32:49 +0000 (11:32 +0700)
committerĐặng Minh Dũng <dungdm93@live.com>
Tue, 10 Nov 2020 11:12:05 +0000 (18:12 +0700)
Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>
src/pybind/mgr/dashboard/frontend/tslint.json

index 6d647ef498099ce17b8d413f059a33332e3ecb01..2911ef2c53610818d192ff88d588b67ce2633135 100644 (file)
     },
     "eofline": true,
     "forin": true,
-    "import-blacklist": [true, "rxjs/Rx", {"@angular/core/testing": ["async"]}],
+    "import-blacklist": [true,
+      "rxjs/Rx",
+      {"@angular/core/testing": ["async"]},
+      ["(\\.{1,2}\/){2,}"] // e.g import ../../foobar
+    ],
     "import-spacing": true,
     "indent": [true, "spaces"],
     "interface-over-type-literal": true,