]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Improve max-line-length tslint rule 22279/head
authorTiago Melo <tmelo@suse.com>
Mon, 28 May 2018 13:19:26 +0000 (14:19 +0100)
committerTiago Melo <tmelo@suse.com>
Mon, 28 May 2018 13:30:57 +0000 (14:30 +0100)
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 <tmelo@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/ceph-short-version.pipe.spec.ts
src/pybind/mgr/dashboard/frontend/tslint.json

index fa81c4d8ce5c3b9302b895e09b0ebe45fa7742fb..10e8c4329d187465105b5cac3fb127ba3f43c87b 100644 (file)
@@ -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');
   });
 
index eb4503d8dbb652396993d80d3445ebe0484ac59f..d915d4d8fe19e5f29795afc2281e27fe9a1d1916 100644 (file)
@@ -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,