From fc67af05b67cb2bbb76fcbea35cf10b1284d25de Mon Sep 17 00:00:00 2001 From: Tiago Melo Date: Mon, 28 May 2018 14:19:26 +0100 Subject: [PATCH] mgr/dashboard: Improve max-line-length tslint rule Prettier is not breaking strings if they are bigger then the defined max line length. With this rule we can make sure lines are not exceeding it, with the exception of import/export lines. Signed-off-by: Tiago Melo --- .../src/app/shared/pipes/ceph-short-version.pipe.spec.ts | 3 ++- src/pybind/mgr/dashboard/frontend/tslint.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/ceph-short-version.pipe.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/ceph-short-version.pipe.spec.ts index fa81c4d8ce5c3..10e8c4329d187 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/ceph-short-version.pipe.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/ceph-short-version.pipe.spec.ts @@ -9,7 +9,8 @@ describe('CephShortVersionPipe', () => { it('transforms with correct version format', () => { const value = - 'ceph version 13.1.0-534-g23d3751b89 (23d3751b897b31d2bda57aeaf01acb5ff3c4a9cd) nautilus (dev)'; + 'ceph version 13.1.0-534-g23d3751b89 \ + (23d3751b897b31d2bda57aeaf01acb5ff3c4a9cd) nautilus (dev)'; expect(pipe.transform(value)).toBe('13.1.0-534-g23d3751b89'); }); diff --git a/src/pybind/mgr/dashboard/frontend/tslint.json b/src/pybind/mgr/dashboard/frontend/tslint.json index eb4503d8dbb65..d915d4d8fe19e 100644 --- a/src/pybind/mgr/dashboard/frontend/tslint.json +++ b/src/pybind/mgr/dashboard/frontend/tslint.json @@ -15,6 +15,7 @@ "indent": [true, "spaces"], "interface-over-type-literal": true, "label-position": true, + "max-line-length": [true, {"limit": 100, "ignore-pattern": "^import |^export {(.*?)}"}], "member-access": false, "member-ordering": [ true, -- 2.39.5