From 85402d6543ca0fe24c0ed42c523c973a59e627a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C4=90=E1=BA=B7ng=20Minh=20D=C5=A9ng?= Date: Wed, 4 Nov 2020 11:32:49 +0700 Subject: [PATCH] mgr/dashboard: add tslint rule to prevent import with more than 1 parent e.g '../../foobar' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Đặng Minh Dũng --- src/pybind/mgr/dashboard/frontend/tslint.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/dashboard/frontend/tslint.json b/src/pybind/mgr/dashboard/frontend/tslint.json index 6d647ef4980..2911ef2c536 100644 --- a/src/pybind/mgr/dashboard/frontend/tslint.json +++ b/src/pybind/mgr/dashboard/frontend/tslint.json @@ -12,7 +12,11 @@ }, "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, -- 2.47.3